@arcgis/core 5.2.0-next.121 → 5.2.0-next.122

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 (224) hide show
  1. package/Ground.js +1 -1
  2. package/arcgisGlobal.d.ts +2 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +1 -0
  5. package/assets/esri/core/workers/chunks/{deb5b1d772ca407654d4.js → 0acc754907395e83bbc6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{bcb06a0643b4c83535ee.js → 1302bf9718747cd9fdd9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{956432c9d45940983bc2.js → 1b42d163ef22e3565bb7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4adad3312caa24af98ac.js → 1c38ce72160d5a4e4b3d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1c3b087fbf2d102376fc.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9b3813e39992b1b99941.js → 1e46703cb566c25458ad.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{015cb790262a59857c5f.js → 1f135269aea3931e11b2.js} +1 -1
  13. package/assets/esri/core/workers/chunks/23279303cd7698314c56.js +1 -0
  14. package/assets/esri/core/workers/chunks/{4bf2cc4d092601ff2b86.js → 24673aac70d6c949b6fa.js} +1 -1
  15. package/assets/esri/core/workers/chunks/24cf91aeab53a897e951.js +1 -0
  16. package/assets/esri/core/workers/chunks/26bc509a031788bfa678.js +1 -0
  17. package/assets/esri/core/workers/chunks/2ae6deade655fdbc28de.js +1 -0
  18. package/assets/esri/core/workers/chunks/{37cf4ca2083cd3b6002e.js → 2c7bb5c9751524687002.js} +1 -1
  19. package/assets/esri/core/workers/chunks/2c8957f9c7610805208c.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a3c1a5a5c5cbf27b376d.js → 2d592c935571de80a2e2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{a917a1df8270860dc514.js → 2f52ad525744b8793d49.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{6efc5873747b9cd44fb9.js → 323451ef52d0c2805f1d.js} +1 -1
  23. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
  24. package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +1 -0
  25. package/assets/esri/core/workers/chunks/3e33d953e41b281a120b.js +1 -0
  26. package/assets/esri/core/workers/chunks/3e52351e06d85bf9bedd.js +1 -0
  27. package/assets/esri/core/workers/chunks/{fbc5f275c4e5e6bfffaa.js → 462fd57af8ed7921d6ba.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{1846296be959e28c42bb.js → 475906b079f4f1ddacf2.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{ea49721fdd2172d1c799.js → 48a2f68e06a2e90b77d0.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{b6ca73c1384f07b30b74.js → 4bb8432d99a39733368f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{c44cbe04efddbbbaec13.js → 4f58e0322707f63f5bf2.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{0e9f54d7f158195bd203.js → 59cd139712d919e6a738.js} +1 -1
  33. package/assets/esri/core/workers/chunks/59d5247ac4075b024244.js +1 -0
  34. package/assets/esri/core/workers/chunks/5b9f3c4f65412c66316f.js +1 -0
  35. package/assets/esri/core/workers/chunks/{be3421ffb5b391bca02e.js → 5d35e0c2665f5e625ee9.js} +1 -1
  36. package/assets/esri/core/workers/chunks/5e70bfb9d6235a87b87a.js +1 -0
  37. package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +1 -0
  38. package/assets/esri/core/workers/chunks/618927cfcb93dd1d92fd.js +1 -0
  39. package/assets/esri/core/workers/chunks/6709d24867d275b33d24.js +1 -0
  40. package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +1 -0
  41. package/assets/esri/core/workers/chunks/{fd5e61cb6f936eadcfe3.js → 724ea2e2843e6dac0a90.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{e86f83a6514a35255f64.js → 781fa83e8063b8f685dc.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{a005efcde3ca9def4e6b.js → 78c1b75b1a8937eaa3cd.js} +1 -1
  45. package/assets/esri/core/workers/chunks/793b072519ded0dc6f34.js +1 -0
  46. package/assets/esri/core/workers/chunks/{1086f190f94c715bbfe4.js → 7994fce5f36963aadc51.js} +1 -1
  47. package/assets/esri/core/workers/chunks/7adee504107cb9ad8563.js +1 -0
  48. package/assets/esri/core/workers/chunks/7efc45858ebd3fd3302e.js +1 -0
  49. package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +1 -0
  50. package/assets/esri/core/workers/chunks/813dd84933b407c8fe86.js +1 -0
  51. package/assets/esri/core/workers/chunks/8daeac785af725c3ebdf.js +1 -0
  52. package/assets/esri/core/workers/chunks/{3ab25279aaa30f035038.js → 8daed13400d9e63e65ae.js} +1 -1
  53. package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +1 -0
  54. package/assets/esri/core/workers/chunks/{cf7c06702babd6fa88b4.js → 9af36ee6a0df224859bc.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{452d069ba7ad6759b558.js → 9c46c7f00d42f5c02b26.js} +1 -1
  56. package/assets/esri/core/workers/chunks/a3ab53b534e2872131be.js +1 -0
  57. package/assets/esri/core/workers/chunks/{fa3f824c874f29d24953.js → aa6b2cc8f6f5627891c1.js} +1 -1
  58. package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +1 -0
  59. package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +1 -0
  60. package/assets/esri/core/workers/chunks/{60c61f34733063730386.js → b013b70e40dfb6ce013e.js} +1 -1
  61. package/assets/esri/core/workers/chunks/b22de8bf4a4a739bc36d.js +1 -0
  62. package/assets/esri/core/workers/chunks/b39cd78d2d97bef9909e.js +1 -0
  63. package/assets/esri/core/workers/chunks/b5f50955c1eee55b67d1.js +1 -0
  64. package/assets/esri/core/workers/chunks/{99ebc99e8d1bca105b5e.js → b688e6463a651779a016.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bdf012e591a8476db467.js +1 -0
  66. package/assets/esri/core/workers/chunks/{daf7b647bd960d8bad56.js → be52c319a0a81ce1ba36.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{89edaa1ffa566908ebca.js → ca5a4f62b09cc8579dc0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{fbb390c0d92d1536fce3.js → ce1ccf9ec90b786591e5.js} +1 -1
  69. package/assets/esri/core/workers/chunks/cf0bed7ae27021fd7b05.js +1 -0
  70. package/assets/esri/core/workers/chunks/cf6f671823fa6c2a9a5e.js +1 -0
  71. package/assets/esri/core/workers/chunks/{39c5e0f6262f69a62c66.js → d25210574168ead2f813.js} +1 -1
  72. package/assets/esri/core/workers/chunks/d3378c479052d566317c.js +1 -0
  73. package/assets/esri/core/workers/chunks/d3ef23923424ad8c5048.js +1 -0
  74. package/assets/esri/core/workers/chunks/{46388b86d1b10e6121bd.js → d507d7d7a7282fc38e8d.js} +1 -1
  75. package/assets/esri/core/workers/chunks/dc0816f064be576a2fa6.js +1 -0
  76. package/assets/esri/core/workers/chunks/{d9b761104ab6e4acaf91.js → dd4ecf81250cc001d040.js} +1 -1
  77. package/assets/esri/core/workers/chunks/e10fe4c77b8dc4492092.js +1 -0
  78. package/assets/esri/core/workers/chunks/e4e1db4e9e5f13167401.js +1 -0
  79. package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +1 -0
  80. package/assets/esri/core/workers/chunks/{e755075ac2e02e881fad.js → e6637f9176566382ed3e.js} +1 -1
  81. package/assets/esri/core/workers/chunks/e6dc68c4bd8eddb168d1.js +1 -0
  82. package/assets/esri/core/workers/chunks/eb780f2dafa14f776166.js +1 -0
  83. package/assets/esri/core/workers/chunks/{d9d5f50af047ee7af129.js → eb7f45736c852725b0bb.js} +89 -58
  84. package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +1 -0
  85. package/assets/esri/core/workers/chunks/f38d11be766043413659.js +1 -0
  86. package/assets/esri/libs/pdfjs/pdf.worker.mjs +63075 -0
  87. package/assets/esri/libs/pdfjs/wasm/jbig2.wasm +0 -0
  88. package/assets/esri/libs/pdfjs/wasm/openjpeg.wasm +0 -0
  89. package/assets/esri/libs/pdfjs/wasm/qcms_bg.wasm +0 -0
  90. package/assets/esri/libs/pdfjs/wasm/quickjs-eval.wasm +0 -0
  91. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.en.json +1 -1
  92. package/chunks/CloudsComposition.glsl.js +2 -2
  93. package/chunks/GlobalIllumination.glsl.js +42 -13
  94. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  95. package/config.js +1 -1
  96. package/core/arrayUtils.js +1 -1
  97. package/core/workers/registry.js +1 -1
  98. package/geometry/support/geometryUtils.js +1 -1
  99. package/geometry/support/heightModelInfoUtils.js +1 -1
  100. package/geometry/support/meshUtils/elevation.js +1 -1
  101. package/kernel.js +1 -1
  102. package/layers/GeospatialPDFLayer.d.ts +40 -0
  103. package/layers/GeospatialPDFLayer.js +2 -0
  104. package/layers/IntegratedMeshLayer.js +1 -1
  105. package/layers/geospatialPDF/GeospatialPDFFrame.js +2 -0
  106. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +5 -0
  107. package/layers/geospatialPDF/GeospatialPDFParserUtils.js +2 -0
  108. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +2 -0
  109. package/layers/geospatialPDF/LGIDictMapFrame.js +2 -0
  110. package/layers/geospatialPDF/Projection.js +2 -0
  111. package/layers/geospatialPDF/ViewportMeasureFrame.js +2 -0
  112. package/layers/geospatialPDF/renderExtentUtils.js +2 -0
  113. package/layers/geospatialPDF/sharedUtils.js +2 -0
  114. package/layers/mixins/ArcGISImageService.js +1 -1
  115. package/layers/raster/datasets/GeospatialPDFRaster.js +2 -0
  116. package/layers/support/ElevationQuery.js +1 -1
  117. package/layers/support/LabelClass.js +1 -1
  118. package/layers/support/layersLoader.js +1 -1
  119. package/layers/types.d.ts +1 -1
  120. package/package.json +4 -4
  121. package/portal/PortalItem.js +1 -1
  122. package/portal/support/portalLayers.js +1 -1
  123. package/support/revision.js +1 -1
  124. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  125. package/views/2d/input/MapViewInputManager.js +1 -1
  126. package/views/2d/input/handlers/KeyPan.js +1 -1
  127. package/views/2d/input/handlers/KeyRotate.js +1 -1
  128. package/views/2d/layerViewModuleImportUtils.js +1 -1
  129. package/views/2d/layers/GeospatialPDFLayerView2D.js +2 -0
  130. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  131. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  132. package/views/2d/types.d.ts +2 -0
  133. package/views/3d/GroundView3D.js +1 -1
  134. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  135. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  136. package/views/3d/layerViewModuleImportUtils.js +1 -1
  137. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  138. package/views/3d/layers/GeospatialPDFLayerView3D.js +2 -0
  139. package/views/3d/layers/I3SMeshView3D.js +1 -1
  140. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  141. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  142. package/views/3d/layers/LayerView3D.js +1 -1
  143. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  144. package/views/3d/layers/i3s/Intersector.js +1 -1
  145. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  146. package/views/3d/support/GroundAndIMSurface.js +1 -1
  147. package/views/3d/support/hitTest.js +1 -1
  148. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  149. package/views/3d/types.d.ts +2 -0
  150. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  151. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +8 -6
  152. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +2 -2
  153. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  154. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +6 -6
  155. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  156. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  157. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  158. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  159. package/views/SceneView.d.ts +31 -0
  160. package/views/SceneView.js +1 -1
  161. package/views/View.d.ts +35 -0
  162. package/views/View.js +1 -1
  163. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  164. package/views/analysis/ElevationProfile/elevationProfileQuerySourceUtils.js +1 -1
  165. package/views/interactive/options/ViewOptions.d.ts +98 -0
  166. package/views/interactive/options/ViewOptions.js +2 -0
  167. package/views/interactive/support/Units.d.ts +10 -2
  168. package/views/interactive/support/Units.js +1 -1
  169. package/views/layers/FeatureLikeLayerView.d.ts +27 -5
  170. package/views/layers/GraphicsLayerView.d.ts +25 -2
  171. package/views/layers/ImageryTileLayerView.js +1 -1
  172. package/views/selection/types.d.ts +1 -1
  173. package/views/support/DefaultsFromMap.js +1 -1
  174. package/views/types.d.ts +9 -3
  175. package/widgets/ElevationProfile/ElevationProfileLineGround.js +1 -1
  176. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +8 -2
  177. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  178. package/widgets/support/SelectionToolbar/VisibleElements.d.ts +8 -1
  179. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  180. package/widgets/support/SelectionToolbar.d.ts +7 -1
  181. package/widgets/support/SelectionToolbar.js +1 -1
  182. package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +0 -1
  183. package/assets/esri/core/workers/chunks/0b727d7bf3e36e146725.js +0 -1
  184. package/assets/esri/core/workers/chunks/0bd067a5c0bac96caeb5.js +0 -1
  185. package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
  186. package/assets/esri/core/workers/chunks/114bc14c49176f64a2c5.js +0 -1
  187. package/assets/esri/core/workers/chunks/173417fe995e9bfc49d8.js +0 -1
  188. package/assets/esri/core/workers/chunks/2cf571d968118b6bdde0.js +0 -1
  189. package/assets/esri/core/workers/chunks/43436c7ccc6baefc885d.js +0 -1
  190. package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +0 -1
  191. package/assets/esri/core/workers/chunks/48d3da636be15581fd7d.js +0 -1
  192. package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +0 -1
  193. package/assets/esri/core/workers/chunks/50ae209237f104735a30.js +0 -1
  194. package/assets/esri/core/workers/chunks/54f9062526c2002b7fd7.js +0 -1
  195. package/assets/esri/core/workers/chunks/56b7ac280bf0be938c14.js +0 -1
  196. package/assets/esri/core/workers/chunks/61bcbafd676804ce3e1d.js +0 -1
  197. package/assets/esri/core/workers/chunks/63f7141c71f29dbe8270.js +0 -1
  198. package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +0 -1
  199. package/assets/esri/core/workers/chunks/75410a4de76e67ed5da4.js +0 -1
  200. package/assets/esri/core/workers/chunks/85780f4fa4b5509f864e.js +0 -1
  201. package/assets/esri/core/workers/chunks/862754d2d659528fe884.js +0 -1
  202. package/assets/esri/core/workers/chunks/8675ab3c4dec2f13b9c6.js +0 -1
  203. package/assets/esri/core/workers/chunks/8a103b6e9534516421e2.js +0 -1
  204. package/assets/esri/core/workers/chunks/917dec9c004218c58950.js +0 -1
  205. package/assets/esri/core/workers/chunks/91a51d959ee5c6123c46.js +0 -1
  206. package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +0 -1
  207. package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +0 -1
  208. package/assets/esri/core/workers/chunks/a42505b978d54d36d3b6.js +0 -1
  209. package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +0 -1
  210. package/assets/esri/core/workers/chunks/a86a4e550a92f770d6d5.js +0 -1
  211. package/assets/esri/core/workers/chunks/b45ebb1b64ee7314375e.js +0 -1
  212. package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +0 -1
  213. package/assets/esri/core/workers/chunks/baa8bce361a2677533ec.js +0 -1
  214. package/assets/esri/core/workers/chunks/c70a32ac0fa49f4493ca.js +0 -1
  215. package/assets/esri/core/workers/chunks/cf1106eda10f3cccb1bd.js +0 -1
  216. package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +0 -1
  217. package/assets/esri/core/workers/chunks/d38252956c3d9e2168f7.js +0 -1
  218. package/assets/esri/core/workers/chunks/d6130cd8a20d24dd9d3c.js +0 -1
  219. package/assets/esri/core/workers/chunks/da161f8cbe1cfc5fcf7c.js +0 -1
  220. package/assets/esri/core/workers/chunks/da5b3421a984cb94fd58.js +0 -1
  221. package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +0 -1
  222. package/assets/esri/core/workers/chunks/e88eee4c2fc4229c2a8b.js +0 -1
  223. package/assets/esri/core/workers/chunks/f75e57d3e02f9828b049.js +0 -1
  224. package/assets/esri/core/workers/chunks/f774e5b94710ccee1af0.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3981],{83349(t,e,n){function r(t,e,n){n=n||2;var r,s,a,h,l,c,f,d=e&&e.length,x=d?e[0]*n:t.length,y=i(t,0,x,n,!0),g=[];if(!y||y.next===y.prev)return g;if(d&&(y=u(t,e,y,n)),t.length>80*n){r=a=t[0],s=h=t[1];for(var p=n;p<x;p+=n)(l=t[p])<r&&(r=l),(c=t[p+1])<s&&(s=c),l>a&&(a=l),c>h&&(h=c);f=0!==(f=Math.max(a-r,h-s))?1/f:0}return o(y,g,n,r,s,f),g}function i(t,e,n,r,i){var s,o;if(i===N(t,e,n,r)>0)for(s=e;s<n;s+=r)o=S(s,t[s],t[s+1],o);else for(s=n-r;s>=e;s-=r)o=S(s,t[s],t[s+1],o);if(o&&b(o,o.next)){var a=o.next;L(o),o=a}return o}function s(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(L(r),(r=e=i)===r.next)break;n=!0}}while(n||r!==e);return e}function o(t,e,n,r,i,u,f){if(t){!f&&u&&g(t,r,i,u);for(var d,x,y=t;t.prev!==t.next;)if(d=t.prev,x=t.next,u?h(t,r,i,u):a(t))e.push(d.i/n),e.push(t.i/n),e.push(x.i/n),L(t),t=x.next,y=x.next;else if((t=x)===y){f?1===f?o(t=l(s(t),e,n),e,n,r,i,u,2):2===f&&c(t,e,n,r,i,u):o(s(t),e,n,r,i,u,1);break}}}function a(t){var e=t.prev,n=t,r=t.next;if(w(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&w(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function h(t,e,n,r){var i=t.prev,s=t,o=t.next;if(w(i,s,o)>=0)return!1;for(var a=i.x<s.x?i.x<o.x?i.x:o.x:s.x<o.x?s.x:o.x,h=i.y<s.y?i.y<o.y?i.y:o.y:s.y<o.y?s.y:o.y,l=i.x>s.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,c=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,u=p(a,h,e,n,r),f=p(l,c,e,n,r),d=t.prevZ,x=t.nextZ;d&&d.z>=u&&x&&x.z<=f;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,x!==t.prev&&x!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,x.x,x.y)&&w(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;d&&d.z>=u;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;x&&x.z<=f;){if(x!==t.prev&&x!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,x.x,x.y)&&w(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!b(i,o)&&v(i,r,r.next,o)&&M(i,o)&&M(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),L(r),L(r.next),r=t=o),r=r.next}while(r!==t);return s(r)}function c(t,e,n,r,i,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&I(h,l)){var c=A(h,l);return h=s(h,h.next),c=s(c,c.next),o(h,e,n,r,i,a),void o(c,e,n,r,i,a)}l=l.next}h=h.next}while(h!==t)}function u(t,e,n,r){var o,a,h,l=[];for(o=0,a=e.length;o<a;o++)(h=i(t,e[o]*r,o<a-1?e[o+1]*r:t.length,r,!1))===h.next&&(h.steiner=!0),l.push(_(h));for(l.sort(f),o=0;o<l.length;o++)n=s(n=x(l[o],n),n.next);return n}function f(t,e){return t.x-e.x}function d(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function x(t,e){var n=function(t,e){var n,r=e,i=t.x,s=t.y,o=-1/0;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var a=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>o){if(o=a,a===i){if(s===r.y)return r;if(s===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===o)return n;var h,l=n,c=n.x,u=n.y,f=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&m(s<u?i:o,s,c,u,s<u?o:i,s,r.x,r.y)&&(h=Math.abs(s-r.y)/(i-r.x),M(r,t)&&(h<f||h===f&&(r.x>n.x||r.x===n.x&&y(n,r)))&&(n=r,f=h)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var r=A(n,t),i=s(n,n.next);let o=d(r);return s(o,o.next),i=d(i),d(e===n?i:e)}function y(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}function g(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,s,o,a,h,l=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e<l&&(a++,r=r.nextZ);e++);for(h=l;a>0||h>0&&r;)0!==a&&(0===h||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,h--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,l*=2}while(o>1)}(i)}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function _(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function m(t,e,n,r,i,s,o,a){return(i-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(r-a)-(n-o)*(e-a)>=0&&(n-o)*(s-a)-(i-o)*(r-a)>=0}function I(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&v(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(M(t,e)&&M(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||b(t,e)&&w(t.prev,t,t.next)>0&&w(e.prev,e,e.next)>0)}function w(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function b(t,e){return t.x===e.x&&t.y===e.y}function v(t,e,n,r){var i=T(w(t,e,n)),s=T(w(t,e,r)),o=T(w(n,r,t)),a=T(w(n,r,e));return i!==s&&o!==a||!(0!==i||!P(t,n,e))||!(0!==s||!P(t,r,e))||!(0!==o||!P(n,t,r))||!(0!==a||!P(n,e,r))}function P(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function T(t){return t>0?1:t<0?-1:0}function M(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function A(t,e){var n=new k(t.i,t.x,t.y),r=new k(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function S(t,e,n,r){var i=new k(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function L(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function k(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function N(t,e,n,r){for(var i=0,s=e,o=n-r;s<n;s+=r)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}n.d(e,{e:()=>r}),r.deviation=function(t,e,n,r){var i=e&&e.length,s=i?e[0]*n:t.length,o=Math.abs(N(t,0,s,n));if(i)for(var a=0,h=e.length;a<h;a++){var l=e[a]*n,c=a<h-1?e[a+1]*n:t.length;o-=Math.abs(N(t,l,c,n))}var u=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,d=r[a+1]*n,x=r[a+2]*n;u+=Math.abs((t[f]-t[x])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[x+1]-t[f+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)n.vertices.push(t[i][s][o]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},32488(t,e,n){n.d(e,{A:()=>T});const r=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],h=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],l=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],d=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],x=["ء","ف"],y=["غ","ي"],g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,m=11,I=12,w=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],v=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],P=[[w,w,w,w,w,w,w,w,w,6,5,6,8,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,5,5,5,6,8,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,w,w,w,w,w,w,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,4,m,m,m,m,4,4,4,4,0,4,4,w,4,4,m,m,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,1,I,1,I,I,1,I,I,1,I,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,m,m,7,9,7,4,4,I,I,I,I,I,I,I,I,I,I,I,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,3,3,3,3,3,3,3,3,3,3,m,3,3,7,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,3,4,I,I,I,I,I,I,7,7,I,I,4,I,I,I,I,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,I,I,I,I,I,I,I,I,I,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,w,w,w,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,w,w,w,w,w,4,4,4,4,4,w,w,w,w,w,w,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,I,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,m,4,4,_,_,4,4,4,4,4,m,m,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,w],[4,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,m,m,4,4,4,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class T{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,n){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,n){j=[],J=[];for(let r=0;r<n;r++)t[r]=r,e[r]=r,j[r]=r}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,n))return t;e=this.inputFormat,n=this.outputFormat;let r=t;const a=H,c=G(e.charAt(1)),f=G(n.charAt(1)),x=(e.startsWith("I")?"L":e.charAt(0))+c,y=(n.startsWith("I")?"L":n.charAt(0))+f,g=e.charAt(2)+n.charAt(2);a.defInFormat=x,a.defOutFormat=y,a.defSwap=g;const p=M(t,x,y,g,a);let _=!1;return"R"===n.charAt(1)?_=!0:"C"!==n.charAt(1)&&"D"!==n.charAt(1)||(_="rtl"===this.checkContextual(p)),this.sourceToTarget=j,this.targetToSource=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[t[n]]=n;return e}(this.sourceToTarget),K=this.targetToSource,r=e.charAt(3)===n.charAt(3)?p:"S"===n.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const n=(e=String(e)).split("");let r=0,i=1,a=n.length;t||(r=n.length-1,i=-1,a=1);const c=function(t,e,n,r){let i=0;const a=[];let c=0;for(let f=e;f*n<r;f+=n)if(V(t[f])||Z(t[f])){if("ل"===t[f]&&C(t,f+n,n,r)){t[f]=W(t[f+n],0===i?s:o),f+=n,Y(t,f,n,r),a[c]=f,c++,i=0;continue}const e=t[f];1===i?t[f]=z(t,f+n,n,r)?U(t[f]):O(t[f],l):!0===z(t,f+n,n,r)?t[f]=O(t[f],u):t[f]=O(t[f],h),Z(e)||(i=1),!0===F(e)&&(i=0)}else i=0;return a}(n,r,i,a);let f="";for(let e=0;e<n.length;e++)B(c,c.length,e)>-1?(q(K,e,!t,-1),j.splice(e,1)):f+=n[e];return f}(_,p):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let n="";const r=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(r[s]>="ﹰ"&&r[s]<"\ufeff"){const a=t.charCodeAt(s);r[s]>="ﻵ"&&r[s]<="ﻼ"?(e?(s>0&&" "===r[s-1]?n=n.slice(0,-1)+"ل":(n+="ل",o=!0),n+=i[(a-65269)/2]):(n+=i[(a-65269)/2],n+="ل",s+1<t.length&&" "===r[s+1]?s++:o=!0),o&&(q(K,s,!0,1),j.splice(s,0,j[s]))):n+=d[a-65136]}else n+=r[s]}return n}(p,_),this.sourceToTarget=j,this.targetToSource=K,this.levels=J,r}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=A(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return nt.test(t)}}function M(t,e,n,r,i){const s=function(t,e,n){if(void 0===e.inFormat&&(e.inFormat=n.defInFormat),void 0===e.outFormat&&(e.outFormat=n.defOutFormat),void 0===e.swap&&(e.swap=n.defSwap),e.inFormat===e.outFormat)return e;const r=e.inFormat.slice(0,1),i=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=A(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=r+o),a.startsWith("C")&&(s=A(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),A(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:n,swap:r},i);if(s.inFormat===s.outFormat)return t;e=s.inFormat,n=s.outFormat,r=s.swap;const o=e.slice(0,1),a=e.slice(1,4),h=n.slice(0,1),l=n.slice(1,4);if(i.inFormat=e,i.outFormat=n,i.swap=r,"L"===o&&"VLTR"===n){if("LTR"===a)return i.dir=X,S(t,i);if("RTL"===a)return i.dir=tt,S(t,i)}if("V"===o&&"V"===h)return i.dir="RTL"===a?tt:X,N(t,i);if("L"===o&&"VRTL"===n)return"LTR"===a?(i.dir=X,t=S(t,i)):(i.dir=tt,t=S(t,i)),N(t);if("VLTR"===e&&"LLTR"===n)return i.dir=X,S(t,i);if("V"===o&&"L"===h&&a!==l)return t=N(t),"RTL"===a?M(t,"LLTR","VLTR",r,i):M(t,"LRTL","VRTL",r,i);if("VRTL"===e&&"LRTL"===n)return M(t,"LRTL","VRTL",r,i);if("L"===o&&"L"===h){const e=i.swap;return i.swap=e.slice(0,1)+"N","RTL"===a?(i.dir=tt,t=S(t,i),i.swap="N"+e.slice(1,3),i.dir=X,t=S(t,i)):(i.dir=X,t=S(t,i),i.swap="N"+e.slice(1,3),t=M(t,"VLTR","LRTL",i.swap,i)),t}return t}function A(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function S(t,e){const n=t.split(""),r=[];return L(n,r,e),function(t,e,n){if(0!==n.hiLevel&&n.swap[0]!==n.swap[1])for(let n=0;n<t.length;n++)1===e[n]&&(t[n]=D(t[n]))}(n,r,e),R(2,n,r,e),R(1,n,r,e),J=r,n.join("")}function L(t,e,n){const r=t.length,i=n.dir?p:g;let s=0,o=-1;const a=[],h=[];n.hiLevel=n.dir,n.lastArabic=!1,n.hasUbatAl=!1,n.hasUbatB=!1,n.hasUbatS=!1;for(let e=0;e<r;e++)a[e]=k(t[e]);for(let l=0;l<r;l++){const r=s,c=E(t,a,h,l,n);h[l]=c,s=i[r][c];const u=240&s;s&=15;const f=i[s][$];if(e[l]=f,u>0)if(16===u){for(let t=o;t<l;t++)e[t]=1;o=-1}else o=-1;if(i[s][Q])-1===o&&(o=l);else if(o>-1){for(let t=o;t<l;t++)e[t]=f;o=-1}5===a[l]&&(e[l]=0),n.hiLevel|=f}n.hasUbatS&&function(t,e,n,r){for(let i=0;i<n;i++)if(6===t[i]){e[i]=r.dir;for(let n=i-1;n>=0&&8===t[n];n--)e[n]=r.dir}}(a,e,r,n)}function k(t){const e=t.charCodeAt(0),n=v[e>>8];return n<100?n:P[n-100][255&e]}function N(t,e){const n=t.split("");if(e){const t=[];L(n,t,e),J=t}return n.reverse(),j.reverse(),n.join("")}function B(t,e,n){for(let r=0;r<e;r++)if(t[r]===n)return r;return-1}function V(t){for(let e=0;e<x.length;e++)if(t>=x[e]&&t<=y[e])return!0;return!1}function z(t,e,n,r){for(;e*n<r&&Z(t[e]);)e+=n;return!!(e*n<r&&V(t[e]))}function C(t,e,n,r){for(;e*n<r&&Z(t[e]);)e+=n;let s=" ";if(!(e*n<r))return!1;s=t[e];for(let t=0;t<i.length;t++)if(i[t]===s)return!0;return!1}function R(t,e,n,r){if(r.hiLevel<t)return;if(1===t&&r.dir===tt&&!r.hasUbatB)return e.reverse(),void j.reverse();const i=e.length;let s,o,a,h,l,c=0;for(;c<i;){if(n[c]>=t){for(s=c+1;s<i&&n[s]>=t;)s++;for(o=c,a=s-1;o<a;o++,a--)h=e[o],e[o]=e[a],e[a]=h,l=j[o],j[o]=j[a],j[a]=l;c=s}c++}}function E(t,e,n,r,i){const s=e[r];return{UBAT_L:()=>(i.lastArabic=!1,0),UBAT_R:()=>(i.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>i.lastArabic?3:2,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return r<1||r+1>=e.length||2!==(t=n[r-1])&&3!==t||2!==(s=e[r+1])&&3!==s?4:(i.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(r>0?n[r-1]:5)&&r+1<e.length&&2===e[r+1]?2:4,UBAT_ET:()=>{if(r>0&&2===n[r-1])return 2;if(i.lastArabic)return 4;let t=r+1;const s=e.length;for(;t<s&&11===e[t];)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const n=e.length;let i=r+1;for(;i<n&&12===e[i];)i++;if(i<n){const n=t[r].charCodeAt(0),s=n>=1425&&n<=2303||64286===n,o=e[i];if(s&&(1===o||7===o))return 1}}return r<1||5===e[r-1]?4:n[r-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,4),UBAT_LRE:()=>(i.lastArabic=!1,4),UBAT_RLE:()=>(i.lastArabic=!1,4),UBAT_LRO:()=>(i.lastArabic=!1,4),UBAT_RLO:()=>(i.lastArabic=!1,4),UBAT_PDF:()=>(i.lastArabic=!1,4),UBAT_BN:()=>4}[b[s]]()}function D(t){let e,n=0,i=r.length-1;for(;n<=i;)if(e=Math.floor((n+i)/2),t<r[e][0])i=e-1;else{if(!(t>r[e][0]))return r[e][1];n=e+1}return t}function F(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function U(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function O(t,e){for(let n=0;n<a.length;n++)if(t===a[n])return e[n];return t}function Z(t){return t>="ً"&&t<="ٕ"}function G(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function Y(t,e,n,r){for(;e*n<r&&Z(t[e]);)e+=n;return e*n<r&&(t[e]=" ",!0)}function W(t,e){for(let n=0;n<i.length;n++)if(t===i[n])return e[n];return t}function q(t,e,n,r){for(let i=0;i<t.length;i++)(t[i]>e||!n&&t[i]===e)&&(t[i]+=r)}let j=[],K=[],J=[];const H={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},$=5,Q=6,X=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,nt=/[\u0591-\u06ff\ufb1d-\ufefc]/},95488(t,e,n){n.d(e,{I:()=>i});var r=n(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},34304(t,e,n){n.d(e,{DF:()=>h,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function h(t){return t*o}function l(t){return t*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:h},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,s])},51624(t,e,n){n.d(e,{A:()=>l});var r=n(44208),i=n(69397),s=n(93687);const o=4294967296,a=new TextDecoder("utf-8"),h=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class l{constructor(t,e,n=0,r=t?.byteLength??0){this._tag=0,this._dataType=99,this._init(t,e,n,r)}[Symbol.dispose](){this.release()}_init(t,e,n,r){this._data=t,this._dataView=e,this._pos=n,this._end=r}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new l(this._data,this._dataView,this._pos,this._end)}clonePooled(){return l.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(t,e,n=0,r=t?.byteLength??0){const i=l.pool.acquire();return i._init(t,e,n,r),i}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getPackedEnd(){const t=this.getUInt32();return this._pos+t}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getUint32(e+4,!0)*o;return this._skip(8),n}getSFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getInt32(e+4,!0)*o;return this._skip(8),n}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,n=this._toString(this._data,e,e+t);return this._skip(t),n}getBytes(){const t=this._getLength(),e=this._pos,n=this._toBytes(this._data,e,e+t);return this._skip(t),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,n,r){const i=this.getMessage(),s=t(i,e,n,r);return i.release(),s}processMessage(t){const e=this.getMessage(),n=t(e);return e.release(),n}getMessage(){const t=this._getLength(),e=l.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){l.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,n=0,r=0;if(this._end-e>=10)do{if(r=t[e++],n|=127&r,!(128&r))break;if(r=t[e++],n|=(127&r)<<7,!(128&r))break;if(r=t[e++],n|=(127&r)<<14,!(128&r))break;if(r=t[e++],n|=(127&r)<<21,!(128&r))break;if(r=t[e++],n+=268435456*(127&r),!(128&r))break;if(r=t[e++],n+=34359738368*(127&r),!(128&r))break;if(r=t[e++],n+=4398046511104*(127&r),!(128&r))break;if(r=t[e++],n+=562949953421312*(127&r),!(128&r))break;if(r=t[e++],n+=72057594037927940*(127&r),!(128&r))break;if(r=t[e++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;e!==this._end&&(r=t[e],128&r);)++e,n+=(127&r)*i,i*=128;if(e===this._end)throw new Error("Varint overrun!");++e,n+=r*i}return this._pos=e,n}_decodeSVarint(){const t=this._data;let e,n=0,r=0;const i=1&t[this._pos];if(r=t[this._pos++],n|=127&r,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<7,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<14,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<21,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=268435456*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=34359738368*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=4398046511104*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(e=BigInt(n),r=t[this._pos++],e+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,n){if((n=Math.min(this._end,n))-e>h){const r=t.subarray(e,n);return a.decode(r)}let r="",i="";for(let s=e;s<n;++s){const e=t[s];128&e?i+="%"+e.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(e),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(t,e,n){return n=Math.min(this._end,n),new Uint8Array(t.buffer,e,n-e)}static{this.pool=new s.A(()=>new l(null,null),void 0,t=>{t._data=null,t._dataView=null})}}},36745(t,e,n){n.d(e,{z:()=>a});var r=n(4718),i=n(51118),s=n(60408),o=n(92722);class a{static fromOptimized(t,e,n=1){return(new h).initialize(t,e,n)}static fromJSON(t){const[e,n]=c(t),r=(0,s.Pv)(t),i=(0,s.W0)(t);return(new u).initialize(e,n,r,i,1)}static fromOptimizedCIM(t,e,n=1){return(new f).initialize(t,e,n)}static fromJSONCIM(t,e=1){const[n,r]=c(t),i=(0,s.Pv)(t),o=(0,s.W0)(t);return(new d).initialize(n,r,i,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimized(e,n):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimizedCIM(e,n):null}static createEmptyOptimized(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSON(t,e=!1,n=!1){return(new u).initialize([],t,e,n,1)}static createEmptyOptimizedCIM(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSONCIM(t,e=!1,n=!1,r=1){return(new d).initialize([],t,e,n,r)}asJSON(){const t=(0,i.x)(this),{hasZ:e,hasM:n}=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:n}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:n?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:n}:{paths:t,hasZ:e,hasM:n}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,n=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const r=t,i=e;for(;this.nextPoint();)n+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return n+=(t-r)*(e+i),-.5*n}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,n){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=n,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,n=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(n,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,n=this._geometry.coords;let r=0;for(let i=this._pathOffset+e;i<t;i+=e){const t=n[i-e],s=n[i-e+1],o=n[i]-t,a=n[i+1]-s;r+=Math.sqrt(o*o+a*a)}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(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,n=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[n+r])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return(0,s.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,s.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,s.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,s.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,s.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class u extends a{initialize(t,e,n,r,i){return this._paths=t,this.geometryType=e,this.hasZ=n,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let n=0;for(let r=1;r<t;r++){const t=e[r-1],i=e[r],s=t[0],o=t[1],a=i[0]-s,h=i[1]-o;n+=Math.sqrt(a*a+h*h)}return n}startPath(){this._paths.push([])}getCurrentPath(){return(new u).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,i.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,n=new o.A([],[],t,e),{coords:r,lengths:i}=n;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),i.length=0;else for(const n of this._paths){for(const i of n)r.push(i[0]),r.push(i[1]*this.yFactor),t&&r.push(i[2]),e&&r.push(i[this._mIndex]);i.push(n.length)}return n}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}clone(){return(new u).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 h{initialize(t,e,n){return super.initialize(t,e,n),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new 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 u{initialize(t,e,n,r,i){return super.initialize(t,e,n,r,i)}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]}}},51118(t,e,n){function r(t){const e=[];for(t.reset();t.nextPath();){const n=[];for(;t.nextPoint();){const e=[t.x,t.y];t.hasZ&&e.push(t.z),t.hasM&&e.push(t.m),n.push(e)}e.push(n)}return t.reset(),e}function i(t){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);return t.seekPathStart(),e}n.d(e,{A:()=>i,x:()=>r})},15585(t,e,n){n.d(e,{If:()=>d,O5:()=>p,O9:()=>y,QT:()=>g,l3:()=>x});var r=n(32198),i=n(2741),s=n(49186),o=n(44208),a=n(34727);let h=null,l=null,c=null,u=null;const f=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function d(){return h??=async function(){const t=await n.e(2997).then(()=>n(42997)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});c=e}(),h}async function x(){return l??=async function(){const t=await n.e(9134).then(()=>n(99134)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});u=e}(),l}function y(){return null!==u}function g(t,e,n=2){const i={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const h=(0,r.mS)(i,w.from(a,t),!1),l=(0,r.mS)(i,v.from(a,e),!1),u=t.length/n*4,f=(0,r.mS)(i,new w(a,u*n),!1),d=a.triangulate(h.ptr,l.ptr,l.size,n,f.ptr,u);if((0,o.A)("esri-tessellation-debug")){const t=a.getError();0!==t&&console.warn("libtess:triangulation",P(t))}return{buffer:f.slice(0,d*n),vertexCount:d}}catch(t){i.error=t,i.hasError=!0}finally{(0,r.hk)(i)}}function p(t,e,n=2,i=!0){const h={stack:[],error:void 0,hasError:!1};try{const l=u;if(!l)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,r.mS)(h,b.from(l,t),!1),d=(0,r.mS)(h,v.from(l,e),!1),x=(0,r.mS)(h,new v(l,1),!1),y=(0,r.mS)(h,new v(l,1),!1),g=(0,r.mS)(h,new v(l,1),!1),p=(0,r.mS)(h,new v(l,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:w,maxOutlineRingCount:T}=function(t,e){const n=t.reduce((t,e)=>t+e,0),r=t.length,i=Math.max(0,t.length-1),s=Math.max(0,n+2*i-2),o=Math.max(0,Math.ceil(2*n)),h=Math.max(0,Math.ceil(3*s*2)),l=(0,a.mP)(h,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,u=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:l,maxOutlineIndexCount:e?Math.max(0,n+r+c):0,maxOutlineRingCount:e?Math.max(0,r+u):0}}(e,i);let M=0,A=0,S=0,L=0,k=0;{const t={stack:[],error:void 0,hasError:!1};try{const e=(0,r.mS)(t,new b(l,_*n),!1),s=(0,r.mS)(t,new v(l,m),!1),o=(0,r.mS)(t,i?new v(l,w):null,!1),a=(0,r.mS)(t,i?new v(l,T):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,e.ptr,_,n,s.ptr,m,x.ptr,y.ptr,o?.ptr??0,w,a?.ptr??0,T,g.ptr,p.ptr),k=l.getError(),M=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],A=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],S=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],L=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],0===k){const t=e.slice(0,M*n);return{vertices:t,indices:s.slice(0,A),outlineIndices:i&&o?o.slice(0,S):f.outlineIndices,outlineRingLengths:i&&a?a.slice(0,L):f.outlineRingLengths,vertexCount:M,indexCount:A,outlineIndexCount:i?S:0,outlineRingCount:i?L:0}}}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}if(100903!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",P(k)),f;const N=(0,r.mS)(h,new b(l,M*n),!1),B=(0,r.mS)(h,new v(l,A),!1),V=(0,r.mS)(h,i?new v(l,S):null,!1),z=(0,r.mS)(h,i?new v(l,L):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,N.ptr,M,n,B.ptr,A,x.ptr,y.ptr,V?.ptr??0,i?S:0,z?.ptr??0,i?L:0,g.ptr,p.ptr),k=l.getError(),0!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",P(k)),f;const C=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],R=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],E=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],D=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],F=N.slice(0,C*n);return{vertices:F,indices:B.slice(0,R),outlineIndices:i&&V?V.slice(0,E):f.outlineIndices,outlineRingLengths:i&&z?z.slice(0,D):f.outlineRingLengths,vertexCount:C,indexCount:R,outlineIndexCount:i?E:0,outlineRingCount:i?D:0}}catch(t){h.error=t,h.hasError=!0}finally{(0,r.hk)(h)}}function _(t){return t.HEAPF64}function m(t){return t.HEAPF32}function I(t){return t.HEAP32}class w{static from(t,e){const n=new w(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){m(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(n+t,n+e)}}class b{static from(t,e){const n=new b(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(t){_(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(n+t,n+e)}}class v{static from(t,e){const n=new v(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){I(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return function(t){const e=I(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(n+t,n+e)}}function P(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}},537(t,e,n){n.d(e,{B$:()=>g,LJ:()=>p,Pj:()=>I,Rg:()=>x,Yz:()=>_,z8:()=>y});var r=n(19419),i=n(79567),s=n(52006);function o(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function a(t){return void 0!==t.points}function h(t){return void 0!==t.x&&void 0!==t.y}function l(t){return void 0!==t.paths}function c(t){return void 0!==t.rings}function u(t){return function(e,n){return null==e?n:null==n?e:t(e,n)}}const f=u(Math.min),d=u(Math.max);function x(t,e){return l(e)?_(t,e.curvePaths??e.paths,!1,!1)??t:c(e)?_(t,e.curveRings??e.rings,!1,!1)??t:a(e)?I(t,e.points,!1,!1,!1,!1):o(e)?m(t,e):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.x,t[3]=e.y),t)}function y(t){let e,n,i,s;for(t.reset(),e=i=1/0,n=s=-1/0;t.nextPath();){const r=g(t);e=Math.min(r[0],e),i=Math.min(r[1],i),n=Math.max(r[2],n),s=Math.max(r[3],s)}return(0,r.vt)([e,i,n,s])}function g(t){let e,n,i,s;for(e=i=1/0,n=s=-1/0;t.nextPoint();)e=Math.min(t.x,e),i=Math.min(t.y,i),n=Math.max(t.x,n),s=Math.max(t.y,s);return(0,r.vt)([e,i,n,s])}function p(t,e){return l(e)?_(t,e.curvePaths??e.paths,!0,!1)??t:c(e)?_(t,e.curveRings??e.rings,!0,!1)??t:a(e)?I(t,e.points,!0,!1,!0,!1):o(e)?m(t,e,0,0,!0,!1):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.x,t[4]=e.y,t[5]=e.z),t)}function _(t,e,n,o){const a=n?3:2;if(!e.length||!e[0].length)return null;let h,l,c,u,[x,y]=(0,s.yP)(e[0][0]),g=x,p=y;for(let t=0;t<e.length;t++){const _=e[t];for(let t=0;t<_.length;t++){const e=(0,s.yP)(_[t]),[m,I]=e;if(x=f(x,m),y=f(y,I),g=d(g,m),p=d(p,I),n&&e.length>2){const t=e[2];h=f(h,t),l=d(l,t)}if(o&&e.length>a){const t=e[a];c=f(c,t),u=d(u,t)}const w=_[t];if((0,s.Xq)(w)||t<1)continue;const b=(0,s.yP)(_[t-1]),v=(0,r.fA)(x,y,g,p);[x,y,g,p]=(0,i.e)(v,b,w)}}return n?o?(t[0]=x,t[1]=y,t[2]=h,t[3]=c,t[4]=g,t[5]=p,t[6]=l,t[7]=u,t.length=8,t):(t[0]=x,t[1]=y,t[2]=h,t[3]=g,t[4]=p,t[5]=l,t.length=6,t):o?(t[0]=x,t[1]=y,t[2]=c,t[3]=g,t[4]=p,t[5]=u,t.length=6,t):(t[0]=x,t[1]=y,t[2]=g,t[3]=p,t.length=4,t)}function m(t,e,n,r,i,s){const o=e.xmin,a=e.xmax,h=e.ymin,l=e.ymax;let c=e.zmin,u=e.zmax,f=e.mmin,d=e.mmax;return i?(c=c||0,u=u||0,s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=c,t[3]=f,t[4]=a,t[5]=l,t[6]=u,t[7]=d,t):(t[0]=o,t[1]=h,t[2]=c,t[3]=a,t[4]=l,t[5]=u,t)):s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=f,t[3]=a,t[4]=l,t[5]=d,t):(t[0]=o,t[1]=h,t[2]=a,t[3]=l,t)}function I(t,e,n,r,i,s){const o=n?3:2,a=r&&s,h=n&&i;if(!e.length||!e[0].length)return null;let l,c,u,x,[y,g]=e[0],[p,_]=e[0];for(let t=0;t<e.length;t++){const n=e[t],[r,i]=n;if(y=f(y,r),g=f(g,i),p=d(p,r),_=d(_,i),h&&n.length>2){const t=n[2];l=f(l,t),c=d(c,t)}if(a&&n.length>o){const t=n[o];u=f(l,t),x=d(c,t)}}return i?(l=l||0,c=c||0,s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=l,t[3]=u,t[4]=p,t[5]=_,t[6]=c,t[7]=x,t):(t[0]=y,t[1]=g,t[2]=l,t[3]=p,t[4]=_,t[5]=c,t)):s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=u,t[3]=p,t[4]=_,t[5]=x,t):(t[0]=y,t[1]=g,t[2]=p,t[3]=_,t)}},12359(t,e,n){n.d(e,{IK:()=>c,TP:()=>u,Ve:()=>a,Z4:()=>s,l8:()=>o,w2:()=>l});var r=n(51118),i=n(95108);function s({xmin:t,xmax:e,ymin:n,ymax:r,zmin:i,zmax:s,hasZ:o}){const a=[(t+e)/2,(n+r)/2];return o&&a.push((i+s)/2),a}function o(t){return function(t,e){if(!t?.length)return null;const n=[],r=[],s=e?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let n=0,i=t.length;n<i;n++){const i=h(t[n],e,s);i&&r.push(i)}if(r.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),r.length&&(n[0]=r[0][0],n[1]=r[0][1],e&&(n[2]=r[0][3]),(n[0]<s[0]||n[0]>s[1]||n[1]<s[2]||n[1]>s[3]||e&&(n[2]<s[4]||n[2]>s[5]))&&(n.length=0)),!n.length){const r=t[0]&&t[0].length?function(t,e){const n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;for(let l=0,c=t.length;l<c-1;l++){const c=t[l],u=t[l+1];if(c&&u){n[0]=c[0],n[1]=c[1],r[0]=u[0],r[1]=u[1],e&&c.length>2&&u.length>2&&(n[2]=c[2],r[2]=u[2]);const t=(0,i.R3)(n,r);if(t){s+=t;const n=(0,i.t9)(c,u);o+=t*n[0],a+=t*n[1],e&&n.length>2&&(h+=t*n[2])}}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],e):null;if(!r)return null;n[0]=r[0],n[1]=r[1],e&&r.length>2&&(n[2]=r[2])}return n}(t.rings,t.hasZ??!1)}function a(t){const e=o(t);if(!e)return null;const{hasZ:n,spatialReference:r}=t,[i,s,a]=e;return isNaN(i)||isNaN(s)||n&&isNaN(a)?null:{x:i,y:s,z:n?a:void 0,spatialReference:r}}function h(t,e,n){let r=0,i=0,s=0,o=0,a=0;const h=t.length?t[0][0]:0,l=t.length?t[0][1]:0,c=t.length&&e?t[0][2]:0;for(let u=0;u<t.length;u++){const f=t[u],d=t[(u+1)%t.length],[x,y,g]=f,p=x-h,_=y-l,[m,I,w]=d,b=m-h,v=I-l,P=p*v-b*_;if(o+=P,r+=(p+b)*P,i+=(_+v)*P,e&&f.length>2&&d.length>2){const t=g-c,e=w-c,n=p*e-b*t;s+=(t+e)*n,a+=n}x<n[0]&&(n[0]=x),x>n[1]&&(n[1]=x),y<n[2]&&(n[2]=y),y>n[3]&&(n[3]=y),e&&(g<n[4]&&(n[4]=g),g>n[5]&&(n[5]=g))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const u=[r/(6*o)+h,i/(6*o)+l,o];return e&&(n[4]===n[5]||0===a?(u[3]=(n[4]+n[5])/2,u[4]=0):(u[3]=s/(6*a)+c,u[4]=a)),u}function l(t,e){let n=0,r=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;a<t.pathSize;a++){t.seekInPath(a);const h=[t.x,t.y];t.seekInPath((a+1)%t.pathSize);const l=[t.x,t.y],[c,u]=h,f=c-s,d=u-o,[x,y]=l,g=x-s,p=y-o,_=f*p-g*d;i+=_,n+=(f+g)*_,r+=(d+p)*_,c<e[0]&&(e[0]=c),c>e[1]&&(e[1]=c),u<e[2]&&(e[2]=u),u>e[3]&&(e[3]=u)}return i>0&&(i*=-1),i?(i*=.5,[n/(6*i)+s,r/(6*i)+o,i]):null}function c(t){const{hasZ:e,totalSize:n}=t;if(0===n)return null;const s=[],o=[],a=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const e=h((0,r.A)(t),t.hasZ,a);e&&o.push(e)}if(o.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),o.length&&(s[0]=o[0][0],s[1]=o[0][1],e&&(s[2]=o[0][3]),(s[0]<a[0]||s[0]>a[1]||s[1]<a[2]||s[1]>a[3]||e&&(s[2]<a[4]||s[2]>a[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const n=t.pathSize?function(t){const{hasZ:e}=t,n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;if(t.nextPoint()){let l=t.x,c=t.y,u=t.z;for(;t.nextPoint();){const f=t.x,d=t.y,x=t.z;n[0]=l,n[1]=c,r[0]=f,r[1]=d,e&&(n[2]=u,r[2]=x);const y=(0,i.R3)(n,r);if(y){s+=y;const t=(0,i.t9)(n,r);o+=y*t[0],a+=y*t[1],e&&t.length>2&&(h+=y*t[2])}l=f,c=d,u=x}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!n)return null;s[0]=n[0],s[1]=n[1],e&&n.length>2&&(s[2]=n[2])}return s}function u(t){let e=0;for(t.reset();t.nextPath();)e+=t.getCurrentRingArea();if(e<1e-6){const e=c(t);return e?[e[0],e[1]]:null}const n=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)d(n,r,t);return n[0]*=1/e,n[1]*=1/e,n[0]+=r[0],n[1]+=r[1],n}const f=1/3;function d(t,e,n){if(!t||!n||n.pathSize<3)return null;n.nextPoint();const r=n.x,i=n.y;n.nextPoint();let s,o=n.x-r,a=n.y-i,h=0,l=0;for(;n.nextPoint();)h=n.x-r,l=n.y-i,s=.5*f*(h*a-l*o),t[0]+=s*(o+h),t[1]+=s*(a+l),o=h,a=l;const c=n.getCurrentRingArea(),u=[r,i];return u[0]-=e[0],u[1]-=e[1],u[0]*=c,u[1]*=c,t[0]+=u[0],t[1]+=u[1],t}},95108(t,e,n){n.d(e,{$3:()=>c,Ng:()=>a,R3:()=>i,Xf:()=>o,Yl:()=>l,gR:()=>s,m3:()=>f,t9:()=>h});var r=n(4576);function i(t,e){const n=e[0]-t[0],r=e[1]-t[1];if(t.length>2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}return Math.sqrt(n*n+r*r)}function s(t,e,n,r){const[i,s]=e,[o,a]=n,[h,l]=r,c=h-o,u=l-a,f=c*c+u*u,d=(i-o)*c+(s-a)*u,x=Math.min(1,Math.max(0,d/f));return t[0]=o+c*x,t[1]=a+u*x,t}function o(t,e,n){let r,i,s,o,h=!1,l=1/0;for(n.reset();n.nextPath();)if(n.nextPoint())for(r=n.x,i=n.y;n.nextPoint();)s=n.x,o=n.y,i>e!=o>e&&t<(s-r)*(e-i)/(o-i)+r&&(h=!h),l=Math.min(l,a(t,e,r,i,s,o)),r=s,i=o;return 0===l?0:(h?1:-1)*Math.sqrt(l)}function a(t,e,n,r,i,s){let o=n,a=r,h=i-o,l=s-a;if(0!==h||0!==l){const n=((t-o)*h+(e-a)*l)/(h*h+l*l);n>1?(o=i,a=s):n>0&&(o+=h*n,a+=l*n)}return h=t-o,l=e-a,h*h+l*l}function h(t,e){return function(t,e,n){const r=t[0]+n*(e[0]-t[0]),i=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[r,i,t[2]+n*(e[2]-t[2])]:[r,i]}(t,e,.5)}function l(t){const e=t.length;let n=0;for(let r=0;r<e-1;++r)n+=i(t[r],t[r+1]);return n}function c(t,e=0,n=1){let r=0;const i=t.length;let s=t[0];for(let o=1;o<i;o++){const i=t[o];r+=(i[e]-s[e])*(i[n]+s[n]),s=i}if(u(t)){const i=t[0];r+=(i[e]-s[e])*(i[n]+s[n])}return r>=0}function u(t){const e=t.length;return e>0&&!(0,r.aI)(t[0],t[e-1])}function f(t){if("rings"in t)for(const e of t.rings)u(e)&&e.push(e[0].slice())}n(52006)},52006(t,e,n){function r(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"curveRings"in t?t.curveRings:t.curvePaths}function s(t){return"b"in t}function o(t){return"c"in t}function a(t){return Array.isArray(t)}function h(t){return"a"in t}function l(t){return"a"in t&&4===t.a.length}function c(t){return"a"in t&&7===t.a.length}function u(t,e){return i(t).flat().some(t=>function(t,e){return!(a(t)||(s(t)?e.has("cubic-bezier"):o(t)?e.has("circular-arc"):!l(t)&&!c(t)||e.has("elliptic-arc")))}(t,e))}function f(t){return a(t)?t:s(t)?t.b[0]:o(t)?t.c[0]:t.a[0]}function d(t){if(s(t)){const[e,n,r]=t.b;return{b:[[...e],[...n],[...r]]}}if(o(t)){const[e,n]=t.c;return{c:[[...e],[...n]]}}if(a(t))return[...t];if(l(t)){const[e,n,r,i]=t.a;return{a:[[...e],[...n],r,i]}}if(c(t)){const[e,n,r,i,s,o,a]=t.a;return{a:[[...e],[...n],r,i,s,o,a]}}return t}n.d(e,{DA:()=>l,Ed:()=>r,FD:()=>i,FG:()=>h,V8:()=>u,Xq:()=>a,aO:()=>o,n1:()=>s,tk:()=>d,wY:()=>c,yP:()=>f}),n(4576)},78957(t,e,n){n.d(e,{d:()=>c,R:()=>w});class r{constructor(t=i){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;const{_data:e,_compare:n}=this;e.push(t);let r=e.length-1>>>0;const i=e[r];for(;r>0;){const t=r-1>>1,s=e[t];if(!(n(s,i)<=0))break;e[t]=i,e[r]=s,r=t}}dequeue(){const{_data:t,_compare:e}=this,n=t[0],r=t.pop();if(0===t.length)return n;t[0]=r;let i=0;const s=t.length,o=t[0];let a,h,l=null;for(;;){const n=2*i+1,r=2*i+2;if(l=null,n<s&&(a=t[n],e(a,o)>0&&(l=n)),r<s&&(h=t[r],(null===l&&e(h,o)<=0||null!==l&&e(h,a)<=0)&&(l=r)),null===l)break;t[i]=t[l],t[l]=o,i=l}return n}}const i=(t,e)=>t<e?-1:t>e?1:0;var s=n(19419),o=n(537),a=n(12359),h=n(95108),l=n(12176);function c(t){if(0===t.totalSize)return null;const e=(0,o.z8)(t);if(!e)return null;const n=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let r=0,i=0;t.reset();for(let e=0;t.nextPath();e++){const n=t.getCurrentRingArea();n>i&&(i=n,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();const h=(0,o.B$)(t);if(Math.abs(i)<=2*n*n)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const l=(0,a.w2)(t,(0,s.vt)());if(null===l)return null;if(t.totalPoints<4)return l;const c=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],x=[NaN,NaN,NaN,NaN],y=[NaN,NaN,NaN,NaN];let g=!1,I=f(l,t,!0);0===I.distance&&(g=!0,c[0][0]=l[0],c[0][1]=l[1],I=f(l,t,!1)),x[0]=I.distance,y[0]=0;const w=[NaN,NaN];let b=!1,v=.25,P=-1,T=NaN;do{if(T=NaN,c[1]=d(t,p(h[0],h[2],v),0,e),isNaN(c[1][0])||isNaN(c[1][1])||(I=f(c[1],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[1],t))b=!0,x[1]=T,y[1]=_(c[1],l);else if(!isNaN(T)&&T>P&&(P=T,w[0]=c[1][0],w[1]=c[1][1]),v-=.01,v<.1){if(!(P>=0))break;b=!0,x[1]=P,c[1][0]=w[0],c[1][1]=w[1],y[1]=_(c[1],l)}}while(!b);b=!1,v=.5,P=-1;let M=.01,A=1;do{if(T=NaN,c[2]=d(t,p(h[0],h[2],v),0,e),isNaN(c[2][0])||isNaN(c[2][1])||(I=f(c[2],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[2],t))b=!0,x[2]=T,y[2]=_(c[2],l);else if(!isNaN(T)&&T>P)P=T,w[0]=c[2][0],w[1]=c[2][1];else if(T>P&&(P=T,w[0]=c[2][0],w[1]=c[2][1]),v=.5+M*A,M+=.01,A*=-1,v<.3||v>.7){if(!(P>=0))break;b=!0,x[2]=P,c[2][0]=w[0],c[2][1]=w[1],y[2]=_(c[2],l)}}while(!b);b=!1,v=.75,P=-1;do{if(T=NaN,c[3]=d(t,p(h[0],h[2],v),0,e),isNaN(c[3][0])||isNaN(c[3][1])||(I=f(c[3],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[3],t))b=!0,x[3]=T,y[3]=_(c[3],l);else if(T>P&&(P=T,w[0]=c[3][0],w[1]=c[3][1]),v+=.01,v>.9){if(!(P>=0))break;b=!0,x[3]=P,c[3][0]=w[0],c[3][1]=w[1],y[3]=_(c[3],l)}}while(!b);const S=[0,1,2,3],L=g?0:1;let k;for(let t=L;t<4;t++)for(let t=L;t<3;t++){const e=y[t],n=y[t+1];m(e,n)>0&&(k=S[t],S[t]=S[t+1],S[t+1]=k,y[t]=n,y[t+1]=e)}let N=L,B=0,V=0;for(let t=L;t<4;t++){switch(t){case 0:V=2*x[S[t]];break;case 1:V=1.66666666*x[S[t]];break;case 2:V=1.33333333*x[S[t]];break;case 3:V=x[S[t]]}V>B&&(B=V,N=S[t])}return c[N]}function u(t,e){let n,r,i,s,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(n=e.x,r=e.y;e.nextPoint();n=i,r=s)i=e.x,s=e.y,r>t[1]!=s>t[1]&&((i-n)*(t[1]-r)-(s-r)*(t[0]-n)>0?o++:o--);return 0!==o}function f(t,e,n){if(n&&u(t,e))return{coord:t,distance:0};let r=1/0,i=0,s=0,o=[0,0],a=[0,0];const l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=a){a=[e.x,e.y],(0,h.gR)(l,t,o,a);const n=_(t,l);n<r&&(r=n,i=l[0],s=l[1])}return{coord:[i,s],distance:Math.sqrt(r)}}function d(t,e,n,r){const i=[e,0];let o=1/0,a=1/0,h=!1,c=!1;const u=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],g=[0,0],p=[[0,0],[0,0]],_=(0,s.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(p[0][0]=t.x,p[0][1]=t.y;t.nextPoint();p[0][0]=p[1][0],p[0][1]=p[1][1]){if(p[1][0]=t.x,p[1][1]=t.y,null===x(_,p))continue;if(d[0]=u[0][0],d[1]=u[0][1],g[0]=u[1][0],g[1]=u[1][1],0===y(_,d,g))continue;if(!(0,l.Ql)(u[0],u[1],p[0],p[1],f))continue;const e=f[1];o>a?e<o&&(o=e,h=!0):e<a&&(a=e,c=!0)}return h&&c?i[1]=(o+a)/2:i[0]=i[1]=NaN,i}function x(t,e){if(e.length<2)return null;t||(t=(0,s.vt)());const[n,r]=e[0],[i,o]=e[1];return t[0]=Math.min(n,i),t[1]=Math.min(r,o),t[2]=Math.max(n,i),t[3]=Math.max(r,o),t}function y(t,e,n){let r=g(e,t),i=g(n,t);const s=t[0],o=t[1],a=t[2],h=t[3];if(r&i)return 0;if(!(r|i))return 4;const l=(r?1:0)|(i?2:0);do{const l=n[0]-e[0],c=n[1]-e[1];if(l>c)3&r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):3&i?(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)):r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t));else if(12&r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):12&i?(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t)):r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)),r&i)return 0}while(r|i);return l}function g(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function p(t,e,n){return t+(e-t)*n}function _(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function m(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const n=isNaN(t),r=isNaN(e);return n<r?-1:n>r?1:0}class I{constructor(t,e,n,r){this.x=t,this.y=e,this.cellSize=n,this.distancefromCellCenter=(0,h.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function w(t){if(!t.nextPath()||!t.pathSize)return null;const e=(0,o.B$)(t),n=e[2]-e[0],i=e[3]-e[1];if(0===n||0===i)return[e[0]+n/2,e[1]+i/2];const s=Math.max(Math.min(n,i)/100,1),h=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(n,i);let c=l/2,u=0,f=0;for(u=e[0];u<e[2];u+=l)for(f=e[1];f<e[3];f+=l)h.enqueue(new I(u+c,f+c,c,t));t.reset(),t.nextPath();const d=(0,a.IK)(t);if(null===d)return null;let x,y=new I(d[0],d[1],0,t);for(;h.size>0;)x=h.dequeue(),x.distancefromCellCenter>y.distancefromCellCenter&&(y=x),x.maxDistanceToPolygon-y.distancefromCellCenter<=s||(c=x.cellSize/2,h.enqueue(new I(x.x-c,x.y-c,c,t)),h.enqueue(new I(x.x+c,x.y-c,c,t)),h.enqueue(new I(x.x-c,x.y+c,c,t)),h.enqueue(new I(x.x+c,x.y+c,c,t)));return[y.x,y.y]}},97770(t,e,n){n.d(e,{Ey:()=>B,F8:()=>N,J2:()=>A,Yq:()=>L,_m:()=>S,iS:()=>k,wj:()=>V});var r=n(66552),i=n(73444),s=n(98623),o=n(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},h={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},l={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},f={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},x={hour:"numeric",minute:"numeric"},y={...x,second:"numeric"},g={hourCycle:"h23"},p={...x,...g},_={...y,...g},m={"short-date":c,"short-date-short-time":{...c,...x},"short-date-short-time-24":{...c,...p},"short-date-long-time":{...c,...y},"short-date-long-time-24":{...c,..._},"short-date-le":c,"short-date-le-short-time":{...c,...x},"short-date-le-short-time-24":{...c,...p},"short-date-le-long-time":{...c,...y},"short-date-le-long-time-24":{...c,..._},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...x},"long-month-day-year-short-time-24":{...u,...p},"long-month-day-year-long-time":{...u,...y},"long-month-day-year-long-time-24":{...u,..._},"day-short-month-year":f,"day-short-month-year-short-time":{...f,...x},"day-short-month-year-short-time-24":{...f,...p},"day-short-month-year-long-time":{...f,...y},"day-short-month-year-long-time-24":{...f,..._},"long-date":d,"long-date-short-time":{...d,...x},"long-date-short-time-24":{...d,...p},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":x,"long-time":y},I=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},b=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),v=b.find(({type:t})=>"month"===t)?.value.toLowerCase();function P(){const t=(0,i.lR)();return(t&&w[t])??(0,i.QC)()}"mart"!==v&&(w.bs="sr-Latn-CS");let T=new WeakMap;const M=m["short-date-short-time"];function A(t){return m[t]}function S(t){const{dateStyle:e,timeStyle:n,hour12:r,year:i,month:s}=t,o={};return e?o.dateStyle=e:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function L(t,e=M){return function(t){let e=T.get(t);if(!e){const n=P(),r=V(t.timeZone??"system"),i={...t,timeZone:r};e=new Intl.DateTimeFormat(n,i),T.set(t,e)}return e}(e).format(t)}function k(t,e=M){return L(new Date(t),{...e,...l,...h})}function N(t,e=M){return L(new Date(`1970-01-01T${t}Z`),{...e,...l,...a})}function B(t,e=M){const n=o.c9.fromISO(t,{setZone:!0});if(!n.isValid)return t;if(e.timeZone)return L(n.toJSDate(),e);const r=0===n.offset?"UTC":e.timeZone,i={...e,timeZone:r};return n.toLocaleString(i,{locale:P()})}function V(t){switch(t){case"system":return s.N;case s.L:return"UTC";default:return t}}(0,i.Ml)(()=>{T=new WeakMap}),n.d(e,["_v",0,I])},73444(t,e,n){n.d(e,{JK:()=>h,Ml:()=>g,QC:()=>u,lR:()=>c,oQ:()=>x});var r=n(36563);let i;n(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){const t=o?.getAttribute("lang"),e=globalThis.navigator?.language;return s??t??e??"en"}function h(){return void 0===i&&(i=a()),i}const l=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(t=h()){return f(t)?.language}function u(t=h()){const e=f(t);return e?.language&&e?.extlang?t.replace(`${e.language}-`,""):t}function f(t=h()){return l.exec(t)?.groups}const d=[];function x(t){return d.push(t),(0,r.hA)(()=>{d.splice(d.indexOf(t),1)})}new Map;const y=[];function g(t){return y.push(t),(0,r.hA)(()=>y.splice(y.indexOf(t),1))}function p(){const t=a();i!==t&&([...y].forEach(e=>e(t)),i=t,[...d].forEach(e=>e(t)))}globalThis.addEventListener?.("languagechange",p),o&&new MutationObserver(()=>{p()}).observe(o,{attributeFilter:["lang"]})},92722(t,e,n){n.d(e,{A:()=>i});var r=n(69397);class i{constructor(t=[],e=[],n=!1,r=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:t,coords:e,hasZ:n,hasM:r}){return new i(t,e,n||!1,r||!1)}static fromRect([t,e,n,r]){const s=n-t,o=r-e;return new i([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,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let i=this.coords[r*e],s=this.coords[r*e+1];for(let o=1;o<n;o+=1){const n=r*(e+o),a=this.coords[n],h=this.coords[n+1];t+=-.5*(a-i)*(h+s),i=a,s=h}e+=n}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=n*(e+i);t(this.coords[r],this.coords[r+1])}e+=r}}deltaDecode(){const t=this.clone(),{coords:e,lengths:n}=t;let r=0;const{stride:i}=this;for(const t of n){for(let n=1;n<t;n++){const t=i*(r+n);e[t]+=e[t-i],e[t+1]+=e[t+1-i]}r+=t}return t}clone(t){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return t?(t.set(s),new i(e,t,this.hasZ,this.hasM)):new i(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const n=new Array(e*t);for(let e=0,r=0;e<n.length;e+=t)n[r++]=this.coords[e],n[r++]=this.coords[e+1];return new i(this.lengths,n,!1,!1)}}},98623(t,e,n){const r=Intl.DateTimeFormat().resolvedOptions().timeZone;n.d(e,["L",0,"unknown","N",0,r])},36984(t,e,n){n.r(e),n.d(e,{default:()=>X});var r=n(17676),i=n(29953),s=n(6774),o=n(13195);function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function h(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function l(t){switch(t){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);class f{constructor(t,e,n,r,i,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=i,this._vAnchor=s,this._justify=o}getShaping(t,e,n){const r=this._letterSpacing,i=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let f=0,d=0;for(const e of t){const t=e.codePointAt(0);if(null==t)continue;const i=n&&a(t);let s;for(const e of this._glyphItems)if(s=e[t],s)break;u.push({codePoint:t,x:f,y:d,vertical:i,glyphItem:s}),s&&(f+=s.shaping.xAdvance+r)}let x=f;o>0&&(x=f/Math.max(1,Math.ceil(f/o)));const y=t.includes("​"),g=[],p=u.length;for(let t=0;t<p-1;t++){const e=u[t].codePoint,n=h(e);if(l(e)||n){let r=0;if(10===e)r-=1e4;else if(n&&y)r+=150;else{40!==e&&65288!==e||(r+=50);const n=u[t+1].codePoint;41!==n&&65289!==n||(r+=50)}g.push(this._buildBreak(t+1,u[t].x,x,g,r,!1))}}const _=this._optimalBreaks(this._buildBreak(p,f,x,g,0,!0));let m=0;const I=e?-i:i;let w=0;for(let t=0;t<_.length;t++){const e=_[t];let n=w;for(;n<e&&c(u[n].codePoint);)u[n].glyphItem=null,++n;let r=e-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphItem=null,--r;if(n<=r){const t=u[n].x;for(let e=n;e<=r;e++)u[e].x-=t,u[e].y=d;let e=u[r].x;u[r].glyphItem&&(e+=u[r].glyphItem.shaping.xAdvance),m=Math.max(e,m),s&&this._applyJustification(u,n,r)}w=e,d+=I}if(u.length>0){const t=_.length-1,n=(s-this._hAnchor)*m;let r=(-this._vAnchor*(t+1)+.5)*i;e&&t&&(r+=t*i);for(const t of u)t.x+=n,t.y+=r}return u.filter(t=>t.glyphItem)}static getTextBox(t,e){if(!t.length)return null;let n=1/0,r=1/0,i=0,s=0;for(const o of t){const t=o.glyphItem.shaping.xAdvance,a=o.x,h=o.y-17,l=a+t,c=h+e;n=Math.min(n,a),i=Math.max(i,l),r=Math.min(r,h),s=Math.max(s,c)}return{x:n,y:r,width:i-n,height:s-r}}static getBox(t){if(!t.length)return null;let e=1/0,n=1/0,r=0,i=0;for(const s of t){const{height:t,left:o,top:a,width:h}=s.glyphItem.rect,l=s.x,c=s.y-(t-Math.abs(a)),u=l+h+o,f=c+t;e=Math.min(e,l),r=Math.max(r,u),n=Math.min(n,c),i=Math.max(i,f)}return{x:e,y:n,width:r-e,height:i-n}}static addDecoration(t,e){const n=t.length;if(0===n)return;const r={rect:new u.A(4,0,4,8),sdf:!0,page:0};let i=t[0].x+t[0].glyphItem.rect.left,s=t[0].y;for(let o=1;o<n;o++){const n=t[o];if(n.y!==s){const a=t[o-1].x+t[o-1].glyphItem.rect.left+t[o-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:a-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=n.y,i=n.x+n.glyphItem.rect.left}}const o=t[n-1].x+t[n-1].glyphItem.rect.left+t[n-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:o-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(t,e,n,r){const i=(t-e)*(t-e);return r?t<e?i/2:2*i:i+Math.abs(n)*n}_buildBreak(t,e,n,r,i,s){let o=null,a=this._breakScore(e,n,i,s);for(const t of r){const r=e-t.x,h=this._breakScore(r,n,i,s)+t.score;h<=a&&(o=t,a=h)}return{index:t,x:e,score:a,previousBreak:o}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,n){const r=t[n],i=r.vertical?24:r.glyphItem?r.glyphItem.shaping.xAdvance:0,s=(r.x+i)*this._justify;for(let r=e;r<=n;r++)t[r].x-=s}}const d=.5;class x{constructor(t,e,n=0,r=-1,i=d){this.x=t,this.y=e,this.angle=n,this.segment=r,this.minzoom=i}}class y{constructor(t,e,n,r,i,s=d,a=o.MG){this.anchor=t,this.labelAngle=e,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=i,this.minzoom=s,this.maxzoom=a}}class g{constructor(t,e,n,r,i,s,o,a,h,l,c,u){this.tl=t,this.tr=e,this.bl=n,this.br=r,this.mosaicRect=i,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=h,this.minzoom=l,this.maxzoom=c,this.page=u}}class p{constructor(t){this.shapes=t}}class _{getIconPlacement(t,e,n){const r=new s.bR(t.x,t.y),i=0===n.rotationAlignment,a=n.keepUpright;let h=n.rotate*o.os;i&&(h+=t.angle);const l=new p([]);return l.iconColliders=[],this._addIconPlacement(l,r,e,n,h),i&&a&&this._addIconPlacement(l,r,e,n,h+o.Jo),l}_addIconPlacement(t,e,n,r,i){const a=n.rasterizationScale,h=n.width/a,l=n.height/a,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=h/2,f-=l/2;break;case 1:f-=l/2;break;case 2:u-=h,f-=l/2;break;case 3:u-=h/2;break;case 4:u-=h/2,f-=l;break;case 5:break;case 7:f-=l;break;case 6:u-=h;break;case 8:u-=h,f-=l}const x=n.rect,y=2/a,p=u-y,_=f-y,m=p+x.width/a,I=_+x.height/a,w=new s.bR(p,_),b=new s.bR(m,I),v=new s.bR(p,I),P=new s.bR(m,_);if(0!==i){const t=Math.cos(i),e=Math.sin(i);w.rotate(t,e),b.rotate(t,e),v.rotate(t,e),P.rotate(t,e)}const T=new g(w,P,v,b,x,i,0,256,e,d,o.MG,0);t.shapes.push(T);{const n=r.size,s=r.padding,a={xTile:e.x,yTile:e.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:h*n+2*s,height:l*n+2*s,angle:i,minLod:d,maxLod:o.MG};t.iconColliders.push(a)}}getTextPlacement(t,e,n,r){const i=new s.bR(t.x,t.y),{keepUpright:a,rotate:h,rotationAlignment:l,size:c}=r,u=h*o.os,x=0===l,_=a,m=r.padding;let I=d;const w=x?t.angle:0,b=t.segment>=0&&x,v=[],P=[],T=!b;let M=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=M,L=A;const k=(b||x)&&_,N=c/24;let B=!1;for(const t of e)if(t.vertical){B=!0;break}let V,z=0,C=0;if(!b&&B){const t=f.getTextBox(e,24*r.lineHeight);switch(r.anchor){case 1:z=t.height/2,C=-t.width/2;break;case 2:z=-t.height/2,C=t.width/2;break;case 3:z=t.height/2,C=t.width/2;break;case 4:z=-t.height/2,C=-t.width/2;break;case 5:z=t.height;break;case 7:C=-t.width;break;case 6:C=t.width;break;case 8:z=-t.height}}z+=24*r.offset[0],C+=24*r.offset[1];for(const a of e){const e=a.glyphItem?.mosaicItem,h=a.glyphItem?.rect;if(!e||e.rect.isEmpty)continue;const l=e.rect,c=e.page;if(v&&T){if(void 0!==V&&V!==a.y){let e,n,i,s;B?(e=-L+z,n=M+C,i=L-S,s=A-M):(e=M+z,n=S+C,i=A-M,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};v.push(a),M=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=M,L=A}V=a.y}const f=[];if(b){const e=.5*h.width,r=(a.x+h.left-3+e)*N*8;if(I=this._placeGlyph(t,I,r,n,t.segment,1,a.vertical,c,f),_&&(I=this._placeGlyph(t,I,r,n,t.segment,-1,a.vertical,c,f)),I>=2)break}else f.push(new y(i,w,w,c,!1)),x&&_&&f.push(new y(i,w+o.Jo,w+o.Jo,c,!1));const p=a.x+h.left,R=a.y-17-h.top,E=p+h.width,D=R+h.height;let F,U,O,Z,G,Y,W,q;if(!b&&B)if(a.vertical){const t=(p+E)/2-h.height/2,e=(R+D)/2+h.width/2;F=new s.bR(-e-3+z,t-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),Z=new s.bR(U.x,F.y)}else F=new s.bR(3-R+z,p-3+C),U=new s.bR(F.x-l.height,F.y+l.width),O=new s.bR(U.x,F.y),Z=new s.bR(F.x,U.y);else F=new s.bR(p-3+z,R-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),Z=new s.bR(U.x,F.y);for(const e of f){let n,i,o,c;if(e.alternateVerticalGlyph){if(!G){const t=(R+D)/2+C;G=new s.bR((p+E)/2+z-h.height/2-3,t+h.width/2+3),Y=new s.bR(G.x+l.height,G.y-l.width),W=new s.bR(Y.x,G.y),q=new s.bR(G.x,Y.y)}n=G,i=W,o=q,c=Y}else n=F,i=O,o=Z,c=U;const f=R,d=D,x=e.glyphAngle+u;if(0!==x){const t=Math.cos(x),e=Math.sin(x);n=n.clone(),i=i?.clone(),o=o?.clone(),c=c?.clone(),n.rotate(t,e),c?.rotate(t,e),i?.rotate(t,e),o?.rotate(t,e)}let y=0,_=256;if(b&&B?a.vertical?e.alternateVerticalGlyph?(y=32,_=96):(y=224,_=32):(y=224,_=96):(y=192,_=64),P.push(new g(n,o,i,c,l,e.labelAngle,y,_,e.anchor,e.minzoom,e.maxzoom,e.page)),v&&(!k||this._legible(e.labelAngle)))if(T)p<M&&(M=p),f<S&&(S=f),E>A&&(A=E),d>L&&(L=d);else if(e.minzoom<2){const n={xTile:t.x,yTile:t.y,dxPixels:(p+z)*N-m,dyPixels:(f+z)*N-m,hard:!r.optional,partIndex:1,width:(E-p)*N+2*m,height:(d-f)*N+2*m,angle:x,minLod:e.minzoom,maxLod:e.maxzoom};v.push(n)}}}if(I>=2)return null;if(v&&T){let e,n,i,s;B?(e=-L+z,n=M+C,i=L-S,s=A-M):(e=M+z,n=S+C,i=A-M,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};v.push(a)}const R=new p(P);return v&&v.length>0&&(R.textColliders=v),R}_legible(t){const e=(0,o.z0)(t);return e<65||e>=193}_placeGlyph(t,e,n,r,i,a,h,l,c){let u=a;const f=u<0?(0,o.Wh)(t.angle+o.Jo,o.pJ):t.angle;let d=0;n<0&&(u*=-1,n*=-1,d=o.Jo),u>0&&++i;let x=new s.bR(t.x,t.y),g=r[i],p=o.MG;if(r.length<=i)return p;for(;;){const t=g.x-x.x,s=g.y-x.y,a=Math.sqrt(t*t+s*s),_=Math.max(n/a,e),m=t/a,I=s/a,w=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new y(x,f,w,l,!1,_,p)),h&&c.push(new y(x,f,w,l,!0,_,p)),_<=e)return _;x=g.clone();do{if(i+=u,r.length<=i||i<0)return _;g=r[i]}while(x.isEqual(g));let b=g.x-x.x,v=g.y-x.y;const P=Math.sqrt(b*b+v*v);b*=a/P,v*=a/P,x.x-=b,x.y-=v,p=_}}}var m=n(51624),I=n(15585);class w{constructor(t,e,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=e.keys,i=e.values,s=t.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const t=s.getMessage().asUnsafe(),e=this.values;for(;!t.empty();){const n=t.getUInt32(),s=t.getUInt32();e[r[n]]=i[s]}t.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,t?t.reset(this.type):n=[];let i,o=1,a=0,h=0,l=0;for(;!e.empty();){if(0===a){const t=e.getUInt32();o=7&t,a=t>>3}switch(a--,o){case 1:h+=e.getSInt32(),l+=e.getSInt32(),t?t.moveTo(h,l):n&&(r&&n.push(r),r=[],r.push(new s.bR(h,l)));break;case 2:h+=e.getSInt32(),l+=e.getSInt32(),t?t.lineTo(h,l):r&&r.push(new s.bR(h,l));break;case 7:t?t.close():r&&!r[0].equals(h,l)&&r.push(r[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?i=t.result():n&&(r&&n.push(r),i=n),e.release(),this._geometry=i,i}}n(44208);class b{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class v extends b{constructor(){super(12)}add(t,e,n){const r=this.array;r.push(t),r.push(e),r.push(n)}}class P{constructor(t){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();const e=t.asUnsafe();for(;e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(P._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}var T=n(89518);class M extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o,a,h,l,c,u){const f=this.array;let d=(0,T.M9)(t,e);f.push(d);const x=31;d=(0,T.Ss)(Math.round(x*n),Math.round(x*r),Math.round(x*i),Math.round(x*s)),f.push(d),d=(0,T.Ss)(Math.round(x*o),Math.round(x*a),Math.round(x*h),Math.round(x*l)),f.push(d),d=(0,T.M9)(c,0),f.push(d),u&&f.push(...u)}}class A extends b{constructor(t){super(t)}add(t,e,n){const r=this.array;r.push((0,T.M9)(t,e)),n&&r.push(...n)}}class S extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o){const a=this.array,h=this.index;let l=(0,T.M9)(t,e);return a.push(l),l=(0,T.Ss)(Math.round(15*n),Math.round(15*r),i,s),a.push(l),o&&a.push(...o),h}}class L extends b{constructor(t){super(t)}add(t,e,n,r,i,s,a,h,l,c,u,f){const d=this.array;let x=(0,T.M9)(t,e);d.push(x),x=(0,T.M9)(Math.round(8*n),Math.round(8*r)),d.push(x),x=(0,T.M9)((0,T.ws)(i/4,s/4),(0,T.ws)(h,l)),d.push(x),x=(0,T.M9)((0,T.ws)(0,(0,o.z0)(a)),(0,T.ws)(10*c,Math.min(10*u,255))),d.push(x),f&&d.push(...f)}}class k extends b{constructor(t){super(t)}add(t,e,n,r,i){const s=this.array,o=(0,T.M9)(2*t+n,2*e+r);s.push(o),i&&s.push(...i)}}class N{constructor(t,e,n){this.layerExtent=4096,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=n,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,n){}}class B extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=r.circleMaterial.encodeAttributes(s,i,r);for(const t of o)if(t)for(const r of t){const t=e.index;e.add(r.x,r.y,0,0,a),e.add(r.x,r.y,0,1,a),e.add(r.x,r.y,1,0,a),e.add(r.x,r.y,1,1,a),n.add(t,t+1,t+2),n.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._circleIndexStart,e[r++]=this._circleIndexCount,e[r++]=this._circleVertexBuffer.array.length;for(let t=0;t<this._circleVertexBuffer.array.length;t++)n[r++]=this._circleVertexBuffer.array[t];e[r++]=this._circleIndexBuffer.array.length;for(let t=0;t<this._circleIndexBuffer.array.length;t++)e[r++]=this._circleIndexBuffer.array[t];return e.buffer}}var V=n(98291),z=n(83349);class C extends N{constructor(t,e,n,r,i,s,o){super(t,e,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const t of this._features)e(s.getValue(i,t),!0);else e(s.getValue(i),!0)}processFeatures(t){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const e=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:i,hasDataDrivenFill:s,hasDataDrivenOutline:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("fill-pattern"),h=a?.isDataDriven;let l=!a&&e.getPaintValue("fill-antialias",n);if(e.outlineUsesFillColor){if(l&&!e.hasDataDrivenOpacity){const t=e.getPaintValue("fill-opacity",n),r=e.getPaintValue("fill-opacity",n+1);t<1&&r<1&&(l=!1)}if(l&&!e.hasDataDrivenColor){const t=e.getPaintValue("fill-color",n),r=e.getPaintValue("fill-color",n+1);t[3]<1&&r[3]<1&&(l=!1)}}const c=this._features,u=t?.validateTessellation;if(h){const s=[];for(const h of c){const c=a.getValue(n,h),u=this._spriteInfo[c];if(!u?.rect)continue;const f=r.encodeAttributes(h,n,e,u),d=l&&o?i.encodeAttributes(h,n,e):[],x=h.getGeometry(t);s.push({ddFillAttributes:f,ddOutlineAttributes:d,page:u.page,geometry:x}),s.sort((t,e)=>t.page-e.page)}for(const{ddFillAttributes:t,ddOutlineAttributes:n,page:r,geometry:i}of s)this._processFeature(i,l,e.outlineUsesFillColor,t,n,u,r)}else for(const a of c){const h=s?r.encodeAttributes(a,n,e):null,c=l&&o?i.encodeAttributes(a,n,e):null,f=a.getGeometry(t);this._processFeature(f,l,e.outlineUsesFillColor,h,c,u)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._fillIndexStart,e[r++]=this._fillIndexCount,e[r++]=this._outlineIndexStart,e[r++]=this._outlineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this._fillVertexBuffer.array.length;for(let t=0;t<this._fillVertexBuffer.array.length;t++)n[r++]=this._fillVertexBuffer.array[t];e[r++]=this._fillIndexBuffer.array.length;for(let t=0;t<this._fillIndexBuffer.array.length;t++)e[r++]=this._fillIndexBuffer.array[t];e[r++]=this._outlineVertexBuffer.array.length;for(let t=0;t<this._outlineVertexBuffer.array.length;t++)n[r++]=this._outlineVertexBuffer.array[t];e[r++]=this._outlineIndexBuffer.array.length;for(let t=0;t<this._outlineIndexBuffer.array.length;t++)e[r++]=this._outlineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n,r,i,s,o){if(!t)return;const a=t.length,h=!i||0===i.length;if(e&&(!n||h))for(let e=0;e<a;e++)this._processOutline(t[e],i);let l;for(let e=0;e<a;e++){const n=C._area(t[e]);n>32?(void 0!==l&&this._processFill(t,l,r,s,o),l=[e]):n<-32&&void 0!==l&&l.push(e)}void 0!==l&&this._processFill(t,l,r,s,o)}_processOutline(t,e){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let o,a,h;const l=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,y=-1,g=-1,p=!1,_=t.length;if(_<2)return;const m=t[0];let I=t[_-1];for(;_&&I.isEqual(m);)--_,I=t[_-1];if(!(_-0<2)){for(let i=0;i<_;++i){0===i?(o=t[_-1],a=t[0],h=t[1],l.assignSub(a,o),l.normalize(),l.rightPerpendicular()):(o=a,a=h,h=i!==_-1?t[i+1]:t[0],l.assign(c));const s=this._isClipEdge(o,a);-1===y&&(p=s),c.assignSub(h,a),c.normalize(),c.rightPerpendicular();const m=l.x*c.y-l.y*c.x;u.assignAdd(l,c),u.normalize();const I=-u.x*-l.x+-u.y*-l.y;let w=Math.abs(0!==I?1/I:1);w>8&&(w=8),m>=0?(x=n.add(a.x,a.y,l.x,l.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,w*-u.x,w*-u.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,u.x,u.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,c.x,c.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x)):(x=n.add(a.x,a.y,w*u.x,w*u.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,-l.x,-l.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,-u.x,-u.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=n.add(a.x,a.y,-c.x,-c.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x))}f>=0&&d>=0&&y>=0&&!p&&r.add(f,d,y),f>=0&&y>=0&&g>=0&&!p&&r.add(f,g,y),this._outlineIndexCount+=3*(r.index-i)}}_processFill(t,e,n,r,i){let s;e.length>1&&(s=[]);let o=0;for(const n of e)0!==o&&s.push(o),o+=t[n].length;const a=2*o,h=V.A.acquire();for(const n of e){const e=t[n],r=e.length;for(let t=0;t<r;++t)h.push(e[t].x,e[t].y)}const l=(0,z.e)(h,s,2);if(z.e.deviation(h,s,2,l)>0){const r=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=(0,I.QT)(h,r);if(o>0){const t=this._fillVertexBuffer.index;for(let t=0;t<o;t++)this._fillVertexBuffer.add(s[2*t],s[2*t+1],n);for(let e=0;e<o;e+=3){const n=t+e;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==i){const t=this._patternMap,e=t.get(i);e?e[1]+=o:t.set(i,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const t=l.length;if(t>0){const e=this._fillVertexBuffer.index;let r=0;for(;r<a;)this._fillVertexBuffer.add(h[r++],h[r++],n);let s=0;for(;s<t;)this._fillIndexBuffer.add(e+l[s++],e+l[s++],e+l[s++]);if(void 0!==i){const e=this._patternMap,n=e.get(i);n?n[1]+=t:e.set(i,[this._fillIndexStart+this._fillIndexCount,t])}this._fillIndexCount+=t}}V.A.release(h)}_isClipEdge(t,e){return t.x===e.x?t.x<=-64||t.x>=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const n=t.length-1;for(let r=0;r<n;r++)e+=(t[r].x-t[r+1].x)*(t[r].y+t[r+1].y);return e+=(t[n].x-t[0].x)*(t[n].y+t[0].y),.5*e}}var R=n(83773);class E extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new R.i(D(this.tessellationProperties),F(this.tessellationProperties),t.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("line-pattern"),o=r.getPaintProperty("line-dasharray"),a=r.getLayoutProperty("line-cap");if(!s&&!o)return;const h=a?.getValue(i)||0,l=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const t of this._features)e(c?s.getValue(i,t):this._getDashArrayKey(t,i,r,o,l,a,h));else if(s)e(s.getValue(i));else if(o){const t=o.getValue(i);e(r.getDashKey(t,h))}}processFeatures(t){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const e=this.layer,n=this.zoom,r=this._features,i=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("line-pattern"),h=e.getPaintProperty("line-dasharray"),l=a?.isDataDriven,c=h?.isDataDriven;let u;u=e.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:e.getLayoutValue("line-cap",n),x=d||0,y=!!f;u=e.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,p=g?null:e.getLayoutValue("line-join",n);u=e.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:e.getLayoutValue("line-miter-limit",n);u=e.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,w=I?null:e.getLayoutValue("line-round-limit",n);u=e.getPaintProperty("line-width");const b=u?.isDataDriven?u:null,v=b?null:e.getPaintValue("line-width",n);u=e.getPaintProperty("line-offset");const P=u?.isDataDriven?u:null,T=P?null:e.getPaintValue("line-offset",n);if(l||c){const s=[];for(const i of r){const r=l?a.getValue(n,i):this._getDashArrayKey(i,n,e,h,y,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=o.encodeAttributes(i,n,e,c),M=i.getGeometry(t);s.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,i):d,join:g?g.getValue(n,i):p,miterLimit:_?_.getValue(n,i):m,roundLimit:I?I.getValue(n,i):w,halfWidth:.5*(b?b.getValue(n,i):v),offset:P?P.getValue(n,i):T,geometry:M})}s.sort((t,e)=>t.page-e.page),i.textured=!0;for(const{ddAttributes:t,page:e,cap:n,join:r,miterLimit:o,roundLimit:a,halfWidth:h,offset:l,geometry:c}of s)i.capType=n,i.joinType=r,i.miterLimit=o,i.roundLimit=a,i.halfWidth=h,i.offset=l,this._processFeature(c,t,e)}else{if(a){const t=a.getValue(n),e=this._spriteInfo[t];if(!e?.rect)return}i.textured=!(!a&&!h),i.capType=d,i.joinType=p,i.miterLimit=m,i.roundLimit=w,i.halfWidth=.5*v,i.offset=T;for(const a of r){const r=s?o.encodeAttributes(a,n,e):null;f&&(i.capType=f.getValue(n,a)),g&&(i.joinType=g.getValue(n,a)),_&&(i.miterLimit=_.getValue(n,a)),I&&(i.roundLimit=I.getValue(n,a)),b&&(i.halfWidth=.5*b.getValue(n,a)),P&&(i.offset=P.getValue(n,a));const h=a.getGeometry(t);this._processFeature(h,r)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._lineIndexStart,e[r++]=this._lineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineVertexBuffer.array.length;t++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[t];e[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineIndexBuffer.array.length;t++)e[r++]=this.tessellationProperties._lineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n){if(!t)return;const r=t.length;for(let i=0;i<r;i++)this._processGeometry(t[i],e,n)}_processGeometry(t,e,n){if(t.length<2)return;let r,i,s=t[0],o=1;for(;o<t.length;)r=t[o].x-s.x,i=t[o].y-s.y,r*r+i*i<1e-6?t.splice(o,1):(s=t[o],++o);if(t.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,h=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=e,this._lineTessellator.tessellate(t,this._tessellationOptions);const l=3*a.index-h;if(void 0!==n){const t=this._patternMap,e=t.get(n);e?e[1]+=l:t.set(n,[h+this._lineIndexCount,l])}this._lineIndexCount+=l}_getDashArrayKey(t,e,n,r,i,s,o){const a=i?s.getValue(e,t):o,h=r.getValue(e,t);return n.getDashKey(h,a)}}const D=t=>(e,n,r,i,s,o,a,h,l,c,u)=>(t._lineVertexBuffer.add(e,n,a,h,r,i,s,o,l,c,u,t._ddValues),t._lineVertexBuffer.index-1),F=t=>(e,n,r)=>{t._lineIndexBuffer.add(e,n,r)};var U=n(32488),O=n(97768),Z=n(799),G=n(36745),Y=n(78957),W=n(92722);function q(t){let e=0;for(let n=0,r=t.length-1;n<t.length;r=n++)e+=(t[r].x-t[n].x)*(t[n].y+t[r].y);return.5*e}var j=n(4264);function K(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class J extends N{constructor(t,e,n,r,i,s,o,a,h){super(e,n,h.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=t,this._iconVertexBuffer=r,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new U.A}getResources(t,e,n){const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);const s=r.getLayoutProperty("icon-image"),o=r.getLayoutProperty("text-field");let a=r.getLayoutProperty("text-transform"),h=r.getLayoutProperty("text-font");const l=[];let c,u,f,d;s&&!s.isDataDriven&&(c=s.getValue(i)),o&&!o.isDataDriven&&(u=o.getValue(i)),a&&a.isDataDriven||(f=r.getLayoutValue("text-transform",i),a=null),h&&h.isDataDriven||(d=r.getLayoutValue("text-font",i),h=null);for(const x of this._features){const y=x.getGeometry(t);if(!y||0===y.length)continue;let g,p;s&&(g=s.isDataDriven?s.getValue(i,x):this._replaceKeys(c,x.values),g&&e(g));let _=!1;if(o&&(p=o.isDataDriven?o.getValue(i,x):this._replaceKeys(u,x.values),p)){switch(p=p.replaceAll("\\n","\n"),a&&(f=a.getValue(i,x)),f){case 2:p=p.toLowerCase();break;case 1:p=p.toUpperCase()}if(J._bidiEngine.hasBidiChar(p)){let t;t="rtl"===J._bidiEngine.checkContextual(p)?"IDNNN":"ICNNN",p=J._bidiEngine.bidiTransform(p,t,"VLYSN"),_=!0}if(p.length>0){h&&(d=h.getValue(i,x));for(const t of d){let e=n[t];e||(e=n[t]=new Set);for(const t of p){const n=t.codePointAt(0);null!=n&&e.add(n)}}}}if(!g&&!p)continue;const m=r.getLayoutValue("symbol-sort-key",i,x),I={feature:x,sprite:g,label:p,rtl:_,geometry:y,hash:(p?(0,Z.Wm)(p):0)^(g?(0,Z.Wm)(g):0),priority:m,textFont:d};l.push(I)}this._symbolFeatures=l}processFeatures(t){t&&t.setExtent(this.layerExtent);const e=this.layer,n=this.zoom,r=e.getLayoutValue("symbol-placement",n),i=0!==r,s=8*e.getLayoutValue("symbol-spacing",n),a=e.getLayoutProperty("icon-image"),h=e.getLayoutProperty("text-field"),l=a?new j.aR(e,n,i):null,c=h?new j.uU(e,n,i):null,u=this._workerTileHandler;let d;a&&(d=u.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const y=[];let g=1;c?.size&&(g=c.size/24);const p=c?c.maxAngle*o.os:0,_=c?8*c.size:0;for(const t of this._symbolFeatures){let o,a;l&&d&&t.sprite&&(o=d[t.sprite],o&&o.sdf&&(this._isIconSDF=!0)),o&&l.update(n,t.feature);let h=0;const m=t.label;if(m){(0,O.Lw)(c),c.update(n,t.feature);const e=i&&0===c.rotationAlignment?c.keepUpright:c.writingMode&&c.writingMode.includes(1);let r=.5;switch(c.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let s=.5;switch(c.anchor){case 5:case 3:case 6:s=0;break;case 7:case 4:case 8:s=1}let o=.5;switch(c.justify){case 0:o=r;break;case 1:o=0;break;case 3:o=1}const l=24*c.letterSpacing,d=i?0:24*c.maxWidth,x=24*c.lineHeight,y=t.textFont.map(t=>u.getGlyphItems(t));if(a=new f(y,d,x,l,r,s,o).getShaping(m,t.rtl,e),a&&a.length>0){let t=1e30,e=-1e30;for(const n of a)t=Math.min(t,n.x),e=Math.max(e,n.x);h=(e-t+48)*g*8}}const I=J._getPlacementCandidates(e,r,t.feature,t.geometry);for(const e of I){let{vertices:n}=e;const u=[];if(1===r){if(a?.length&&c?.size){const t=8*c.size*(2+Math.min(2,4*Math.abs(c.offset[1])));n=J._smoothVertices(n,t)}J._pushAnchors(u,n,s,h)}else 2===r?J._pushCenterAnchor(u,n):3===t.feature.type?e.anchor?u.push(e.anchor):J._pushCentroid(u,n):u.push(new x(n[0].x,n[0].y));for(const e of u){if(e.x<0||e.x>4096||e.y<0||e.y>4096)continue;if(i&&h>0&&0===c?.rotationAlignment&&!J._honorsTextMaxAngle(n,e,h,p,_))continue;const r={shaping:a,line:n,iconMosaicItem:o,anchor:e,symbolFeature:t,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};y.push(r),this._processFeature(r,l,c)}}}y.sort(K),this._addPlacedGlyphs(),this._symbolInstances=y}serialize(){let t=14;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=J._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer),r=new Float32Array(e.buffer),[i,s,o]=this._sourceTileKey.split("/");let a=0;e[a++]=this.type,e[a++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[a++]=this.layerUIDs[t];e[a++]=this._isIconSDF?1:0,e[a++]=parseFloat(i),e[a++]=parseFloat(s),e[a++]=parseFloat(o),e[a++]=this.markerPageMap.size;for(const[t,[n,r]]of this.markerPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this.glyphsPageMap.size;for(const[t,[n,r]]of this.glyphsPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this._iconVertexBuffer.index/4,e[a++]=this._textVertexBuffer.index/4,a=J.serializeSymbols(e,n,r,a,this._symbolInstances),e[a++]=this._iconVertexBuffer.array.length;for(let t=0;t<this._iconVertexBuffer.array.length;t++)n[a++]=this._iconVertexBuffer.array[t];e[a++]=this._iconIndexBuffer.array.length;for(let t=0;t<this._iconIndexBuffer.array.length;t++)e[a++]=this._iconIndexBuffer.array[t];e[a++]=this._textVertexBuffer.array.length;for(let t=0;t<this._textVertexBuffer.array.length;t++)n[a++]=this._textVertexBuffer.array[t];e[a++]=this._textIndexBuffer.array.length;for(let t=0;t<this._textIndexBuffer.array.length;t++)e[a++]=this._textIndexBuffer.array[t];return e.buffer}static _symbolsSerializationLength(t){let e=0;e+=1;for(const n of t||[]){e+=5,e+=1;for(const t of n.textColliders)e+=10;for(const t of n.iconColliders)e+=10;e+=1,e+=2*n.textVertexRanges.length,e+=1,e+=2*n.iconVertexRanges.length}return e}static serializeSymbols(t,e,n,r,i){i=i||[],e[r++]=i.length;for(const t of i){e[r++]=t.anchor.x,e[r++]=t.anchor.y,e[r++]=t.symbolFeature.hash,e[r++]=t.symbolFeature.priority,e[r++]=t.symbolFeature.feature.featureIndex,e[r++]=t.textColliders.length+t.iconColliders.length;for(const i of t.textColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;for(const i of t.iconColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;e[r++]=t.textVertexRanges.length;for(const[n,i]of t.textVertexRanges)e[r++]=n,e[r++]=i;e[r++]=t.iconVertexRanges.length;for(const[n,i]of t.iconVertexRanges)e[r++]=n,e[r++]=i}return r}_replaceKeys(t,e){return t.replaceAll(/{([^{}]+)}/g,(t,n)=>n in e?e[n]:"")}_processFeature(t,e,n){const{line:r,iconMosaicItem:i,shaping:s,anchor:a}=t,h=this.zoom,l=this.layer,c=!!i;let u=!0;c&&(u=e?.optional||!i);const f=s&&s.length>0,d=!f||n?.optional;let x,y;if(c&&(x=this._placementEngine.getIconPlacement(a,i,e)),(x||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,s,r,n)),y||d)){if(x&&y||(d||u?d||y?u||x||(y=null):x=null:(x=null,y=null)),y){const e=l.hasDataDrivenText?l.textMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._storePlacedGlyphs(t,y.shapes,h,n.rotationAlignment,e),y.textColliders){t.textColliders=y.textColliders;for(const t of y.textColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}if(x){const n=l.hasDataDrivenIcon?l.iconMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._addPlacedIcons(t,x.shapes,h,i.page,1===e.rotationAlignment,n),x.iconColliders){t.iconColliders=x.iconColliders;for(const t of x.iconColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}}}_addPlacedIcons(t,e,n,r,i,s){const a=Math.max(n-1,0),h=this._iconVertexBuffer,l=this._iconIndexBuffer,c=this._markerMap;for(const u of e){const e=i?0:Math.max(n+(0,o.p6)(u.minzoom),a),f=i?25:Math.min(n+(0,o.p6)(u.maxzoom),25);if(f<=e)continue;const d=u.tl,x=u.tr,y=u.bl,g=u.br,p=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,w=u.anchor,b=h.index,v=p.x,P=p.y,T=v+p.width,M=P+p.height,A=h.index;h.add(w.x,w.y,d.x,d.y,v,P,_,m,I,e,f,s),h.add(w.x,w.y,x.x,x.y,T,P,_,m,I,e,f,s),h.add(w.x,w.y,y.x,y.y,v,M,_,m,I,e,f,s),h.add(w.x,w.y,g.x,g.y,T,M,_,m,I,e,f,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===A?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([A,4]),l.add(b,b+1,b+2),l.add(b+1,b+2,b+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,n=this._glyphMap;for(const[r,i]of this._glyphBufferDataStorage)for(const s of i){const i=t.index,o=s.symbolInstance,a=s.ddAttributes,h=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===h?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([h,4]),e.add(i,i+1,i+2),e.add(i+1,i+2,i+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,n,r,i){const s=Math.max(n-1,0),a=1===r;let h,l,c,u,f,d,x,y,g,p,_;for(const r of e)h=a?0:Math.max(n+(0,o.p6)(r.minzoom),s),l=a?25:Math.min(n+(0,o.p6)(r.maxzoom),25),l<=h||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,y=r.minAngle,g=r.maxAngle,p=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[p.x,p.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:y,maxAngle:g,minLod:h,maxLod:l,placementLod:s,symbolInstance:t,ddAttributes:i}))}static _pushAnchors(t,e,n,r){n+=r;let i=0;const a=e.length-1;for(let t=0;t<a;t++)i+=s.bR.distance(e[t],e[t+1]);let h=r||n;if(h*=.5,i<=h)return;const l=h/i;let c=0,u=-(n=i/Math.max(Math.round(i/n),1))/2;const f=e.length-1;for(let r=0;r<f;r++){const i=e[r],s=e[r+1],a=s.x-i.x,h=s.y-i.y,f=Math.sqrt(a*a+h*h);let d;for(;u+n<c+f;){u+=n;const e=(u-c)/f,y=(0,o.GW)(i.x,s.x,e),g=(0,o.GW)(i.y,s.y,e);void 0===d&&(d=Math.atan2(h,a)),t.push(new x(y,g,d,r,l))}c+=f}}static _pushCenterAnchor(t,e){let n=0;const r=e.length-1;for(let t=0;t<r;t++)n+=s.bR.distance(e[t],e[t+1]);const i=n/2;let a=0;const h=e.length-1;for(let n=0;n<h;n++){const r=e[n],s=e[n+1],h=s.x-r.x,l=s.y-r.y,c=Math.sqrt(h*h+l*l);if(i<a+c){const e=(i-a)/c,u=(0,o.GW)(r.x,s.x,e),f=(0,o.GW)(r.y,s.y,e),d=Math.atan2(l,h);return void t.push(new x(u,f,d,n,0))}a+=c}}static _deviation(t,e,n){const r=(e.x-t.x)*(n.x-e.x)+(e.y-t.y)*(n.y-e.y),i=(e.x-t.x)*(n.y-e.y)-(e.y-t.y)*(n.x-e.x);return Math.atan2(i,r)}static _honorsTextMaxAngle(t,e,n,r,i){let o=0;const a=n/2;let h=new s.bR(e.x,e.y),l=e.segment+1;for(;o>-a;){if(--l,l<0)return!1;o-=s.bR.distance(t[l],h),h=t[l]}o+=s.bR.distance(t[l],t[l+1]);const c=[];let u=0;const f=t.length;for(;o<a;){const e=t[l];let n,a=l;do{if(++a,a===f)return!1;n=t[a]}while(n.isEqual(e));let h,d=a;do{if(++d,d===f)return!1;h=t[d]}while(h.isEqual(n));const x=this._deviation(e,n,h);for(c.push({deviation:x,distToAnchor:o}),u+=x;o-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;o+=s.bR.distance(n,h),l=a}return!0}static _smoothVertices(t,e){if(e<=0)return t;let n=t.length;if(n<3)return t;const r=[];let i=0,o=0;r.push(0);for(let e=1;e<n;e++){const n=s.bR.distance(t[e],t[e-1]);n>0&&(i+=n,r.push(i),o++,o!==e&&(t[o]=t[e]))}if(n=o+1,n<3)return t;e=Math.min(e,.2*i);const a=t[0].x,h=t[0].y,l=t[n-1].x,c=t[n-1].y,u=s.bR.sub(t[0],t[1]);u.normalize(),t[0].x+=e*u.x,t[0].y+=e*u.y,u.assignSub(t[n-1],t[n-2]),u.normalize(),t[n-1].x+=e*u.x,t[n-1].y+=e*u.y,r[0]-=e,r[n-1]+=e;const f=[];f.push(new s.bR(a,h));const d=1e-6,x=.5*e;for(let i=1;i<n-1;i++){let o=0,a=0,h=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const l=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/l;if(c<d)break;const u=c*c,f=c*s-.5*u*l,y=c*l/e,g=t[n+1],p=t[n].x-g.x,_=t[n].y-g.y;o+=y/f*(g.x*c*s+.5*u*(s*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*s+.5*u*(s*_-l*g.y)-u*c*l*_/3),h+=y}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const l=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/l;if(c<d)break;const u=c*c,f=c*n-.5*u*l,y=c*l/e,g=t[s-1],p=t[s].x-g.x,_=t[s].y-g.y;o+=y/f*(g.x*c*n+.5*u*(n*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*n+.5*u*(n*_-l*g.y)-u*c*l*_/3),h+=y}f.push(new s.bR(o/h,a/h))}return f.push(new s.bR(l,c)),t[0].x=a,t[0].y=h,t[n-1].x=l,t[n-1].y=c,f}static _getPlacementCandidates(t,e,n,r){if(0!==e||3!==n.type||"geojson"!==t.sourceType)return r.map(t=>({anchor:null,vertices:t}));const i=function(t){let e=null,n=0,r=[],i=0;for(const s of t){const t=q(s);t>0?(i>n&&(n=i,e=r),r=[s],i=t):t<0&&r.length>0&&(r.push(s),i+=t)}if(i>n&&(e=r),!e)return null;const s=e.map(t=>t.length),o=[];for(const t of e)for(const e of t)o.push(e.x,e.y);const a=G.z.fromOptimized(new W.A(s,o),"esriGeometryPolygon"),h=(0,Y.R)(a);return h?{x:h[0],y:h[1],vertices:e[0]}:null}(r);return i?[{anchor:new x(i.x,i.y),vertices:i.vertices}]:[]}static _pushCentroid(t,e){const n=4096,r=4096,i=e.length-1;let s=0,o=0,a=0,h=e[0].x,l=e[0].y;h>n&&(h=n),h<0&&(h=0),l>r&&(l=r),l<0&&(l=0);for(let t=1;t<i;t++){let i=e[t].x,c=e[t].y,u=e[t+1].x,f=e[t+1].y;i>n&&(i=n),i<0&&(i=0),c>r&&(c=r),c<0&&(c=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(i-h)*(f-l)-(u-h)*(c-l);s+=d*(h+i+u),o+=d*(l+c+f),a+=d}s/=3*a,o/=3*a,isNaN(s)||isNaN(o)||t.push(new x(s,o))}}class H{constructor(t,e,n,r,i,a,h){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=e,this._sourceDataMaxLOD=r,this._baseUrl=h,a){this._styleLayerUIDs=new Set;for(const t of a)this._styleLayerUIDs.add(t)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,c,u]=e.tileKey.split("/").map(parseFloat);this._level=l;const f=(0,o.IU)(this._level);for(const e of Object.keys(t)){const n=t[e];if(this._pbfTiles[e]=new m.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[t]=n.refKey.split("/").map(parseFloat),r=l-t;if(r>0){const t=(1<<r)-1,n=c&t,i=u&t;this._tileClippers[e]=new s.O3(r,n,i,8,f)}}this._tileClippers[e]||(this._tileClippers[e]=new s.Ox)}}_canParseStyleLayer(t){return!this._styleLayerUIDs||this._styleLayerUIDs.has(t)}async parse(t){const e=(0,I.If)(),n=this._initialize(t),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const i=[],s=new Set,o=(t,e)=>{s.has(t)||(i.push({name:t,repeat:e}),s.add(t))},a={};for(const t of r)t.getResources(t.tileClipper,o,a);if(4===this._tile.status)return[];const h=this._fetchResources(i,a,t);return Promise.all([...h,e]).then(()=>this._processFeatures(n.returnedBuckets))}_initialize(t){const e=t?.signal;return{signal:e,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,zoom:n,layers:r,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:h,referencerUIDToReferencedId:l}=t,c=this._sourceDataMaxLOD;for(let t=r.length-1;t>=0;t--){const u=r[t];if(n<c){if(u.minzoom&&n<Math.floor(u.minzoom)||u.maxzoom&&n>=u.maxzoom)continue}else if(u.maxzoom&&n>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!e[u.source]||!i[u.source])continue;const f=e[u.source],d=i[u.source],x=u.sourceLayer,y=f[x];if(y){let t=o[u.source];if(t||(t=o[u.source]=new Set),t.add(u.sourceLayer),u.refLayerId)l.set(u.uid,u.refLayerId);else{const t=this._createBucket(u);if(t){t.layerUIDs=[u.uid],t.layerExtent=y.extent,t.tileClipper=d;let e=s[u.source];e||(e=s[u.source]={});let n=e[x];n||(n=e[x]=[]),n.push(t),a.push(t),h[u.id]=t}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:n}=t;n.forEach((t,n)=>{e[t]&&e[t].layerUIDs.push(n)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),h=[],l=[];for(const t of Object.keys(s))s[t].forEach(e=>{h.push(e),l.push(t)});for(let t=0;t<h.length;t++){const s=l[t],c=h[t];if(!n[s]||!i[s])continue;const u=n[s][c],f=i[s][c];if(!f||0===f.length)continue;if((0,r.G4)(e))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const t=x.getMessage(),e=new w(t,u,d++);t.release();const n=e.values;if(n){const t=n._minzoom;if(t&&t>=a)continue;const e=n._maxzoom;if(e&&e<=o)continue}for(const t of f)t.pushFeature(e)}}}_fetchResources(t,e,n){const r=[],i=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=i.fetchSprites(t,this._client,n),r.push(s));for(const t in e){const s=e[t];s.size>0&&(o=i.fetchGlyphs(this._baseUrl,t,s,n),r.push(o))}return r}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const t of e)t.processFeatures(t.tileClipper);return e}_parseTileData(t){const e={};for(const n of Object.keys(t)){const r=t[n],i={};for(;r.next();)switch(r.tag()){case 3:{const t=r.getMessage(),e=new P(t);t.release(),i[e.name]=e;break}default:r.skip()}e[n]=i}return e}_createBucket(t){switch(t.type){case 0:return null;case 1:return this._createFillBucket(t);case 2:return this._createLineBucket(t);case 4:return this._createCircleBucket(t);case 3:return this._createSymbolBucket(t)}}_createFillBucket(t){return new C(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new A(t.fillMaterial.getStride()),new v,new S(t.outlineMaterial.getStride()),new v)}_createLineBucket(t){return new E(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new M(t.lineMaterial.getStride()),new v)}_createCircleBucket(t){return new B(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new k(t.circleMaterial.getStride()),new v)}_createSymbolBucket(t){const e=this._tile;return new J(e.tileKey,t,this._level,new L(t.iconMaterial.getStride()),new v,new L(t.textMaterial.getStride()),new v,e.placementEngine,e.getWorkerTileHandler())}}class ${constructor(t,e,n,r){this.status=0,this.placementEngine=new _,this.tileKey=t,this.refKeys=e,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(t,e){const n=e?.signal;if(null!=n){const t=()=>{n.removeEventListener("abort",t),this.status=4};n.addEventListener("abort",t)}let i;const s={bucketsWithData:[],emptyBuckets:null};try{i=await this._parse(t,e)}catch(t){if((0,r.zf)(t))throw t;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const t of i)if(t.hasFeatures()){const e=t.serialize();o.push(e)}else a.push(t.layer.uid);const h=[...o];let l=null;return a.length>0&&(l=Uint32Array.from(a),h.push(l.buffer)),s.emptyBuckets=l,{result:s,transferList:h}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const n=t.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new H(n,this,e.client,t.sourceDataMaxLOD,this._styleRepository,t.styleLayerUIDs,t.baseUrl).parse(e))}}var Q=n(45013);class X{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(t,e){const{key:n}=t,i={};for(const e of Object.keys(t.sourceName2DataAndRefKey)){const n=t.sourceName2DataAndRefKey[e];i[e]=n.refKey}const s=new $(n,i,this,this._styleRepository);this.initializeGlyphWorker(void 0,e);try{return await s.parse({...t,sourceDataMaxLOD:this._sourceDataMaxLOD},e)}catch(t){if(s.setObsolete(),s.release(),!(0,r.zf)(t))throw t;return null}}initializeGlyphWorker(t,e){return this._loaded??=(async()=>{const t=await e.client.invoke("openGlyphPorts"),n=await(0,i.N1)(t,{maxNumberOfConcurrentJobs:20});this._glyphWorker=n.createInvokeProxy()})()}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const n of t){const t=n.type,r=n.data;switch(t){case 0:e.setPaintProperties(r.layer,r.paint);break;case 1:e.setLayoutProperties(r.layer,r.layout);break;case 3:e.deleteStyleLayer(r.layer);break;case 2:e.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(t){const{style:e,sourceDataMaxLOD:n}=t;this._styleRepository=new Q.A(e),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,n){const r=[],i=this._spriteInfo;for(const e of t)void 0===i[e.name]&&r.push(e);return 0===r.length?Promise.resolve():e.invoke("getSprites",r,{signal:n?.signal}).then(t=>{for(const e in t){const n=t[e];i[e]=n}})}getSpriteItems(){return this._spriteInfo}async fetchGlyphs(t,e,n,r){const i=[];let s=this._glyphInfo[e];if(s?n.forEach(t=>{s[t]||i.push(t)}):(s=this._glyphInfo[e]=[],n.forEach(t=>i.push(t))),0===i.length)return;if(await this._loaded,!this._glyphWorker)return void console.error("Failed to fetch glyphs: no worker connection");const o=String.fromCodePoint(...i),a=await this._glyphWorker.getGlyphItems(o,!1,t,e,!0,r);if(a)for(const t of a.glyphs)s[t.code]=t}getGlyphItems(t){return this._glyphInfo[t]}}},18989(t,e,n){n.d(e,{A:()=>r});class r{constructor(t=0,e=0,n=0,r=0){this.x=t,this.y=e,this.width=n,this.height=r}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},83773(t,e,n){function r(t,e){return t.x===e.x&&t.y===e.y}function i(t){if(!t)return;const e=t.length;if(e<=1)return;let n=0;for(let i=1;i<e;i++)r(t[i],t[n])||++n===i||(t[n]=t[i]);t.length=n+1}function s(t,e){return t.x=e.y,t.y=-e.x,t}function o(t,e){return t.x=-e.y,t.y=e.x,t}function a(t,e){return t.x=e.x,t.y=e.y,t}function h(t,e){return t.x=-e.x,t.y=-e.y,t}function l(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function c(t,e){return t.x*e.y-t.y*e.x}function u(t,e){return t.x*e.x+t.y*e.y}function f(t,e,n,r){return t.x=e.x*n+e.y*r,t.y=e.x*r-e.y*n,t}n.d(e,{i:()=>d});class d{constructor(t,e,n){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=n,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,n=this._canUseThinTessellation){i(t),n&&e.halfWidth<1.05&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const n=e.wrapDistance||65535;let r=e.initialDistance||0,i=!1,s=t[0].x,o=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,r=0);let a=t[e].x,h=t[e].y,l=a-s,c=h-o,u=Math.sqrt(l*l+c*c);if(l/=u,c/=u,r+u>n){i=!0;const t=(n-r)/u;u=n-r,a=(1-t)*s+t*a,h=(1-t)*o+t*h,--e}const f=this._writeVertex(s,o,0,0,l,c,c,-l,0,-1,r),d=this._writeVertex(s,o,0,0,l,c,-c,l,0,1,r);r+=u;const x=this._writeVertex(a,h,0,0,l,c,c,-l,0,-1,r),y=this._writeVertex(a,h,0,0,l,c,-c,l,0,1,r);this._writeTriangle(f,d,x),this._writeTriangle(d,x,y),s=a,o=h}}_tessellate(t,e){const n=t[0],i=t[t.length-1],d=r(n,i),x=d?3:2;if(t.length<x)return;const y=e.pixelCoordRatio,g=null!=e.capType?e.capType:0,p=null!=e.joinType?e.joinType:2,_=null!=e.miterLimit?Math.min(e.miterLimit,4):2,m=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,I=null!=e.halfWidth?e.halfWidth:2,w=!!e.textured;let b,v,P,T=null;const M=this._prevNormal,A=this._nextNormal;let S=-1,L=-1;const k=this._joinNormal;let N,B;const V=this._textureNormalLeft,z=this._textureNormalRight,C=this._textureNormal;let R=-1,E=-1;const D=e.wrapDistance||65535;let F=e.initialDistance||0;const U=this._writeVertex,O=this._writeTriangle,Z=(t,e,n,r,i,s)=>{const o=U(v,P,N,B,n,r,t,e,i,s,F);return R>=0&&E>=0&&o>=0&&O(R,E,o),R=E,E=o,o};d&&(b=t[t.length-2],A.x=i.x-b.x,A.y=i.y-b.y,L=l(A),A.x/=L,A.y/=L);let G=!1;for(let e=0;e<t.length;++e){if(G&&(G=!1,F=0),b&&(M.x=-A.x,M.y=-A.y,S=L,F+S>D&&(G=!0)),G){const n=(D-F)/S;S=D-F,b={x:(1-n)*b.x+n*t[e].x,y:(1-n)*b.y+n*t[e].y},--e}else b=t[e];v=b.x,P=b.y;const n=e<=0&&!G,r=e===t.length-1;if(n||(F+=S),T=r?d?t[1]:null:t[e+1],T?(A.x=T.x-v,A.y=T.y-P,L=l(A),A.x/=L,A.y/=L):(A.x=void 0,A.y=void 0),!d){if(n){o(k,A),N=k.x,B=k.y,2===g&&(Z(-A.y-A.x,A.x-A.y,A.x,A.y,0,-1),Z(A.y-A.x,-A.x-A.y,A.x,A.y,0,1)),1===g&&(Z(-A.y-A.x,A.x-A.y,A.x,A.y,-1,-1),Z(A.y-A.x,-A.x-A.y,A.x,A.y,-1,1)),1!==g&&0!==g||(Z(-A.y,A.x,A.x,A.y,0,-1),Z(A.y,-A.x,A.x,A.y,0,1));continue}if(r){s(k,M),N=k.x,B=k.y,1!==g&&0!==g||(Z(M.y,-M.x,-M.x,-M.y,0,-1),Z(-M.y,M.x,-M.x,-M.y,0,1)),2===g&&(Z(M.y-M.x,-M.x-M.y,-M.x,-M.y,0,-1),Z(-M.y-M.x,M.x-M.y,-M.x,-M.y,0,1)),1===g&&(Z(M.y-M.x,-M.x-M.y,-M.x,-M.y,1,-1),Z(-M.y-M.x,M.x-M.y,-M.x,-M.y,1,1));continue}}let i,x,U=-c(M,A);if(Math.abs(U)<.01)u(M,A)>0?(k.x=M.x,k.y=M.y,U=1,i=Number.MAX_VALUE,x=!0):(o(k,A),U=1,i=1,x=!1);else{k.x=(M.x+A.x)/U,k.y=(M.y+A.y)/U,i=l(k);const t=(i-1)*I*y;x=i>4||t>S&&t>L}N=k.x,B=k.y;let O=p;switch(p){case 0:i<1.05&&(O=2);break;case 1:i<m&&(O=2);break;case 2:i>_&&(O=0)}switch(O){case 2:if(Z(k.x,k.y,-M.x,-M.y,0,-1),Z(-k.x,-k.y,-M.x,-M.y,0,1),r)break;if(w){const t=G?0:F;R=this._writeVertex(v,P,N,B,A.x,A.y,k.x,k.y,0,-1,t),E=this._writeVertex(v,P,N,B,A.x,A.y,-k.x,-k.y,0,1,t)}break;case 0:{const t=U<0;let e,n,i,l;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;if(x)i=t?o(this._innerPrev,M):s(this._innerPrev,M),l=t?s(this._innerNext,A):o(this._innerNext,A);else{const e=t?h(this._inner,k):a(this._inner,k);i=e,l=e}const c=t?s(this._bevelStart,M):o(this._bevelStart,M);Z(i.x,i.y,-M.x,-M.y,e.x,e.y);const u=Z(c.x,c.y,-M.x,-M.y,n.x,n.y);if(r)break;const d=t?o(this._bevelEnd,A):s(this._bevelEnd,A);if(x){const t=this._writeVertex(v,P,N,B,-M.x,-M.y,0,0,0,0,F);R=this._writeVertex(v,P,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F),E=this._writeVertex(v,P,N,B,A.x,A.y,d.x,d.y,n.x,n.y,F),this._writeTriangle(u,t,E)}else{if(w){const t=this._bevelMiddle;t.x=(c.x+d.x)/2,t.y=(c.y+d.y)/2,f(C,t,-M.x,-M.y),Z(t.x,t.y,-M.x,-M.y,C.x,C.y),f(C,t,A.x,A.y),R=this._writeVertex(v,P,N,B,A.x,A.y,t.x,t.y,C.x,C.y,F),E=this._writeVertex(v,P,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F)}else{const t=R;R=E,E=t}Z(d.x,d.y,A.x,A.y,n.x,n.y)}if(t){const t=R;R=E,E=t}break}case 1:{const t=U<0;let e,n;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;const l=t?h(this._inner,k):a(this._inner,k);let c,d;x?(c=t?o(this._innerPrev,M):s(this._innerPrev,M),d=t?s(this._innerNext,A):o(this._innerNext,A)):(c=l,d=l);const y=t?s(this._roundStart,M):o(this._roundStart,M),g=t?o(this._roundEnd,A):s(this._roundEnd,A),p=Z(c.x,c.y,-M.x,-M.y,e.x,e.y),_=Z(y.x,y.y,-M.x,-M.y,n.x,n.y);if(r)break;const m=this._writeVertex(v,P,N,B,-M.x,-M.y,0,0,0,0,F);x||this._writeTriangle(R,E,m);const I=h(this._outer,l),b=this._writeVertex(v,P,N,B,A.x,A.y,g.x,g.y,n.x,n.y,F);let T,S;const L=i>2;if(L){let e;i!==Number.MAX_VALUE?(I.x/=i,I.y/=i,e=u(M,I),e=(i*(e*e-1)+1)/e):e=-1,T=t?s(this._startBreak,M):o(this._startBreak,M),T.x+=M.x*e,T.y+=M.y*e,S=t?o(this._endBreak,A):s(this._endBreak,A),S.x+=A.x*e,S.y+=A.y*e}f(C,I,-M.x,-M.y);const D=this._writeVertex(v,P,N,B,-M.x,-M.y,I.x,I.y,C.x,C.y,F);f(C,I,A.x,A.y);const O=w?this._writeVertex(v,P,N,B,A.x,A.y,I.x,I.y,C.x,C.y,F):D,G=m,Y=w?this._writeVertex(v,P,N,B,A.x,A.y,0,0,0,0,F):m;let W=-1,q=-1;if(L&&(f(C,T,-M.x,-M.y),W=this._writeVertex(v,P,N,B,-M.x,-M.y,T.x,T.y,C.x,C.y,F),f(C,S,A.x,A.y),q=this._writeVertex(v,P,N,B,A.x,A.y,S.x,S.y,C.x,C.y,F)),w?L?(this._writeTriangle(G,_,W),this._writeTriangle(G,W,D),this._writeTriangle(Y,O,q),this._writeTriangle(Y,q,b)):(this._writeTriangle(G,_,D),this._writeTriangle(Y,O,b)):L?(this._writeTriangle(m,_,W),this._writeTriangle(m,W,q),this._writeTriangle(m,q,b)):(this._writeTriangle(m,_,D),this._writeTriangle(m,O,b)),x?(R=this._writeVertex(v,P,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F),E=b):(R=w?this._writeVertex(v,P,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F):p,this._writeTriangle(R,Y,b),E=b),t){const t=R;R=E,E=t}break}}}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[528],{11006(e,t,n){function i(e,t,n,i,s){r(e,t,n||0,i||e.length-1,s||o)}function r(e,t,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,l=t-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);r(e,t,Math.max(n,Math.floor(t-l*c/a+h)),Math.min(i,Math.floor(t+(a-l)*c/a+h)),o)}var d=e[t],p=n,m=i;for(s(e,n,t),o(e[i],d)>0&&s(e,n,i);p<m;){for(s(e,p,m),p++,m--;o(e[p],d)<0;)p++;for(;o(e[m],d)>0;)m--}0===o(e[n],d)?s(e,n,m):s(e,++m,i),m<=t&&(n=m+1),t<=m&&(i=m-1)}}function s(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function o(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>i})},40876(e,t,n){n.d(t,{Eq:()=>p,G1:()=>f,Q6:()=>x,TS:()=>s,V6:()=>r,Vm:()=>m,ay:()=>l,c1:()=>g,c4:()=>o,j5:()=>u,lT:()=>h,oW:()=>c,xV:()=>v});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function s(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...s(e)]}function a(e,t,n){n<0&&++n,n>1&&--n;const i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,i=1){const r=(e%360+360)%360/360,s=n<=.5?n*(t+1):n+t-n*t,o=2*n-s;return[Math.round(255*a(o,s,r+1/3)),Math.round(255*a(o,s,r)),Math.round(255*a(o,s,r-1/3)),i]}function u(e){const t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,s=t?9===e.length:5===e.length;let o=Number("0x"+e.slice(1));if(isNaN(o))return null;const a=[0,0,0,1];let l;return s&&(l=o&i,o>>=n,a[3]=r*l/255),l=o&i,o>>=n,a[2]=r*l,l=o&i,o>>=n,a[1]=r*l,l=o&i,o>>=n,a[0]=r*l,a}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function h(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?f(e[3]):1,e}function p(e){let t=r(e)?s(e):null;return t??=h(e),t??=c(e),t}function m(e){const t=p(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function f(e){return y(e,0,1)}function g(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const _=1/2.2;function x(e){return e**2.2}function v(e){return e**_}n.d(t,["iw",0,_])},60999(e,t,n){n.d(t,{DZ:()=>m,Ke:()=>p,QA:()=>f,Tj:()=>c,UT:()=>g,aD:()=>_,jJ:()=>u});var i=n(32198),r=n(69622),s=n(97768),o=n(17676),a=n(10107),l=n(64108);function u(e,t,n){return(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))}async function c(e,t,n){return(await(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function m(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new y(e,t)}let y=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},62885(e,t,n){n.d(t,{H:()=>s,V:()=>r});var i=n(7762);function r(e,t,n=i.A){return t||(t=new n),t===e||t.destroyed||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function s(e){return e}},21287(e,t,n){n.d(t,{M5:()=>h,eV:()=>c});var i=n(56507),r=n(49186),s=n(17676),o=n(84952),a=n(26306);let l=null,u=!0;function c(e,t,n,i){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch(e){u=!1}const r=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,i);return r.data.set(e,0),r}async function h(e,t){const{arrayBuffer:l,mediaType:u}=await async function(e,t){const n=(0,o.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const r=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:r.data,mediaType:r.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:e,parseGif:i}=await n.e(820).then(()=>n(10820));if(e(l))return i(l,t)}if(c){const{isAnimatedPNG:e,parseApng:i}=await n.e(2390).then(()=>n(22390));if(e(l))return i(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,s.zf)(e))throw new r.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),t)}},35522(e,t,n){n.d(t,{$A:()=>A,Bw:()=>s,C:()=>o,Cc:()=>C,DI:()=>M,Io:()=>_,Ln:()=>y,Om:()=>I,Qr:()=>h,Re:()=>u,S8:()=>b,T9:()=>f,WQ:()=>l,Z0:()=>P,_S:()=>p,aI:()=>B,ei:()=>R,fw:()=>S,gL:()=>E,hG:()=>x,hZ:()=>a,hs:()=>g,jk:()=>m,lw:()=>c,m3:()=>v,oW:()=>Z,t2:()=>T,tn:()=>d,ze:()=>w});var i=n(51850),r=n(34304);function s(e){const t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,i){return e[0]=t,e[1]=n,e[2]=i,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function f(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e}function _(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}function x(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function v(e){const t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t=e){const n=t[0],i=t[1],r=t[2];let s=n*n+i*i+r*r;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function I(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function A(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=r*l-s*a,e[1]=s*o-i*l,e[2]=i*a-r*o,e}function C(e,t,n,i){const r=t[0],s=t[1],o=t[2];return e[0]=r+i*(n[0]-r),e[1]=s+i*(n[1]-s),e[2]=o+i*(n[2]-o),e}function P(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=n[0]*i+n[4]*r+n[8]*s+n[12],e[1]=n[1]*i+n[5]*r+n[9]*s+n[13],e[2]=n[2]*i+n[6]*r+n[10]*s+n[14],e}function R(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=i*n[0]+r*n[3]+s*n[6],e[1]=i*n[1]+r*n[4]+s*n[7],e[2]=i*n[2]+r*n[5]+s*n[8],e}function E(e,t,n){return S(e,t,n[0],n[1],n[2],n[3])}function S(e,t,n,i,r,s){const o=t[0],a=t[1],l=t[2],u=i*l-r*a,c=r*o-n*l,h=n*a-i*o,d=i*h-r*c,p=r*u-n*h,m=n*c-i*u,f=2*s;return e[0]=o+u*f+2*d,e[1]=a+c*f+2*p,e[2]=l+h*f+2*m,e}const L=(0,i.vt)(),O=(0,i.vt)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function B(e,t){if(e===t)return!0;const n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function Z(e,t,n){const i=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];let o=i*i+r*r+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=i*o,e[1]=r*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,Y=c,U=h,H=_,j=x,X=s,N=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){b(L,e),b(O,t);const n=I(L,O);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,i,r,s){const o=1-s,a=o*o,l=s*s,u=a*o,c=3*s*a,h=3*l*o,d=l*s;return e[0]=t[0]*u+n[0]*c+i[0]*h+r[0]*d,e[1]=t[1]*u+n[1]*c+i[1]*h+r[1]*d,e[2]=t[2]*u+n[2]*c+i[2]*h+r[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:A,crossAndNormalize:function(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],a=n[1],l=n[2],u=r*l-s*a,c=s*o-i*l,h=i*a-r*o,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:Z,dist:H,distance:_,div:U,divide:h,dot:I,equals:B,exactEquals:T,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,i,r,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),c=o*(3-2*s);return e[0]=t[0]*a+n[0]*l+i[0]*u+r[0]*c,e[1]=t[1]*a+n[1]*l+i[1]*u+r[1]*c,e[2]=t[2]*a+n[2]*l+i[2]*u+r[2]*c,e},inverse:M,len:X,length:s,lerp:C,max:f,min:m,mul:Y,multiply:c,negate:w,normalize:b,random:function(e,t=1){const n=r.Ov,i=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*o,e[1]=Math.sin(i)*o,e[2]=s*t,e},rotateX:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0],s[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),s[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),s[1]=r[1],s[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),s[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),s[2]=r[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,scaleTo:function(e,t){return g(e,e,t/X(e))},set:a,sign:p,sqrDist:j,sqrLen:N,squaredDistance:x,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:R,transformMat4:P,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:E,transformQuatValues:S},Symbol.toStringTag,{value:"Module"})),n.d(t,["Il",0,X,"jb",0,k,"lo",0,j,"uE",0,N])},75503(e,t,n){n.d(t,{wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),M.prune(),b.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(x(e,n))for(w.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;x(e,o)&&(n.leaf?t(s):_(e,o)?l(s,t):w.push(s))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!x(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(x(e,s)){if(t.leaf||_(e,s))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new P([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(b.clear(),I.clear();n||b.length>0;){if(n||(n=b.pop(),s=b.data[b.length-1],o=I.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),b.push(n),this._condense(b),this;a||n.leaf||!_(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(b.push(n),I.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new P(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new R([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);v(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);b.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=m(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,b);for(s.children.push(e),h(s,r);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(r,b,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new P(o):new R(o);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new R([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=c(e,0,o,this._toBBox),a=c(e,o,n,this._toBBox),l=y(t,a),u=m(t)+m(a);l<i?(i=l,s=o,r=u<r?u:r):l===i&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=c(e,0,t,r),o=c(e,n-t,n,r);let a=f(s)+f(o);for(let i=t;i<n-t;i++){const t=e.children[i];h(s,e.leaf?r(t):t),a+=f(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?r(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.z)(e));else M.pushArray(n.children);n=M.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,i,r){r||(r=new P([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],h(r,e.leaf?i(s):s);return r}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const w=new s.A,M=new s.A,b=new s.A,I=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class P extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class R extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},16494(e,t,n){var i=n(75620);const r=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new i.I({whiteList:r,onTagAttr:(e,t,n)=>{const i=`${t}="${n}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);n.d(t,["Nd",0,a,"W5",0,o])},90629(e,t,n){n.d(t,{Lz:()=>r,PN:()=>s,cr:()=>o,gs:()=>l,r_:()=>u,tc:()=>a}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(e){return e?e/72*96:0}function s(e){return e?72*e/96:0}function o(e){if("string"==typeof e){const t=e.match(i);if(t){const n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),o="px"===i?s(n):n;return r?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function a(e=0,t=0){return{x:e,y:t}}function l(e=0,t=0){return[e,t]}function u(e=0,t=0,n=0){return[e,t,n]}},13069(e,t,n){n.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},48526(e,t,n){n.d(t,{A:()=>g});var i,r=n(32198),s=n(4576),o=n(4718),a=n(91429),l=n(5443),u=n(91075),c=n(86738),h=n(16930),d=n(90634),p=n(47610),m=n(56993),f=n(43937);let g=i=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:n,hasZ:i,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:i??=!0,n??=!0;break;case 3:i??=!0!==n,n??=!i;break;default:i??=!1,n??=!1}return r??=h.A.WGS84,{...e,hasM:n,hasZ:i,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,d.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:n,hasZ:r}=this;return new i({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:n,hasZ:r})}equals(e){if(this===e)return!0;if(null==e)return!1;const t=this.spatialReference,n=e.spatialReference;return null!=t==(null!=n)&&!(null!=t&&null!=n&&!t.equals(n))&&(0,s.aI)(this.points,e.points,p.v6)}addPoint(e){return(0,m.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],n={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(n.z=t[2],i=3),this.hasM&&(n.m=t[i]),new c.A(n)}removePoint(e){if(!this._validateInputs(e))return null;const t=new c.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,m.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,a.MZ)({readOnly:!0})],g.prototype,"cache",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],g.prototype,"extent",null),(0,r.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],g.prototype,"points",void 0),(0,r.Cg)([(0,f.K)("points")],g.prototype,"writePoints",null),g=i=(0,r.Cg)([(0,a.$K)("esri.geometry.Multipoint")],g),g.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,n){n.d(t,{A:()=>m});var i,r=n(32198),s=n(4718),o=n(91429),a=n(5443),l=n(91075),u=n(86738),c=n(16930),h=n(90634),d=n(56993),p=n(43937);let m=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:n,hasZ:i,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:i??=!0,n??=!0;break;case 3:i??=!0!==n,n??=!i;break;default:i??=!1,n??=!1}return r??=c.A.WGS84,{...e,hasM:n,hasZ:i,paths:t,spatialReference:r}}(e)),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(e,t){t.curvePaths=(0,s.o8)(e)}get extent(){const e=(0,h.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,s.o8)(this.paths)}addPath(e){if(!e)return;const t=this.paths,n=t.length;if(function(e){return!Array.isArray(e[0])}(e)){const i=[];for(let t=0,n=e.length;t<n;t++)i[t]=e[t].toArray();t[n]=i}else t[n]=e.slice();return this.notifyChange("paths"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.paths=(0,s.o8)(this.paths),e.curvePaths=(0,s.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const n=this.paths[e][t],i=this.hasZ,r=this.hasM;return i&&!r?new u.A(n[0],n[1],n[2],void 0,this.spatialReference):r&&!i?new u.A(n[0],n[1],void 0,n[2],this.spatialReference):i&&r?new u.A(n[0],n[1],n[2],n[3],this.spatialReference):new u.A(n[0],n[1],this.spatialReference)}insertPoint(e,t,n){return this._validateInputs(e,t,!0)?((0,d.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[e].splice(t,0,n),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],n=this.spatialReference,i=t.map(e=>new u.A(e,n));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const n=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(e,t,n){return this._validateInputs(e,t)?((0,d.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[e][t]=n,this.notifyChange("paths"),this):this}_validateInputs(e,t,n=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const i=this.paths[e];if(n&&(t<0||t>i.length))return!1;if(!n&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.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}}}})],m.prototype,"curvePaths",void 0),(0,r.Cg)([(0,p.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,r.Cg)([(0,p.K)("paths")],m.prototype,"writePaths",null),m=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0},60408(e,t,n){function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?s(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":i(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function c(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}n.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>r,W0:()=>h,ZC:()=>i,fT:()=>s,uW:()=>l})},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>l});var i=n(82799),r=n(16930),s=n(60408),o=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,o.Ed)(e))for(const n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,o.aO)(e)){const[n,i]=e.c;n[0]+=t,i[0]+=t;continue}if((0,o.FG)(e)){const[n,i]=e.a;n[0]+=t,i[0]+=t;continue}if((0,o.n1)(e)){const[n,i,r]=e.b;n[0]+=t,i[0]+=t,r[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},89056(e,t,n){n.d(t,{b3:()=>h,jZ:()=>c});var i=n(12195),r=n(19419),s=n(537),o=n(95108),a=n(60408),l=n(80754),u=n(21325);function c(e){return d(e,!0)}function h(e){return d(e,!1)}function d(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,u.Vp)(n),o=(0,i.W)(e)?e.toJSON():e;if(!r)return o;const c=(0,u.K8)(n)?102100:4326,h=l.j7[c].maxX,d=l.j7[c].minX;if((0,a.fT)(o))return m(o,h,d);if((0,a.U9)(o))return o.points=o.points.map(e=>m(e,h,d)),o;if((0,a.ZC)(o))return p(o,r);if((0,a.Bi)(o)||(0,a.Rg)(o)){const e=(0,s.Rg)(v,o),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,l.kd)(n.xmin,d)*(2*h),r=0===i?o:(0,l.kS)(o,i);return n.xmin+=i,n.xmax+=i,n.xmax>h?_(r,h,t):n.xmin<d?_(r,d,t):r}return o}function p(e,t){if(!t)return e;const n=function(e,t){const n=[],{ymin:i,ymax:r,xmin:s,xmax:o}=e,a=e.xmax-e.xmin,[l,u]=t.valid,{x:c,frameId:h}=f(e.xmin,t),{x:d,frameId:p}=f(e.xmax,t),m=c===d&&a>0;if(a>2*u){const e={xmin:s<o?c:d,ymin:i,xmax:u,ymax:r},t={xmin:l,ymin:i,xmax:s<o?d:c,ymax:r},a={xmin:0,ymin:i,xmax:u,ymax:r},m={xmin:l,ymin:i,xmax:0,ymax:r},f=[],y=[];g(e,a)&&f.push(h),g(e,m)&&y.push(h),g(t,a)&&f.push(p),g(t,m)&&y.push(p);for(let e=h+1;e<p;e++)f.push(e),y.push(e);n.push(new x(e,[h]),new x(t,[p]),new x(a,f),new x(m,y))}else c>d||m?n.push(new x({xmin:c,ymin:i,xmax:u,ymax:r},[h]),new x({xmin:l,ymin:i,xmax:d,ymax:r},[p])):n.push(new x({xmin:c,ymin:i,xmax:d,ymax:r},[h]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,l.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,l.kd)(i,t);e.x+=n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e.x+=t*(-2*n)}}return e}function f(e,t){const[n,i]=t.valid,r=2*i;let s,o=0;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r,o=s):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r,o=-s),{x:e,frameId:o}}function g(e,t){const{xmin:n,ymin:i,xmax:r,ymax:s}=t;return y(e,n,i)&&y(e,n,s)&&y(e,r,s)&&y(e,r,i)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function _(e,t,n=!0){const i=!(0,a.Rg)(e);if(i&&(0,o.m3)(e),n)return(new w).cut(e,t);const r=i?e.rings:e.paths,s=i?4:2,l=r.length,u=-2*t;for(let e=0;e<l;e++){const t=r[e];if(t&&t.length>=s){const e=[];for(const[n,...i]of t)e.push([n+u,...i]);r.push(e)}}return i?e.rings=r:e.paths=r,e}class x{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,r.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const i=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=i;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide===-1){const n=this._intersect(this._prevPt,e);this._lineTo(n,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(M(e,t<=0?e[0]:this._xCut)),this._lineOut.push(M(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(b(this._lineIn,e,t<=0?e[0]:this._xCut),b(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]),i=[this._xCut,e[1]+n*(t[1]-e[1])],r=Math.min(e.length,t.length);for(let s=2;s<r;s++)i.push(e[s]+n*(t[s]-e[s]));return i}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function M(e,t){const n=e.slice();return n[0]=t,n}function b(e,t,n){const i=e.length;i>1&&e[i-1][0]===n&&e[i-2][0]===n?e[i-1]=M(t,n):e.push(M(t,n))}},99557(e,t,n){n.r(t),n.d(t,{default:()=>Ee});var i=n(32198),r=n(7762),s=n(49186),o=n(53966),a=n(25728),l=n(17676),u=n(91429),c=n(16930),h=n(4146),d=n(63074),p=n(34287),m=n(8303),f=n(25036),g=n(48237),y=n(56507),_=n(21287),x=n(84952),v=n(13069),w=n(92474),M=n(64108);let b=0;const I=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:b++})}};return n=(0,i.Cg)([(0,M.$)("esri.core.NumericIdentifiable")],n),n};var A=n(90629),C=n(35666),P=n(5443),R=n(86738),E=n(21325),S=n(56560),L=n(69540),O=n(83529),T=n(29242),B=n(37585),Z=n(48163),k=n(39829),Y=n(99917),U=n(33905);const H=(0,Z.vt)();let j=class extends((0,U.L)(L.Pw)){constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:i}=this;if(null==e||null==t||null==n||null==i)return null;const r=e.spatialReference;return t=this.projectOrWarn(t,r),n=this.projectOrWarn(n,r),i=this.projectOrWarn(i,r),null==t||null==n||null==i?null:new k.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[n.x,n.y]]],spatialReference:r})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[i,r,s,o]]}=e;this.bottomLeft=new R.A({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new R.A({x:r[0],y:r[1],spatialReference:n}),this.topRight=new R.A({x:s[0],y:s[1],spatialReference:n}),this.bottomRight=new R.A({x:o[0],y:o[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:i,bottomLeft:r}=this;if(null==e||null==t||null==n||null==i||null==r)return null;const s=t.spatialReference;e=e.normalize();const o=(0,Y.projectOrLoad)(e,s).geometry;if(null==o)return null;(0,B.hZ)(H,o.x,o.y);const a=(0,O.O)((0,T.vt)(),[t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return(0,O.W)(H,H,a),(0,A.tc)(H[0],H[1])}};(0,i.Cg)([(0,u.MZ)({clonable:!1})],j.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:R.A})],j.prototype,"bottomLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:R.A})],j.prototype,"bottomRight",void 0),(0,i.Cg)([(0,u.MZ)({type:R.A})],j.prototype,"topLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:R.A})],j.prototype,"topRight",void 0),j=(0,i.Cg)([(0,u.$K)("esri.layers.support.CornersGeoreference")],j);const X=j;var N=n(34727),q=n(34304);let z=class extends((0,U.L)(L.Pw)){constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:i,spatialReference:r}=this.extent;let s;if(this.rotation){const{x:r,y:o}=this.extent.center,a=G(r,o,this.rotation);s=[a(e,t),a(e,i),a(n,i),a(n,t)],s.push(s[0])}else s=[[e,t],[e,i],[n,i],[n,t],[e,t]];return new k.A({rings:[s],spatialReference:r})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,i,r]],extent:{center:{x:s,y:o}}}=e,a=(0,N.KJ)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=G(s,o,-a),[u,c]=l(n[0],n[1]),[h,d]=l(r[0],r[1]);this.extent=new P.A({xmin:u,ymin:c,xmax:h,ymax:d,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:i,ymin:r,xmax:s,ymax:o,center:a,spatialReference:l}=t;e=e.normalize();const u=(0,Y.projectOrLoad)(e,l).geometry;if(null==u)return null;let c=u.x,h=u.y;return n&&([c,h]=G(a.x,a.y,-n)(c,h)),(0,A.tc)((0,N.hs)(c,i,s,0,1),(0,N.hs)(h,o,r,0,1))}};function G(e,t,n){const i=(0,q.DF)(n),r=Math.cos(i),s=Math.sin(i);return(n,i)=>[r*(n-e)+s*(i-t)+e,r*(i-t)-s*(n-e)+t]}(0,i.Cg)([(0,u.MZ)({clonable:!1})],z.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:P.A})],z.prototype,"extent",void 0),(0,i.Cg)([(0,u.MZ)({type:Number})],z.prototype,"rotation",void 0),z=(0,i.Cg)([(0,u.$K)("esri.layers.support.ExtentAndRotationGeoreference")],z);const W=z;function $(e,t){const n=(0,C.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function D(e,t,n){return{enabled:!$(n?.layer,n?.origin),ignoreOrigin:!0}}const F={json:{name:"url",type:String,write:{overridePolicy:D}}},V={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:D}}},K={types:{key:"type",base:null,typeMap:{"control-points":g.A,corners:X,"extent-and-rotation":W}},json:{types:{key:"type",base:null,typeMap:{"control-points":g.A}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};var J=n(59923),Q=n(36005),ee=n(43937);let te=class extends(I((0,a.M)(w.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return g.A.fromJSON(e)}writeGeoreference(e,t,n,i){const r=i?.resources?.pendingOperations,s=()=>{const r=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:i}=e;if(5!==i?.rings[0]?.length)return null;const[r,s,o,a]=i.rings[0],{spatialReference:l}=i;return new g.A({controlPoints:[new S.A({mapPoint:new R.A({x:r[0],y:r[1],spatialReference:l}),sourcePoint:(0,A.tc)(0,n)}),new S.A({mapPoint:new R.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,A.tc)(0,0)}),new S.A({mapPoint:new R.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,A.tc)(t,0)}),new S.A({mapPoint:new R.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,A.tc)(t,n)})],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(r){if("control-points"!==e.type&&o.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==r.controlPoints?.length)return void(0,J.qt)(i,"ControlPointsGeoreference.controlPoints","only 'control-points' georeference with 4 control points may be persisted.");t[n]=r.write({},i)}};if("control-points"!==e.type&&!this.loaded&&r)return t[n]={},void r.push(this.load().then(s));s()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:i}=this;if(null==e||null==t||0===n||0===i)return null;const r=t.toSourceNormalized(e);return null==r?null:(r.x*=n,r.y*=i,r)}};(0,i.Cg)([(0,u.MZ)(K)],te.prototype,"georeference",void 0),(0,i.Cg)([(0,Q.w)("georeference")],te.prototype,"readGeoreference",null),(0,i.Cg)([(0,ee.K)("georeference")],te.prototype,"writeGeoreference",null),(0,i.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],te.prototype,"opacity",void 0),te=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementBase")],te);var ne=n(85648);const ie=Symbol("ImageElementInstance"),re=Symbol("VideoElementInstance");function se(e){return null!=e&&"object"==typeof e&&ie in e}function oe(e){return se(e)||function(e){return null!=e&&"object"==typeof e&&re in e}(e)}var ae,le=n(97159);let ue=class extends te{static{ae=ie}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[ae]=!0,this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,_.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new s.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,le.f)(t.url,n)}writeImage(e,t,n,i){if(null==e)return;const r=i?.portalItem,s=i?.resources;if(!r||!s)return void("string"==typeof e&&(t[n]=(0,le.t)(e,i)));const o=function(e){return"string"==typeof e&&!(0,x.DB)(e)&&!(0,x.w8)(e)}(e)?e:null;if(o){if(null==(0,le.i)(o))return void(t[n]=o);const e=(0,le.t)(o,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(r&&e&&!(0,x.oP)(e))return s.toKeep.push({resource:r.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",s.pendingOperations.push(async function(e){return"string"==typeof e?(0,x.DB)(e)?(0,x.N9)(e):(await(0,y.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=n,e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),i}(e).toBlob(t))}(e).then(e=>{const i=function(e,t){const n=(0,v.lk)(),i=`${(0,x.fj)("media",n)}.${(0,ne.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,r);t[n]=i.itemRelativeUrl,s.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,i.Cg)([(0,u.MZ)()],ue.prototype,"animationOptions",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ue.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ue.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ue.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)(F)],ue.prototype,"image",void 0),(0,i.Cg)([(0,Q.w)("image",["url"])],ue.prototype,"readImage",null),(0,i.Cg)([(0,ee.K)("image")],ue.prototype,"writeImage",null),(0,i.Cg)([(0,u.MZ)(V)],ue.prototype,"type",void 0),ue=(0,i.Cg)([(0,u.$K)("esri.layers.support.ImageElement")],ue);var ce=n(62885),he=n(65529),de=n(61893),pe=n(36708),me=n(19419),fe=n(12176),ge=n(6518),ye=n(69622),_e=n(89056);let xe=class extends ye.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,me.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,Y.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return k.A.fromJSON((0,_e.jZ)(this.coords))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,me.VY)(e):null}};(0,i.Cg)([(0,u.MZ)()],xe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],xe.prototype,"element",void 0),(0,i.Cg)([(0,u.MZ)()],xe.prototype,"bounds",null),(0,i.Cg)([(0,u.MZ)()],xe.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)()],xe.prototype,"normalizedCoords",null),(0,i.Cg)([(0,u.MZ)()],xe.prototype,"normalizedBounds",null),xe=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementView")],xe);var ve,we=n(16494),Me=n(38969);const be=Symbol("canplay");let Ie=class extends te{static{ve=re}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[ve]=!0}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{const t=document.createElement("video");return t.src=we.W5.sanitizeUrl((0,x.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new s.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;const t=(0,N.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):o.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,i){if(!e)return void(i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source is missing")));const r=function(e){return"string"==typeof e&&!(0,x.DB)(e)&&!(0,x.w8)(e)}(e)?e:null;if(!r)return void(i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source must be an absolute url")));!(0,x.oP)(r)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(r);const o=(0,x.s2)(r);(0,le.i)(o)?i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=o}async _preProcessVideoUrl(e){if((0,x.zs)(e))return(0,x.yM)(e);try{return await(0,y.A)(e,{method:"head"}),e}catch{try{return(0,x.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,x.w8)(e.src)||(e.src=e.src));try{await(0,Me.i)(e,e=>this.addHandles(e,be)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(be)}}};(0,i.Cg)([(0,u.MZ)()],Ie.prototype,"autoplay",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ie.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ie.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ie.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)({type:Number})],Ie.prototype,"currentTime",null),(0,i.Cg)([(0,u.MZ)({type:Number})],Ie.prototype,"duration",null),(0,i.Cg)([(0,u.MZ)(F)],Ie.prototype,"video",null),(0,i.Cg)([(0,ee.K)("video")],Ie.prototype,"writeVideo",null),(0,i.Cg)([(0,u.MZ)(V)],Ie.prototype,"type",void 0),Ie=(0,i.Cg)([(0,u.$K)("esri.layers.support.VideoElement")],Ie);const Ae={key:"type",defaultKeyValue:"image",base:te,typeMap:{image:ue,video:Ie}},Ce=r.A.ofType(Ae);let Pe=class extends((0,w.WV)((0,de.g)(he.nJ))){constructor(e){super(e),this._index=new ge.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new xe({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const i=(0,pe.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Ce}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:c.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,ce.V)(e,this._get("elements"),Ce))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new P.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):o.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,Y.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,E.aI)(e.spatialReference,this.spatialReference)?e:(0,Y.project)(e,this.spatialReference);if(!n)return[];const i=n.normalize(),r=[];for(const e of i)this._index.forEachInBounds((0,me.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,fe.fA)(e,t)&&r.push(n)});return r.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),r}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,i=this._index.has(e),r=null!=n;this._index.delete(e),r&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(i!==r?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,i.Cg)([(0,u.MZ)()],Pe.prototype,"elements",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Pe.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)()],Pe.prototype,"spatialReference",null),Pe=(0,i.Cg)([(0,u.$K)("esri.layers.support.LocalMediaElementSource")],Pe);let Re=class extends((0,d.dM)((0,f.j)((0,p.q)((0,m.A)((0,a.M)(h.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:r,saveAs:s}=await n.e(3561).then(()=>n(63561));switch(e){case 0:return r(this,t);case 1:return s(this,i,t)}}),this.source=new Pe}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new s.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const i=oe(t)?new Pe({elements:new r.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):o.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Pe({elements:new r.A(e)}):e instanceof r.A?new Pe({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const i=this._createSource(t);return i?.read(t,n),i}writeSource(e,t,n,i){if(e&&e instanceof Pe){const t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new s.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}oe(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new s.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new s.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new ue;case"video":return new Ie}return null}_getSourceOverride(e,t){if(oe(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){const n=e.toJSON(),i=this._createSource(n);return i.read({...n},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Re.prototype,"effectiveSource",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],Re.prototype,"georeference",void 0),(0,i.Cg)([(0,Q.w)("web-document","georeference")],Re.prototype,"readGeoreference",null),(0,i.Cg)([(0,u.MZ)({type:String})],Re.prototype,"copyright",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Re.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({type:["MediaLayer"]})],Re.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide"]})],Re.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:g.A}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:$(this,n?.origin)&&oe(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],Re.prototype,"source",null),(0,i.Cg)([(0,u.wg)("source")],Re.prototype,"castSource",null),(0,i.Cg)([(0,Q.w)("source",["url"])],Re.prototype,"readSource",null),(0,i.Cg)([(0,ee.K)("source")],Re.prototype,"writeSource",null),(0,i.Cg)([(0,u.MZ)({type:c.A})],Re.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Re.prototype,"type",void 0),Re=(0,i.Cg)([(0,u.$K)("esri.layers.MediaLayer")],Re);const Ee=Re},6518(e,t,n){n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303(e,t,n){var i=n(32198),r=n(92602),s=n(70333),o=n(56507),a=n(60999),l=n(49186),u=n(36563),c=n(53966),h=n(97768),d=n(17676),p=n(84952),m=n(91429),f=n(77548),g=n(20655),y=n(80812),_=n(41318),x=n(10407),v=n(36005),w=n(43937);const M={credential:null,user:null};n.d(t,["A",0,e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await n.e(1204).then(()=>n(41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;const i=t?.signal?null:new AbortController;try{const{reload:r}=await n.e(1204).then(()=>n(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),r=e===n.id;if(r&&n.portal.user)return this._getUserPrivileges(n,i);let o,a;if(r)o=n.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,p.b8)(o,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(r?await n.reload():(n=new y.default({id:e,portal:{url:o}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,i)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const n=(0,x.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const n=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=s.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const i=`${n.owningSystemUrl}/sharing/rest`,r=g.A.getDefault();if(r&&r.loaded&&(0,p.S8)(r.restUrl)===(0,p.S8)(i))return r.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return n&&i&&!(0,p.ut)(i.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,m.MZ)({type:y.default})],b.prototype,"portalItem",null),(0,i.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,i.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,i.Cg)([(0,m.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,i.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],b),b}])},38969(e,t,n){n.d(t,{i:()=>r});var i=n(37955);function r(e,t){return new Promise((n,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,i.Oo)(e,"canplay",n)),t((0,i.Oo)(e,"error",r)))})}},10407(e,t,n){n.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,sQ:()=>h});var i=n(99917),r=n(16930),s=n(28735);function o(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function c(e,t,n){n?o(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}n.d(t,["mm",0,d])},85648(e,t,n){n.d(t,{n:()=>r});var i=n(84952);function r(e){return s[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const s={},o="text/plain",a=s[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)s[l[e]]=e},78553(e,t,n){n.d(t,{D:()=>s,p:()=>r});var i=n(78888);function r(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5740],{46130(e,t,r){r.d(t,{v:()=>n});var a=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},33359(e,t,r){r.d(t,{save:()=>C,saveAs:()=>x});var a=r(4576),n=(r(49186),r(71530)),o=r(60694),i=r(23154),s=(r(20655),r(80812),r(88788)),l=r(10407);const u="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"dimension-feature"===t||"annotation-feature"===t)&&"feature-layer"===e?.source?.type}function m(e){return{isValid:p(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function d(e,t){const r=(0,s.m)(e,"portal-item");return t?.isTable&&(r.layerContainerType="tables"),r}function h(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)w(a)?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e,t){return e.isTable}function b(e){return h([e])}async function S(e,t){return/\/\d+\/?$/.test(e.url)?b(t[0]):async function(e,t){if(e.reverse(),!t)return h(e);const a=await async function(e,t){let a,n=await e.fetchData("json");if(!function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(n)||(0,l.Y)(e,l.mm.HOSTED_SERVICE))a=!0;else{if(function(e){return[...e.layers,...e.tables].every(e=>"layerType"in e&&!!e.layerType)}(n))return n;a=!1}n??={},function(e){e.layers??=[],e.tables??=[]}(n);const{layer:{url:o,customParameters:s,apiKey:u}}=t[0];return await async function(e,t,a,n){const{url:o,customParameters:s,apiKey:l}=t,{serviceJSON:u,layersJSON:c}=await(0,i.A6)(o,{customParameters:s,apiKey:l});if(!n)return void L(e,u);const y=T(e.layers,u.layers,a),f=T(e.tables,u.tables,a);e.layers=y.itemResources,e.tables=f.itemResources,L(e,u);const p=[...y.added,...f.added],m=c?[...c.layers,...c.tables]:[];await async function(e,t,a,n){const o=await async function(e){const t=new Set,a=[];for(const{type:n}of e){const e=(0,i.Jo)(n);if(e&&!t.has(n))switch(t.add(n),e){case"AnnotationFeatureLayer":a.push(r.e(737).then(()=>r(20737)).then(e=>e.default));break;case"CatalogLayer":a.push(Promise.all([r.e(1214),r.e(5051),r.e(4473),r.e(9789),r.e(893),r.e(7013),r.e(7067)]).then(()=>r(83508)).then(e=>e.default));break;case"DimensionFeatureLayer":a.push(r.e(7458).then(()=>r(25077)).then(e=>e.default));break;case"FeatureLayer":a.push(Promise.all([r.e(5620),r.e(9953),r.e(1214),r.e(5051),r.e(4473),r.e(1017),r.e(9789),r.e(8589),r.e(4500)]).then(()=>r(18589)).then(e=>e.default));break;case"OrientedImageryLayer":a.push(Promise.all([r.e(5620),r.e(9953),r.e(1214),r.e(5051),r.e(4473),r.e(1017),r.e(9789),r.e(8589),r.e(5651)]).then(()=>r(16852)).then(e=>e.default))}}const n=await Promise.all(a),o=new Map;return Array.from(t).forEach((e,t)=>{o.set(e,n[t])}),o}(t),s=[];for(const{id:e,type:r}of t){const t=o.get(r);t&&s.push(new t({url:a,layerId:e,sourceJSON:n.find(({id:t})=>t===e)}))}await Promise.allSettled(s.map(e=>e.load()));for(const t of s){const{layerId:r,loaded:a}=t;if(!a||!("defaultPopupTemplate"in t)||!t.defaultPopupTemplate)continue;const n={id:r,popupInfo:t.defaultPopupTemplate.toJSON()};g(t,"ArcGISFeatureLayer"===t.operationalLayerType?n:{...n,layerType:t.operationalLayerType},e)}}(e,p,o,m)}(n,{url:o??"",customParameters:s,apiKey:u},t.map(e=>e.layer.layerId),a),n}(t,e);for(const t of e)g(t.layer,t.layerJSON,a);return function(e,t){const r=[],a=[];for(const{layer:e}of t){const{isTable:t,layerId:n}=e;t?a.push(n):r.push(n)}v(e.layers,r),v(e.tables,a)}(a,e),a}(t,e)}function v(e,t){if(e.length<2)return;const r=[];for(const{id:t}of e)r.push(t);(0,a.aI)(r.sort(I),t.slice().sort(I))&&e.sort((e,r)=>{const a=t.indexOf(e.id),n=t.indexOf(r.id);return a<n?-1:a>n?1:0})}function I(e,t){return e<t?-1:e>t?1:0}function T(e,t,r){const n=(0,a.iv)(e,t,(e,t)=>e.id===t.id);e=e.filter(e=>!n.removed.some(t=>t.id===e.id));const o=n.added;for(const{id:t}of o)e.push({id:t});return{itemResources:e,added:o.filter(({id:e})=>!r.includes(e))}}function g(e,t,r){e.isTable?A(r.tables,t):A(r.layers,t)}function A(e,t){const r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}function L(e,t){const r=e.layers??[],a=e.tables??[],n=[...t.layers??[],...t.tables??[]];for(const e of[...r,...a]){const{id:t}=e;if("layerType"in e&&e.layerType)continue;const r=n.find(({id:e})=>e===t);if(!r)continue;const o=(0,i.Aq)(r.type,a.includes(e));o&&P(0,o)&&O(o)&&(e.layerType=o)}}function P(e,t){return"ArcGISFeatureLayer"!==t&&"Table"!==t}function O(e){return"ArcGISFeatureLayer"!==e&&"Table"!==e}function N(e){if(!("layerType"in e))return!!e.charts?.length;switch(e.layerType){case"CatalogLayer":return!!e.footprintLayer?.charts?.length;case"OrientedImageryLayer":return!!e.charts?.length;case"SubtypeGroupLayer":return!!e.layers.some(e=>!!e.charts?.length);case"SubtypeGroupTable":return!!e.tables.some(e=>!!e.charts?.length)}return!1}function R(e,t){let r=0,a=0,n=0,o=0,i=0,s=0,u=0;for(const e of[...t.layers,...t.tables])if(N(e)&&u++,"layerType"in e)switch(e.layerType){case"CatalogLayer":r++;break;case"OrientedImageryLayer":a++;break;case"ParcelLayer":i++;break;case"SubtypeGroupLayer":n++;break;case"SubtypeGroupTable":o++;break;case"UtilityNetworkLayer":s++}(0,l.Sm)(e,l.mm.CATALOG_LAYER,r>0),(0,l.Sm)(e,l.mm.ORIENTED_IMAGERY_LAYER,a>0),(0,l.Sm)(e,l.mm.PARCEL_FABRIC,i>0),(0,l.Sm)(e,l.mm.SUBTYPE_GROUP_LAYER,n>0),(0,l.Sm)(e,l.mm.SUBTYPE_GROUP_TABLE,o>0),(0,l.Sm)(e,l.mm.UTILITY_NETWORK,s>0),(0,l.Sm)(e,l.mm.CHARTS,u>0)}function E(e,t,r){R(t,r)}async function U(e,t,r){const{url:a,layerId:n,title:i,fullExtent:s,isTable:u}=e,c=(0,o.qg)(a);t.url=("FeatureServer"===c?.serverType?a:`${a}/${n}`)??null,t.title||=i,t.extent=null,u||null==s||(t.extent=await(0,l.sQ)(s)),function(e,t,r){(0,l.OM)(t,l.mm.METADATA),(0,l.Sm)(t,l.mm.MULTI_LAYER,e.length>1),(0,l.Sm)(t,l.mm.SINGLE_LAYER,1===e.length),(0,l.Sm)(t,l.mm.TABLE,r.tables.length>0&&0===r.layers.length),R(t,r)}([e],t,r)}async function C(e,t){return(0,n.UN)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>S(t,[e]),errorNamePrefix:y,setItemProperties:E},t)}async function x(e,t,r){return(0,n.Uh)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>Promise.resolve(b(e)),errorNamePrefix:f,newItem:t,setItemProperties:U},r)}},71530(e,t,r){r.d(t,{UN:()=>b,Uh:()=>S});var a=r(49186),n=r(46130),o=r(20655),i=r(80812),s=r(88788),l=r(10407),u=r(26121);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.A(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function y(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function f(e){const{item:t,errorNamePrefix:r,layer:n,validateItem:o}=e;if(function(e){const{item:t,itemType:r,additionalItemType:n,errorNamePrefix:o,layer:i}=e,s=[r];if(n&&s.push(n),!s.includes(t.type)){const e=s.map(e=>`'${e}'`).join(", ");throw new a.A(`${o}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:i})}}(e),o){const e=o(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.A(`${r}:portal-item-not-set`,y(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.A(`${r}:portal-item-not-loaded`,y(t,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.A.getDefault(),f({...e,item:a}),a}function d(e){return(0,s.m)(e,"portal-item")}async function h(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function w(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}async function b(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=r.portalItem,y=o?o(u):d(u),f=await h(r,y,{...t,supplementalUnsupportedErrors:l}),m=await a({layer:r,layerJSON:f},u);return await(i?.(r,u,m)),w(u),await u.update({data:m}),(0,n.v)(y),await(s?.(u,y)),u}async function S(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),y=o?o(u):d(u),f=await h(r,y,{...t,supplementalUnsupportedErrors:l}),p=await a({layer:r,layerJSON:f},u);return await i(r,u,p),w(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,p,t),r.portalItem=u,(0,n.v)(y),await(s?.(u,y)),u}},88788(e,t,r){r.d(t,{m:()=>i,v:()=>o});var a=r(84952),n=r(20655);function o(e,t){return{...s(e,t),readResourcePaths:[]}}function i(e,t,r){const n=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...s(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function s(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},26121(e,t,r){r.d(t,{I6:()=>l,ci:()=>s,dL:()=>i});var a=r(49186),n=r(77548),o=r(59923);async function i(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function s(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new a.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(n=n.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),a&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new a.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}function l(e){return(0,n.qd)(e).some(e=>!!e.charts?.length)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5740],{46130(e,t,r){r.d(t,{v:()=>n});var a=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},33359(e,t,r){r.d(t,{save:()=>C,saveAs:()=>x});var a=r(4576),n=(r(49186),r(71530)),o=r(60694),i=r(23154),s=(r(20655),r(80812),r(88788)),l=r(10407);const u="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"dimension-feature"===t||"annotation-feature"===t)&&"feature-layer"===e?.source?.type}function m(e){return{isValid:p(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function d(e,t){const r=(0,s.m)(e,"portal-item");return t?.isTable&&(r.layerContainerType="tables"),r}function h(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)w(a)?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e,t){return e.isTable}function b(e){return h([e])}async function S(e,t){return/\/\d+\/?$/.test(e.url)?b(t[0]):async function(e,t){if(e.reverse(),!t)return h(e);const a=await async function(e,t){let a,n=await e.fetchData("json");if(!function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(n)||(0,l.Y)(e,l.mm.HOSTED_SERVICE))a=!0;else{if(function(e){return[...e.layers,...e.tables].every(e=>"layerType"in e&&!!e.layerType)}(n))return n;a=!1}n??={},function(e){e.layers??=[],e.tables??=[]}(n);const{layer:{url:o,customParameters:s,apiKey:u}}=t[0];return await async function(e,t,a,n){const{url:o,customParameters:s,apiKey:l}=t,{serviceJSON:u,layersJSON:c}=await(0,i.A6)(o,{customParameters:s,apiKey:l});if(!n)return void L(e,u);const y=T(e.layers,u.layers,a),f=T(e.tables,u.tables,a);e.layers=y.itemResources,e.tables=f.itemResources,L(e,u);const p=[...y.added,...f.added],m=c?[...c.layers,...c.tables]:[];await async function(e,t,a,n){const o=await async function(e){const t=new Set,a=[];for(const{type:n}of e){const e=(0,i.Jo)(n);if(e&&!t.has(n))switch(t.add(n),e){case"AnnotationFeatureLayer":a.push(r.e(737).then(()=>r(20737)).then(e=>e.default));break;case"CatalogLayer":a.push(Promise.all([r.e(1214),r.e(5051),r.e(4473),r.e(9789),r.e(893),r.e(7013),r.e(7067)]).then(()=>r(83508)).then(e=>e.default));break;case"DimensionFeatureLayer":a.push(r.e(5077).then(()=>r(25077)).then(e=>e.default));break;case"FeatureLayer":a.push(Promise.all([r.e(5620),r.e(9953),r.e(1214),r.e(5051),r.e(4473),r.e(1017),r.e(9789),r.e(8589),r.e(4500)]).then(()=>r(18589)).then(e=>e.default));break;case"OrientedImageryLayer":a.push(Promise.all([r.e(5620),r.e(9953),r.e(1214),r.e(5051),r.e(4473),r.e(1017),r.e(9789),r.e(8589),r.e(5651)]).then(()=>r(16852)).then(e=>e.default))}}const n=await Promise.all(a),o=new Map;return Array.from(t).forEach((e,t)=>{o.set(e,n[t])}),o}(t),s=[];for(const{id:e,type:r}of t){const t=o.get(r);t&&s.push(new t({url:a,layerId:e,sourceJSON:n.find(({id:t})=>t===e)}))}await Promise.allSettled(s.map(e=>e.load()));for(const t of s){const{layerId:r,loaded:a}=t;if(!a||!("defaultPopupTemplate"in t)||!t.defaultPopupTemplate)continue;const n={id:r,popupInfo:t.defaultPopupTemplate.toJSON()};g(t,"ArcGISFeatureLayer"===t.operationalLayerType?n:{...n,layerType:t.operationalLayerType},e)}}(e,p,o,m)}(n,{url:o??"",customParameters:s,apiKey:u},t.map(e=>e.layer.layerId),a),n}(t,e);for(const t of e)g(t.layer,t.layerJSON,a);return function(e,t){const r=[],a=[];for(const{layer:e}of t){const{isTable:t,layerId:n}=e;t?a.push(n):r.push(n)}v(e.layers,r),v(e.tables,a)}(a,e),a}(t,e)}function v(e,t){if(e.length<2)return;const r=[];for(const{id:t}of e)r.push(t);(0,a.aI)(r.sort(I),t.slice().sort(I))&&e.sort((e,r)=>{const a=t.indexOf(e.id),n=t.indexOf(r.id);return a<n?-1:a>n?1:0})}function I(e,t){return e<t?-1:e>t?1:0}function T(e,t,r){const n=(0,a.iv)(e,t,(e,t)=>e.id===t.id);e=e.filter(e=>!n.removed.some(t=>t.id===e.id));const o=n.added;for(const{id:t}of o)e.push({id:t});return{itemResources:e,added:o.filter(({id:e})=>!r.includes(e))}}function g(e,t,r){e.isTable?A(r.tables,t):A(r.layers,t)}function A(e,t){const r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}function L(e,t){const r=e.layers??[],a=e.tables??[],n=[...t.layers??[],...t.tables??[]];for(const e of[...r,...a]){const{id:t}=e;if("layerType"in e&&e.layerType)continue;const r=n.find(({id:e})=>e===t);if(!r)continue;const o=(0,i.Aq)(r.type,a.includes(e));o&&P(0,o)&&O(o)&&(e.layerType=o)}}function P(e,t){return"ArcGISFeatureLayer"!==t&&"Table"!==t}function O(e){return"ArcGISFeatureLayer"!==e&&"Table"!==e}function N(e){if(!("layerType"in e))return!!e.charts?.length;switch(e.layerType){case"CatalogLayer":return!!e.footprintLayer?.charts?.length;case"OrientedImageryLayer":return!!e.charts?.length;case"SubtypeGroupLayer":return!!e.layers.some(e=>!!e.charts?.length);case"SubtypeGroupTable":return!!e.tables.some(e=>!!e.charts?.length)}return!1}function R(e,t){let r=0,a=0,n=0,o=0,i=0,s=0,u=0;for(const e of[...t.layers,...t.tables])if(N(e)&&u++,"layerType"in e)switch(e.layerType){case"CatalogLayer":r++;break;case"OrientedImageryLayer":a++;break;case"ParcelLayer":i++;break;case"SubtypeGroupLayer":n++;break;case"SubtypeGroupTable":o++;break;case"UtilityNetworkLayer":s++}(0,l.Sm)(e,l.mm.CATALOG_LAYER,r>0),(0,l.Sm)(e,l.mm.ORIENTED_IMAGERY_LAYER,a>0),(0,l.Sm)(e,l.mm.PARCEL_FABRIC,i>0),(0,l.Sm)(e,l.mm.SUBTYPE_GROUP_LAYER,n>0),(0,l.Sm)(e,l.mm.SUBTYPE_GROUP_TABLE,o>0),(0,l.Sm)(e,l.mm.UTILITY_NETWORK,s>0),(0,l.Sm)(e,l.mm.CHARTS,u>0)}function E(e,t,r){R(t,r)}async function U(e,t,r){const{url:a,layerId:n,title:i,fullExtent:s,isTable:u}=e,c=(0,o.qg)(a);t.url=("FeatureServer"===c?.serverType?a:`${a}/${n}`)??null,t.title||=i,t.extent=null,u||null==s||(t.extent=await(0,l.sQ)(s)),function(e,t,r){(0,l.OM)(t,l.mm.METADATA),(0,l.Sm)(t,l.mm.MULTI_LAYER,e.length>1),(0,l.Sm)(t,l.mm.SINGLE_LAYER,1===e.length),(0,l.Sm)(t,l.mm.TABLE,r.tables.length>0&&0===r.layers.length),R(t,r)}([e],t,r)}async function C(e,t){return(0,n.UN)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>S(t,[e]),errorNamePrefix:y,setItemProperties:E},t)}async function x(e,t,r){return(0,n.Uh)({layer:e,itemType:u,validateLayer:m,createJSONContext:t=>d(t,e),createItemData:(e,t)=>Promise.resolve(b(e)),errorNamePrefix:f,newItem:t,setItemProperties:U},r)}},71530(e,t,r){r.d(t,{UN:()=>b,Uh:()=>S});var a=r(49186),n=r(46130),o=r(20655),i=r(80812),s=r(88788),l=r(10407),u=r(26121);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.A(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function y(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function f(e){const{item:t,errorNamePrefix:r,layer:n,validateItem:o}=e;if(function(e){const{item:t,itemType:r,additionalItemType:n,errorNamePrefix:o,layer:i}=e,s=[r];if(n&&s.push(n),!s.includes(t.type)){const e=s.map(e=>`'${e}'`).join(", ");throw new a.A(`${o}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:i})}}(e),o){const e=o(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.A(`${r}:portal-item-not-set`,y(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.A(`${r}:portal-item-not-loaded`,y(t,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.A.getDefault(),f({...e,item:a}),a}function d(e){return(0,s.m)(e,"portal-item")}async function h(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function w(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}async function b(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=r.portalItem,y=o?o(u):d(u),f=await h(r,y,{...t,supplementalUnsupportedErrors:l}),m=await a({layer:r,layerJSON:f},u);return await(i?.(r,u,m)),w(u),await u.update({data:m}),(0,n.v)(y),await(s?.(u,y)),u}async function S(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),y=o?o(u):d(u),f=await h(r,y,{...t,supplementalUnsupportedErrors:l}),p=await a({layer:r,layerJSON:f},u);return await i(r,u,p),w(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,p,t),r.portalItem=u,(0,n.v)(y),await(s?.(u,y)),u}},88788(e,t,r){r.d(t,{m:()=>i,v:()=>o});var a=r(84952),n=r(20655);function o(e,t){return{...s(e,t),readResourcePaths:[]}}function i(e,t,r){const n=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...s(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function s(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},26121(e,t,r){r.d(t,{I6:()=>l,ci:()=>s,dL:()=>i});var a=r(49186),n=r(77548),o=r(59923);async function i(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function s(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new a.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(n=n.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),a&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new a.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}function l(e){return(0,n.qd)(e).some(e=>!!e.charts?.length)}}}]);