@arcgis/core 4.34.0-next.67 → 4.34.0-next.69

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 (181) hide show
  1. package/applications/Components/analysisUtils.d.ts +1 -0
  2. package/applications/Components/analysisUtils.js +1 -1
  3. package/applications/MapViewer/mediaUtils.d.ts +1 -0
  4. package/applications/MapViewer/mediaUtils.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/functions/measures.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/097a5c333de28ec5e16f.js +1 -0
  9. package/assets/esri/core/workers/chunks/2f44848916051f5501eb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2cd27b06226e30aec5da.js → 3cef77453623bbb37ad2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3d2629357242492afcfa.js +1 -0
  12. package/assets/esri/core/workers/chunks/49486c2e12e768b347ed.js +1 -0
  13. package/assets/esri/core/workers/chunks/{cad03967e132a28512c2.js → 4aa98309081e6889ccbb.js} +1 -1
  14. package/assets/esri/core/workers/chunks/570b17a1a4ab405bbdcb.js +1 -0
  15. package/assets/esri/core/workers/chunks/5a6b487b70ca85a45f57.js +1 -0
  16. package/assets/esri/core/workers/chunks/5a95688651d7e8b7101d.js +1 -0
  17. package/assets/esri/core/workers/chunks/6433116597021a9af680.js +1 -0
  18. package/assets/esri/core/workers/chunks/{5d8c64693830506c8776.js → 643acb12ec6a1d4b4fbb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{90491262b6d6a126c32f.js → 7944c18b270c85ff2e41.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{35df19d1eab3a694c3fa.js → 978fab0f0b10edde4ff8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{27027493a8dba8305693.js → a07321a901d6847d1a6b.js} +1 -1
  22. package/assets/esri/core/workers/chunks/a6f66492651646c18f10.js +1 -0
  23. package/assets/esri/core/workers/chunks/{a44f17397d8589433dae.js → b683b0fa7fc430b4d9c5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{2f7e192ee2066f863e1d.js → c908184d747d33366881.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{997a2a1a51039ce7e4e3.js → dd84f630466a26722d57.js} +1 -1
  26. package/assets/esri/core/workers/chunks/e2486bf5546443408c85.js +1 -0
  27. package/assets/esri/core/workers/chunks/{96102a9296afd1bfe1a9.js → e956d437c0c2ea81db93.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{d6f5297f7b323c340727.js → f060a52a9b69eb250d63.js} +1 -1
  29. package/assets/esri/core/workers/chunks/f1865b28f0f75cadd716.js +1 -0
  30. package/assets/esri/core/workers/chunks/{06ff5f34ad9bdf9705de.js → f47a0b9e500af2b9453b.js} +8 -2
  31. package/assets/esri/core/workers/chunks/f8adac87e48ea86bec21.js +1 -0
  32. package/assets/esri/core/workers/chunks/fe475b1ecdefecfcd541.js +1 -0
  33. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  34. package/assets/esri/themes/dark/main.css +1 -1
  35. package/assets/esri/themes/light/main.css +1 -1
  36. package/assets/esri/themes/light/view.css +1 -1
  37. package/chunks/ComponentShader.glsl.js +42 -36
  38. package/chunks/LineSeries.js +1 -1
  39. package/config.js +1 -1
  40. package/core/MemCache.js +1 -1
  41. package/core/MemCachePool.js +1 -1
  42. package/editing/geometry/lineUtils.js +1 -1
  43. package/geometry/ellipsoidUtils.js +1 -1
  44. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  45. package/geometry/support/curves/circleUtils.js +1 -1
  46. package/geometry/support/curves/curveLength.js +1 -1
  47. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  48. package/interfaces.d.ts +72 -527
  49. package/kernel.js +1 -1
  50. package/layers/support/ElevationTileData.js +1 -1
  51. package/layers/support/gaussianSplatUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/support/elevationInfoUtils.js +1 -1
  54. package/support/revision.js +1 -1
  55. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  56. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  57. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  58. package/views/2d/interactive/editingTools/MediaTransformToolsWrapper.js +5 -0
  59. package/views/3d/analysis/ElevationProfile/ElevationProfileSceneLineComputation.js +1 -1
  60. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +5 -0
  61. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  62. package/views/3d/glTF/loader.js +1 -1
  63. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  64. package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
  65. package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
  66. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  67. package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
  68. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  69. package/views/3d/layers/I3SMeshView3D.js +1 -1
  70. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  71. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  72. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  73. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  74. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  75. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  76. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  77. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  78. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  80. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  81. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  82. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  83. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  84. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  85. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  87. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  88. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  89. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  90. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  93. package/views/3d/layers/graphics/Labeler.js +1 -1
  94. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  95. package/views/3d/layers/graphics/QueryEngineCache.js +1 -1
  96. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  97. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  98. package/views/3d/layers/i3s/CachedMeshData.js +1 -1
  99. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  100. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  101. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  102. package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
  103. package/views/3d/layers/support/FeatureTile.js +1 -1
  104. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  105. package/views/3d/support/CombinedElevationProvider.js +1 -1
  106. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  107. package/views/3d/terrain/MapDataCacheItem.js +5 -0
  108. package/views/3d/terrain/OverlayManager.js +1 -1
  109. package/views/3d/terrain/OverlayRenderer.js +1 -1
  110. package/views/3d/terrain/TerrainSurface.js +1 -1
  111. package/views/3d/terrain/Tile.js +1 -1
  112. package/views/3d/terrain/TileTexture.js +1 -1
  113. package/views/3d/webgl/ManagedFBO.js +1 -1
  114. package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
  115. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  116. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  117. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  118. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  119. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  120. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +8 -2
  121. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  122. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  125. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  126. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  127. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  128. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  129. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +17 -0
  130. package/views/GroundView.js +1 -1
  131. package/views/analysis/ElevationProfile/ElevationProfileChart.js +5 -0
  132. package/views/analysis/ElevationProfile/constants.js +1 -1
  133. package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +5 -0
  134. package/views/analysis/ElevationProfile/elevationProfileChartTheme.js +5 -0
  135. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  136. package/views/webgl/Texture.js +1 -1
  137. package/views/webgl/VertexArrayObject.js +1 -1
  138. package/widgets/Bookmarks.js +1 -1
  139. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  140. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  141. package/widgets/Editor/support/EditorItem.js +1 -1
  142. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  143. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  144. package/widgets/Expand.js +1 -1
  145. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  146. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  147. package/widgets/support/SelectionList.js +1 -1
  148. package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +0 -1
  149. package/assets/esri/core/workers/chunks/0f20c0eec850a39620a1.js +0 -1
  150. package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +0 -1
  151. package/assets/esri/core/workers/chunks/39d69afc9da9db0c75ab.js +0 -1
  152. package/assets/esri/core/workers/chunks/548818df658b607a364e.js +0 -1
  153. package/assets/esri/core/workers/chunks/70dc7ec6474f0801bc04.js +0 -1
  154. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +0 -1
  155. package/assets/esri/core/workers/chunks/8a104b35708a492bd614.js +0 -1
  156. package/assets/esri/core/workers/chunks/a634764dec5404f4a1d7.js +0 -1
  157. package/assets/esri/core/workers/chunks/bafd9b0f6e817252cb31.js +0 -1
  158. package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +0 -1
  159. package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +0 -1
  160. package/assets/esri/core/workers/chunks/f4d4c1f13522f20b00d1.js +0 -1
  161. package/graphic/BuildingGraphicOrigin.d.ts +0 -4
  162. package/graphic/CSVGraphicOrigin.d.ts +0 -4
  163. package/graphic/CatalogGraphicOrigin.d.ts +0 -4
  164. package/graphic/FeatureGraphicOrigin.d.ts +0 -4
  165. package/graphic/GeoJSONGraphicOrigin.d.ts +0 -4
  166. package/graphic/GeoRSSGraphicOrigin.d.ts +0 -4
  167. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +0 -4
  168. package/graphic/MapImageGraphicOrigin.d.ts +0 -4
  169. package/graphic/MapNotesGraphicOrigin.d.ts +0 -4
  170. package/graphic/OGCFeatureGraphicOrigin.d.ts +0 -4
  171. package/graphic/OrientedImageryGraphicOrigin.d.ts +0 -4
  172. package/graphic/ParquetGraphicOrigin.d.ts +0 -4
  173. package/graphic/PointCloudGraphicOrigin.d.ts +0 -4
  174. package/graphic/SceneGraphicOrigin.d.ts +0 -4
  175. package/graphic/StreamGraphicOrigin.d.ts +0 -4
  176. package/graphic/SubtypeGroupGraphicOrigin.d.ts +0 -4
  177. package/graphic/TileGraphicOrigin.d.ts +0 -4
  178. package/graphic/VoxelGraphicOrigin.d.ts +0 -4
  179. package/graphic/WCSGraphicOrigin.d.ts +0 -4
  180. package/graphic/WFSGraphicOrigin.d.ts +0 -4
  181. package/graphic/graphicOrigins.d.ts +0 -22
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3543,7367],{71163:(n,e,t)=>{t.d(e,{C:()=>c});var r=t(29953);let a,o,i=!1;function s(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(n=>{o=n,i=!0,a=void 0})}async function c(n,e){return i?o.apply("invokeGeometryOp",[n,e]):(await s(),c(n,e))}},80672:(n,e,t)=>{t.d(e,{R:()=>a});var r=t(20655);function a(n,e){return null===n?e:new r.A({url:n.field("url")})}},87367:(n,e,t)=>{t.r(e),t.d(e,{registerFunctions:()=>C});var r=t(47609),a=t(66395),o=t(85935),i=t(78502),s=t(78878),c=t(80672),l=t(81844),u=t(71163),f=t(4576),d=t(5443),w=t(91075),h=t(48526),p=t(86738),y=t(39829),g=t(82799),m=t(65864),v=t(20655),S=t(70333),b=t(78888);async function D(n,e,t){const r=S.id?.findCredential(n.restUrl);if(!r)return null;if("loaded"===n.loadStatus&&""===e&&n.user?.sourceJSON&&!1===t)return n.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(t&&(a.query.returnUserLicenseTypeExtensions=!0),""===e){const e=await(0,b.A)(n.restUrl+"/community/self",a);if(e.data){const n=e.data;if(n?.username)return n}return null}const o=await(0,b.A)(n.restUrl+"/community/users/"+e,a);if(o.data){const n=o.data;return n.error?null:n}return null}var A=t(54218);function $(n){if(null==n)return n;switch(typeof n){case"string":case"number":return n;default:throw new o.D$(null,"InvalidParameter",null)}}function C(n){"async"===n.mode&&(n.functions.disjoint=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]||null===a[1]||(0,u.C)("disjoint",[a[0].toJSON(),a[1].toJSON()])))},n.functions.intersects=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("intersects",[a[0].toJSON(),a[1].toJSON()])))},n.functions.touches=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("touches",[a[0].toJSON(),a[1].toJSON()])))},n.functions.crosses=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("crosses",[a[0].toJSON(),a[1].toJSON()])))},n.functions.within=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("within",[a[0].toJSON(),a[1].toJSON()])))},n.functions.contains=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("contains",[a[0].toJSON(),a[1].toJSON()])))},n.functions.overlaps=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("overlaps",[a[0].toJSON(),a[1].toJSON()])))},n.functions.equals=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>((0,s.B)(a,2,2,e,t),a[0]===a[1]||(a[0]instanceof w.A&&a[1]instanceof w.A?(0,u.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,s.e)(a[0])&&(0,s.e)(a[1])||!!((0,s.g)(a[0])&&(0,s.g)(a[1])||(0,s.f)(a[0])&&(0,s.f)(a[1])))&&a[0].equals(a[1]))))},n.functions.relate=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,3,3,e,t),a[0]instanceof w.A&&a[1]instanceof w.A)return(0,u.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,s.u)(a[2])]);if(a[0]instanceof w.A&&null===a[1])return!1;if(a[1]instanceof w.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new o.D$(e,"InvalidParameter",t)})},n.functions.intersection=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]||null===a[1]?null:(0,m.rS)(await(0,u.C)("intersection",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.union=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(0===(a=(0,s.C)(a)).length)throw new o.D$(e,"WrongNumberOfParameters",t);const c=[];if(1===a.length)if((0,A.cy)(a[0])){for(const n of(0,s.C)(a[0]))if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}}else{if(!(0,s.j)(a[0])){if(a[0]instanceof w.A)return(0,s.D)((0,i.Yq)(a[0]),e.spatialReference);if(null===a[0])return null;throw new o.D$(e,"InvalidParameter",t)}for(const n of(0,s.C)(a[0].toArray()))if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}}else for(const n of a)if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}return 0===c.length?null:(0,m.rS)(await(0,u.C)("union",[c]))})},n.functions.difference=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]?null:null===a[1]?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("difference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.symmetricdifference=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]&&null===a[1]?null:null===a[0]?(0,i.Yq)(a[1]):null===a[1]?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.clip=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,e,t),!(a[1]instanceof d.A)&&null!==a[1])throw new o.D$(e,"InvalidParameter",t);if(null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return null===a[1]?null:(0,m.rS)(await(0,u.C)("clip",[a[0].toJSON(),a[1].toJSON()]))})},n.functions.cut=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,e,t),!(a[1]instanceof g.A)&&null!==a[1])throw new o.D$(e,"InvalidParameter",t);if(null===a[0])return[];if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return null===a[1]?[(0,i.Yq)(a[0])]:(await(0,u.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map(n=>(0,m.rS)(n))})},n.functions.area=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if((0,s.B)(a,1,2,e,t),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumArea($(a[1]),null,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}let i=a[0];if(((0,A.cy)(i)||(0,s.j)(i))&&(i=(0,s.E)(a[0],e.spatialReference)),null===i)return 0;if(!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("area",[i.toJSON(),$(a[1])])})},n.functions.areageodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{(0,s.B)(a,1,3,e,t);let i=(a=(0,s.C)(a))[0];((0,A.cy)(i)||(0,s.j)(i))&&(i=(0,s.E)(i,e.spatialReference));const c=$(a[1]),f=(0,l.rE)(a[2]);if((0,s.m)(i)){const n=await i.sumArea(c,f,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}if(null==i)return 0;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("geodeticArea",[i.toJSON(),c,f])})},n.functions.length=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if((0,s.B)(a,1,2,e,t),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumLength($(a[1]),null,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}let i=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.F)(a[0],e.spatialReference)),null===i)return 0;if(!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("length",[i.toJSON(),$(a[1])])})},n.functions.length3d=function(e,r){return n.standardFunctionAsync(e,r,async(n,a,i)=>{if((0,s.B)(i,1,2,e,r),null===(i=(0,s.C)(i))[0])return 0;let c=i[0];if(((0,A.cy)(i[0])||(0,s.j)(i[0]))&&(c=(0,s.F)(i[0],e.spatialReference)),null===c)return 0;if(!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:n,toLengthUnit:e}=await Promise.resolve().then(t.bind(t,40547)),r=(0,l.UI)(c);return n(c.spatialReference,e(i[1]),r)}return(0,u.C)("length",[c.toJSON(),$(i[1])])})},n.functions.lengthgeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{(0,s.B)(a,1,3,e,t);let i=(a=(0,s.C)(a))[0];((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.F)(a[0],e.spatialReference));const c=$(a[1]),f=(0,l.rE)(a[2]);if((0,s.m)(i)){const n=await i.sumLength(c,f,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}if(null===i)return 0;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("geodeticLength",[i.toJSON(),c,f])})},n.functions.distance=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,3,e,t);let i=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.G)(a[0],e.spatialReference)),!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);let c=a[1];if(((0,A.cy)(a[1])||(0,s.j)(a[1]))&&(c=(0,s.G)(a[1],e.spatialReference)),!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("distance",[i.toJSON(),c.toJSON(),$(a[2])])})},n.functions.distancegeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const i=a[0];if(!(i instanceof p.A))throw new o.D$(e,"InvalidParameter",t);const c=a[1];if(!(c instanceof p.A))throw new o.D$(e,"InvalidParameter",t);const f=new g.A({paths:[],spatialReference:i.spatialReference});return f.addPath([i,c]),(0,u.C)("geodeticLength",[f.toJSON(),$(a[2]),(0,l.rE)(a[3])])})},n.functions.densify=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);if(i<=0)throw new o.D$(e,"InvalidParameter",t);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,u.C)("densify",[a[0].toJSON(),i,$(a[2])]));default:return a[0]}})},n.functions.densifygeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const i=a[0];if(null==i)return null;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);if(c<=0)throw new o.D$(e,"InvalidParameter",t);const f=$(a[2]),d=(0,l.rE)(a[3]);switch(i.type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,u.C)("geodeticDensify",[i.toJSON(),c,f,d]));default:return i}})},n.functions.generalize=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,4,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.H)((0,s.J)(a[2],!0));return(0,m.rS)(await(0,u.C)("generalize",[a[0].toJSON(),i,$(a[3]),{removeDegenerateParts:c}]))})},n.functions.buffer=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);return 0===c?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("buffer",[a[0].toJSON(),c,$(a[2])]))})},n.functions.buffergeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const c=a[0];if(null==c)return null;if(!(0,s.h)(c))throw new o.D$(e,"InvalidParameter",t);const f=(0,s.s)(a[1]);if(isNaN(f))throw new o.D$(e,"InvalidParameter",t);if(0===f)return(0,i.Yq)(c);const d=$(a[2]),w=(0,l.rE)(a[3]);return(0,m.rS)(await(0,u.C)("geodesicBuffer",[c.toJSON(),f,d,w]))})},n.functions.offset=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,6,e,t),null===a[0])return null;if(!(a[0]instanceof y.A||a[0]instanceof g.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,l.R$)(a[3]),f=(0,s.s)((0,s.J)(a[4],10));if(isNaN(f))throw new o.D$(e,"InvalidParameter",t);const d=(0,s.s)((0,s.J)(a[5],0));if(isNaN(d))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("offset",[a[0].toJSON(),i,$(a[2]),{joins:c,miterLimit:f,flattenError:d}]))})},n.functions.rotate=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=a[0]instanceof d.A?y.A.fromExtent(a[0]):a[0],c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);const l=(0,s.J)(a[2],null);if(null===l){const n="point"===i.type?i:i.extent?.center;return(0,m.rS)(await(0,u.C)("rotate",[i.toJSON(),c,n?.x,n?.y]))}if(l instanceof p.A)return(0,m.rS)(await(0,u.C)("rotate",[i.toJSON(),c,l.x,l.y]));throw new o.D$(e,"InvalidParameter",t)})},n.functions.centroid=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,2,e,t),null===a[0])return null;const i=(0,l.Hz)(a[1]);let c=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(c="geometric"===i?(0,s.G)(a[0],e.spatialReference):(0,s.E)(a[0],e.spatialReference),null===c))return null;if(!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)("geometric"===i?await(0,u.C)("centroid",[c.toJSON()]):await(0,u.C)("labelPoint",[c.toJSON()]))})},n.functions.measuretocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.Cd)},n.functions.pointtocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.kr)},n.functions.distancetocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.Bn)},n.functions.multiparttosinglepart=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);if(a[0]instanceof p.A)return[(0,s.D)((0,i.Yq)(a[0]),e.spatialReference)];if(a[0]instanceof d.A)return[(0,s.D)((0,i.Yq)(a[0]),e.spatialReference)];const c=(0,m.rS)(await(0,u.C)("simplify",[a[0].toJSON()]));if(c instanceof y.A){const n=[],e=[];for(let t=0;t<c.rings.length;t++)if(c.isClockwise(c.rings[t])){const e=(0,m.rS)({rings:[c.rings[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(e)}else e.push({ring:c.rings[t],pt:c.getPoint(t,0)});for(let t=0;t<e.length;t++)for(let r=0;r<n.length;r++)if(n[r].contains(e[t].pt)){n[r].addRing(e[t].ring);break}return n}if(c instanceof g.A){const n=[];for(let e=0;e<c.paths.length;e++){const t=(0,m.rS)({paths:[c.paths[e]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(t)}return n}if(a[0]instanceof h.A){const n=[],t=(0,s.D)((0,i.Yq)(a[0]),e.spatialReference);for(let e=0;e<t.points.length;e++)n.push(t.getPoint(e));return n}return null})},n.functions.isselfintersecting=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,t)=>{(0,s.B)(t,1,1,n,e);let r=(t=(0,s.C)(t))[0];if(((0,A.cy)(t[0])||(0,s.j)(t[0]))&&(r=(0,s.F)(t[0],n.spatialReference)),r instanceof h.A){const n=r.points;for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if((0,f.aI)(n[e],n[t]))return!0;return!1}return(r instanceof g.A||r instanceof y.A)&&await(0,u.C)("isSelfIntersecting",[r.toJSON()])})},n.functions.issimple=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return!0;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("isSimple",[a[0].toJSON()])})},n.functions.simplify=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("simplify",[a[0].toJSON()]))})},n.functions.convexhull=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("convexHull",[a[0].toJSON()]))})},n.functions.getuser=function(e,t){return n.standardFunctionAsync(e,t,async(n,i,l)=>{(0,s.B)(l,0,2,e,t);let u=(0,s.J)(l[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,s.u)(u),0===l.length||l[0]instanceof r.A){let n;n=e.services?.portal?e.services.portal:v.A.getDefault(),l.length>0&&(n=(0,c.R)(l[0],n));const t=await D(n,u,f);if(t){const n=JSON.parse(JSON.stringify(t));for(const e of["lastLogin","created","modified"])void 0!==n[e]&&null!==n[e]&&(n[e]=new Date(n[e]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(e))}return null}let d=null;if((0,s.m)(l[0])&&(d=l[0]),d){if(f=!1,u)return null;await d.load();const n=await d.getOwningSystemUrl();if(!n){if(!u){const n=await d.getIdentityUser();return n?a.A.convertObjectToArcadeDictionary({username:n},(0,s.K)(e)):null}return null}let t;t=e.services?.portal?e.services.portal:v.A.getDefault(),t=(0,c.R)(new r.A(n),t);const o=await D(t,u,f);if(o){const n=JSON.parse(JSON.stringify(o));for(const e of["lastLogin","created","modified"])void 0!==n[e]&&null!==n[e]&&(n[e]=new Date(n[e]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(e))}return null}throw new o.D$(e,"InvalidParameter",t)})},n.functions.nearestcoordinate=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,i)=>{if(i=(0,s.C)(i),(0,s.B)(i,2,2,e,t),!(i[0]instanceof w.A||null===i[0]))throw new o.D$(e,"InvalidParameter",t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(e,"InvalidParameter",t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof d.A?y.A.fromExtent(i[0]):i[0],l=await(0,u.C)("getNearestCoordinate",[c.toJSON(),i[1].toJSON(),{calculateLeftRightSide:!0}]);return null===l?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(l.coordinate),distance:l.distance,sideOfLine:0===l.distance?"straddle":l.isRightSide?"right":"left"},(0,s.K)(e),!1,!0)})},n.functions.nearestvertex=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,i)=>{if(i=(0,s.C)(i),(0,s.B)(i,2,2,e,t),!(i[0]instanceof w.A||null===i[0]))throw new o.D$(e,"InvalidParameter",t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(e,"InvalidParameter",t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof d.A?y.A.fromExtent(i[0]):i[0],l=await(0,u.C)("getNearestVertex",[c.toJSON(),i[1].toJSON()]);return null===l?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(l.coordinate),distance:l.distance,sideOfLine:0===l.distance?"straddle":l.isRightSide?"right":"left"},(0,s.K)(e),!1,!0)})})}},93543:(n,e,t)=>{t.r(e),t.d(e,{executeScript:()=>cn,extend:()=>an,prepareScript:()=>sn});var r=t(48938),a=t(99719),o=t(72888),i=t(17433),s=t(15695),c=t(66395),l=t(85935),u=t(93833),f=t(92400),d=t(78878),w=t(19157),h=t(3367),p=t(63680),y=t(81113),g=t(32091),m=t(87367),v=t(41217),S=t(36770),b=t(47346),D=t(29304),A=t(4730),$=(t(44208),t(53966)),C=t(91075),N=t(16930),O=t(54218);const F=()=>$.A.getLogger("esri.arcade.arcadeAsyncRuntime"),I=Symbol("uninitialized");function x(n){if(n===I)throw new l.D$(null,"InvalidIdentifier",null)}function R(n){return x(n),n}function J(n,e){const t=(0,r.X)(e);if(null!==n.localScope){const e=n.localScope[t];if(void 0!==e)return{scope:n.localScope,id:t,var:e}}const a=n.globalScope[t];if(void 0!==a)return{scope:n.globalScope,id:t,var:a};throw new l.D$(n,"InvalidIdentifier",e)}function P(n,e,t="InvalidIdentifier"){const a=(0,r.X)(e);if(null!==n.localScope){const e=n.localScope[a];if(void 0!==e)return x(e),e.value}const o=n.globalScope[a];if(void 0!==o)return x(o),o.value;throw new l.D$(n,t,e)}const B=function(){};async function k(n,e){const t=[];for(let r=0;r<e.arguments.length;r++)t.push(await U(n,e.arguments[r]));return t}async function j(n,e,t){return!0===e.preparsed?t(n,null,e.arguments):t(n,e,await k(n,e))}B.prototype=Object.freeze(Object.create(null));class E extends f.fF{constructor(n,e,t,r){super(),this.definition=n,this.context=e,this._params=t,this._locals=r}createFunction(n){return(...e)=>{const t={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,services:this.context.services,abortSignal:this.context.abortSignal,localScope:new B,depthCounter:{depth:n.depthCounter.depth+1},globalScope:this.context.globalScope,track:this.context.track};if(t.depthCounter.depth>64)throw new l.D$(n,"MaximumCallDepth",null);return M(t,this.definition.body,this._params,this._locals,e,null)}}call(n,e){return K(n,e,(t,r,a)=>{const o={spatialReference:n.spatialReference,services:n.services,console:n.console,libraryResolver:n.libraryResolver,exports:n.exports,lrucache:n.lrucache,timeZone:n.timeZone??null,interceptor:n.interceptor,localScope:new B,abortSignal:n.abortSignal,globalScope:n.globalScope,depthCounter:{depth:n.depthCounter.depth+1},track:n.track};if(o.depthCounter.depth>64)throw new l.D$(n,"MaximumCallDepth",e);return M(o,this.definition.body,this._params,this._locals,a,e)})}marshalledCall(n,e,t,r){return r(n,e,async(a,o,i)=>{const s={spatialReference:n.spatialReference,services:n.services,globalScope:t.globalScope,depthCounter:{depth:n.depthCounter.depth+1},libraryResolver:n.libraryResolver,exports:n.exports,console:n.console,abortSignal:n.abortSignal,lrucache:n.lrucache,timeZone:n.timeZone??null,interceptor:n.interceptor,localScope:new B,track:n.track};return i=i.map(e=>!(0,d.i)(e)||e instanceof f.CU?e:(0,f.o6)(e,n,r)),(0,f.o6)(await M(s,this.definition.body,this._params,this._locals,i,e),t,r)})}}async function M(n,e,t,r,a,o){if(t.length!==a.length)throw new l.D$(n,"WrongNumberOfParameters",o);if(null!=n.localScope){for(let e=0;e<t.length;e++)n.localScope[t[e]]={value:a[e]};for(const e of r)n.localScope[e]=I}const i=await Z(n,e);if(i instanceof d.R)return i.value;if(i===d.z)throw new l.D$(n,"UnexpectedToken",o);if(i===d.A)throw new l.D$(n,"UnexpectedToken",o);return i instanceof d.I?i.value:i}class L extends a.x{constructor(n){super(),this.moduleGlobalContext=n}global(n){const e=(0,r.X)(n),t=this.moduleGlobalContext.globalScope[e];if(x(t),(0,d.i)(t.value)&&!(t.value instanceof f.CU)){const n=new f.CU;return n.fn=t.value,n.parameterEvaluator=j,n.context=this.moduleGlobalContext,this.moduleGlobalContext.globalScope[e]={value:n},n}return t.value}setGlobal(n,e){if((0,d.i)(e))throw new l.D$(null,"AssignModuleFunction",null);const t=(0,r.X)(n);if(void 0===this.moduleGlobalContext.globalScope[t])throw new l.D$(null,"ModuleExportNotFound",null);this.moduleGlobalContext.globalScope[t]={value:e}}hasGlobal(n){return this.moduleGlobalContext.exports.has((0,r.X)(n))}static async load(n,e){const{globals:t,exports:a}=(0,i.a)(e),s=new rn;for(const n of t)n in s||(s[n]=I);const c=n.spatialReference??N.A.WebMercator,l={lrucache:n.lrucache,interceptor:n.interceptor,services:n.services,console:n.console??on,abortSignal:n.abortSignal??r._,timeZone:n.timeZone??null,spatialReference:c,track:null,depthCounter:{depth:1},libraryResolver:new o.a(n.libraryResolver._moduleSingletons,e.loadedModules),exports:a,localScope:null,globalScope:s};return await T(l,e),new L(l)}}async function K(n,e,t){return!0===e.preparsed?t(n,null,e.arguments):t(n,e,await k(n,e))}async function U(n,e){e.breakpoint&&await e.breakpoint();try{switch(e.type){case"UpdateExpression":return await async function(n,e){const t=e.argument;if("CallExpression"===t.type)throw new l.D$(n,"NeverReach",e);if("MemberExpression"===t.type){const r=await U(n,t.object);let a,o;if(!0===t.computed)a=await U(n,t.property);else{if("Identifier"!==t.property.type)throw new l.D$(n,"Unrecognized",e);a=t.property.name}if((0,O.cy)(r)){if(!(0,O.Et)(a))throw new l.D$(n,"ArrayAccessMustBeNumber",e);if(a<0&&(a=r.length+a),a<0||a>=r.length)throw new l.D$(n,"OutOfBounds",e);o=(0,d.s)(r[a]),r[a]="++"===e.operator?o+1:o-1}else if(r instanceof c.A){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasField(a))throw new l.D$(n,"FieldNotFound",e,{key:a});o=(0,d.s)(r.field(a)),r.setField(a,"++"===e.operator?o+1:o-1)}else if(r instanceof L){if(!1===(0,O.Kg)(a))throw new l.D$(n,"ModuleAccessorMustBeString",e);if(!0!==r.hasGlobal(a))throw new l.D$(n,"ModuleExportNotFound",e);o=(0,d.s)(r.global(a)),r.setGlobal(a,"++"===e.operator?o+1:o-1)}else{if(!(0,d.k)(r))throw(0,d.j)(r)?new l.D$(n,"Immutable",e):new l.D$(n,"InvalidParameter",e);if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasField(a))throw new l.D$(n,"FieldNotFound",e,{key:a});o=(0,d.s)(r.field(a)),r.setField(a,"++"===e.operator?o+1:o-1)}return!1===e.prefix?o:"++"===e.operator?o+1:o-1}const r=J(n,t),a=(0,d.s)(R(r.var).value),o="++"===e.operator?a+1:a-1;return r.scope[r.id]={value:o},!1===e.prefix?a:"++"===e.operator?a+1:a-1}(n,e);case"AssignmentExpression":return await async function(n,e){const t=e.left;if("MemberExpression"===t.type){const r=await U(n,t.object);let a;if(!0===t.computed)a=await U(n,t.property);else{if("Identifier"!==t.property.type)throw new l.D$(n,"InvalidIdentifier",e);a=t.property.name}const o=await U(n,e.right);if((0,O.cy)(r)){if(!(0,O.Et)(a))throw new l.D$(n,"ArrayAccessMustBeNumber",e);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new l.D$(n,"OutOfBounds",e);if(a===r.length){if("="!==e.operator)throw new l.D$(n,"OutOfBounds",e);r[a]=_(o,e.operator,r[a],e,n)}else r[a]=_(o,e.operator,r[a],e,n)}else if(r instanceof c.A){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0===r.hasField(a))r.setField(a,_(o,e.operator,r.field(a),e,n));else{if("="!==e.operator)throw new l.D$(n,"FieldNotFound",e,{key:a});r.setField(a,_(o,e.operator,null,e,n))}}else if(r instanceof L){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasGlobal(a))throw new l.D$(n,"ModuleExportNotFound",e);r.setGlobal(a,_(o,e.operator,r.global(a),e,n))}else{if(!(0,d.k)(r))throw(0,d.j)(r)?new l.D$(n,"Immutable",e):new l.D$(n,"InvalidParameter",e);if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0===r.hasField(a))r.setField(a,_(o,e.operator,r.field(a),e,n));else{if("="!==e.operator)throw new l.D$(n,"FieldNotFound",e,{key:a});r.setField(a,_(o,e.operator,null,e,n))}}return d.v}const r=J(n,t),a=await U(n,e.right);return r.scope[r.id]={value:_(a,e.operator,"="!==e.operator?R(r.var).value:null,e,n)},d.v}(n,e);case"TemplateLiteral":return await async function(n,e){let t="",r=0;for(const a of e.quasis)if(t+=a.value?a.value.cooked:"",!1===a.tail){if(e.expressions[r]){const a=await U(n,e.expressions[r]);if((0,d.i)(a))throw new l.D$(n,"NoFunctionInTemplateLiteral",e);t+=(0,d.u)(a)}r++}return t}(n,e);case"Identifier":return X(n,e);case"MemberExpression":return await async function(n,e){const t=await U(n,e.object);if(null===t)throw new l.D$(n,"MemberOfNull",e);if(!1===e.computed){if("Identifier"===e.property.type){if(t instanceof c.A||(0,d.r)(t))return t.field(e.property.name);if(t instanceof C.A)return(0,s.Bl)(t,e.property.name,n,e);if(t instanceof L){if(!t.hasGlobal(e.property.name))throw new l.D$(n,"InvalidIdentifier",e);return t.global(e.property.name)}throw new l.D$(n,"InvalidMemberAccessKey",e)}throw new l.D$(n,"InvalidMemberAccessKey",e)}let r=await U(n,e.property);if(t instanceof c.A||(0,d.r)(t)){if((0,O.Kg)(r))return t.field(r);throw new l.D$(n,"InvalidMemberAccessKey",e)}if(t instanceof L){if((0,O.Kg)(r))return t.global(r);throw new l.D$(n,"InvalidMemberAccessKey",e)}if(t instanceof C.A){if((0,O.Kg)(r))return(0,s.Bl)(t,r,n,e);throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,O.cy)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l.D$(n,"OutOfBounds",e);return t[r]}throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,d.j)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length()+r),r>=t.length()||r<0)throw new l.D$(n,"OutOfBounds",e);return t.get(r)}throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,O.Kg)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l.D$(n,"OutOfBounds",e);return t[r]}throw new l.D$(n,"InvalidMemberAccessKey",e)}throw new l.D$(n,"InvalidMemberAccessKey",e)}(n,e);case"Literal":return e.value;case"CallExpression":return await async function(n,e){if("MemberExpression"===e.callee.type){const t=await U(n,e.callee.object);if(!(t instanceof L))throw new l.D$(n,"FunctionNotFound",e);const r=!1===e.callee.computed?e.callee.property.name:await U(n,e.callee.property);if(!t.hasGlobal(r))throw new l.D$(n,"FunctionNotFound",e);const a=t.global(r);if(!(0,d.i)(a))throw new l.D$(n,"CallNonFunction",e);return a.call(n,e)}if("Identifier"!==e.callee.type)throw new l.D$(n,"FunctionNotFound",e);const t=P(n,e.callee,"FunctionNotFound");if((0,d.i)(t))return t.call(n,e);throw new l.D$(n,"CallNonFunction",e)}(n,e);case"UnaryExpression":return await async function(n,e){const t=await U(n,e.argument);if((0,O.Lm)(t)){if("!"===e.operator)return!t;if("-"===e.operator)return-1*(0,d.s)(t);if("+"===e.operator)return 1*(0,d.s)(t);if("~"===e.operator)return~(0,d.s)(t);throw new l.D$(n,"UnsupportUnaryOperator",e)}if("-"===e.operator)return-1*(0,d.s)(t);if("+"===e.operator)return 1*(0,d.s)(t);if("~"===e.operator)return~(0,d.s)(t);throw new l.D$(n,"UnsupportUnaryOperator",e)}(n,e);case"BinaryExpression":return await async function(n,e){const t=await U(n,e.left),r=await U(n,e.right);switch(e.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,d.y)((0,d.s)(t),(0,d.s)(r),e.operator);case"==":return(0,d.x)(t,r);case"!=":return!(0,d.x)(t,r);case"<":case">":case"<=":case">=":return(0,d.w)(t,r,e.operator);case"+":return(0,O.Kg)(t)||(0,O.Kg)(r)?(0,d.u)(t)+(0,d.u)(r):(0,d.s)(t)+(0,d.s)(r);case"-":return(0,d.s)(t)-(0,d.s)(r);case"*":return(0,d.s)(t)*(0,d.s)(r);case"/":return(0,d.s)(t)/(0,d.s)(r);case"%":return(0,d.s)(t)%(0,d.s)(r);default:throw new l.D$(n,"UnsupportedOperator",e)}}(n,e);case"LogicalExpression":return await async function(n,e){const t=await U(n,e.left);if(!(0,O.Lm)(t))throw new l.D$(n,"LogicalExpressionOnlyBoolean",e);switch(e.operator){case"||":{if(!0===t)return t;const r=await U(n,e.right);if((0,O.Lm)(r))return r;throw new l.D$(n,"LogicExpressionOrAnd",e)}case"&&":{if(!1===t)return t;const r=await U(n,e.right);if((0,O.Lm)(r))return r;throw new l.D$(n,"LogicExpressionOrAnd",e)}default:throw new l.D$(n,"LogicExpressionOrAnd",e)}}(n,e);case"ArrayExpression":return await async function(n,e){const t=[];for(let r=0;r<e.elements.length;r++)t.push(await U(n,e.elements[r]));for(let r=0;r<t.length;r++){if((0,d.i)(t[r]))throw new l.D$(n,"NoFunctionInArray",e);t[r]===d.v&&(t[r]=null)}return t}(n,e);case"ObjectExpression":return await async function(n,e){const t=[];for(let r=0;r<e.properties.length;r++){const a=e.properties[r],o=await U(n,a.value),i="Identifier"===a.key.type?a.key.name:await U(n,a.key);t[r]={key:i,value:o}}const r=Object.create(null),a=new Map;for(let o=0;o<t.length;o++){const i=t[o];if((0,d.i)(i.value))throw new l.D$(n,"NoFunctionInDictionary",e);if(!1===(0,O.Kg)(i.key))throw new l.D$(n,"KeyMustBeString",e);let s=i.key.toString();const c=s.toLowerCase();a.has(c)?s=a.get(c):a.set(c,s),i.value===d.v?r[s]=null:r[s]=i.value}const o=new c.A(r);return o.immutable=!1,o}(n,e);default:throw new l.D$(n,"Unrecognized",e)}}catch(t){throw(0,l.Nh)(n,e,t)}}async function Z(n,e){e.breakpoint&&await e.breakpoint();try{switch(e.type){case"ImportDeclaration":return await async function(n,e){const t=J(n,e.specifiers[0].local),r=n.libraryResolver;if(null==r)throw F().error("Internal error: module loader not initialized"),new l.D$(n,"NeverReach",e);const a=r.loadLibrary(t.id);let o;return r._moduleSingletons?.has(a.uri)?o=r._moduleSingletons.get(a.uri):(o=await L.load(n,a.syntax),r._moduleSingletons?.set(a.uri,o)),t.scope[t.id]={value:o},d.v}(n,e);case"ExportNamedDeclaration":return await async function(n,e){return await Z(n,e.declaration),d.v}(n,e);case"VariableDeclaration":return await async function(n,e){for(const t of e.declarations)await Y(n,t);return d.v}(n,e);case"BlockStatement":return await T(n,e);case"FunctionDeclaration":return await async function(n,e){if(null!=n.localScope)throw F().error("Function declarations are only valid in global scope."),new l.D$(n,"NeverReach",e);const t=(0,r.X)(e.id);if(!(t in n.globalScope))throw F().error(`Function "${t}" not declared.`),new l.D$(n,"NeverReach",e);const a=(0,i.S)(e),o=e.params.map(n=>(0,r.X)(n)),s=Array.from(a).filter(n=>!o.includes(n));return n.globalScope[t]={value:new E(e,n,o,s)},d.v}(n,e);case"ReturnStatement":return await async function(n,e){if(null===e.argument)return new d.R(d.v);const t=await U(n,e.argument);return new d.R(t)}(n,e);case"IfStatement":return await async function(n,e){const t=await U(n,e.test);if(!0===t)return Z(n,e.consequent);if(!1===t)return null!==e.alternate?Z(n,e.alternate):d.v;throw new l.D$(n,"BooleanConditionRequired",e)}(n,e);case"ExpressionStatement":return await async function(n,e){const t=await U(n,e.expression);return t===d.v?d.v:new d.I(t)}(n,e);case"ForStatement":return await async function(n,e){try{for(null!==e.init&&("VariableDeclaration"===e.init.type?await Z(n,e.init):await U(n,e.init));;){if(null!==e.test){const t=await U(n,e.test);if(!0===n.abortSignal?.aborted)throw new l.D$(n,"Cancelled",e);if(!1===t)break;if(!0!==t)throw new l.D$(n,"BooleanConditionRequired",e)}const t=await Z(n,e.body);if(t===d.z)break;if(t instanceof d.R)return t;null!==e.update&&await U(n,e.update)}return d.v}catch(n){throw n}}(n,e);case"WhileStatement":return await async function(n,e){let t=await U(n,e.test);if(!1===t)return d.v;if(!0!==t)throw new l.D$(n,"BooleanConditionRequired",e);for(;!0===t;){const r=await Z(n,e.body);if(r===d.z)break;if(r instanceof d.R)return r;if(t=await U(n,e.test),!0!==t&&!1!==t)throw new l.D$(n,"BooleanConditionRequired",e)}return d.v}(n,e);case"ForInStatement":return await async function(n,e){const t=await U(n,e.right);"VariableDeclaration"===e.left.type&&await Z(n,e.left);const r=J(n,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left);return(0,O.cy)(t)||(0,O.Kg)(t)?await q(n,e,t,r):(0,d.j)(t)?await z(n,e,t,r):t instanceof c.A||(0,d.r)(t)?await q(n,e,t.keys(),r,"k"):(0,d.m)(t)?await G(n,e,t,r):(0,d.h)(t)?await q(n,e,(0,s.T)(t),r,"k"):d.v}(n,e);case"ForOfStatement":return await async function(n,e){const t=await U(n,e.right);"VariableDeclaration"===e.left.type&&await Z(n,e.left);const r=J(n,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left);return(0,O.cy)(t)||(0,O.Kg)(t)?await q(n,e,t,r,"k"):(0,d.j)(t)?await z(n,e,t,r,"k"):t instanceof c.A||(0,d.r)(t)?await async function(n,e,t,r){for(const a of t.keys()){const o=t.field(a);r.scope[r.id]={value:c.A.containerEntry(a,o)};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}(n,e,t,r):(0,d.m)(t)?await G(n,e,t,r):(0,d.h)(t)?await async function(n,e,t,r){for(const a of(0,s.T)(t)){const o=(0,s.Bl)(t,a,n,e,1);r.scope[r.id]={value:c.A.containerEntry(a,o)};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}(n,e,t,r):d.v}(n,e);case"BreakStatement":return d.z;case"EmptyStatement":return d.v;case"ContinueStatement":return d.A;default:throw new l.D$(n,"Unrecognized",e)}}catch(t){throw(0,l.Nh)(n,e,t)}}async function q(n,e,t,r,a="i"){const o=t.length;for(let i=0;i<o;i++){if("k"===a){if(i>=t.length)throw new l.D$(n,"OutOfBounds",e);r.scope[r.id]={value:t[i]}}else r.scope[r.id]={value:i};const o=await Z(n,e.body);if(o===d.z)break;if(o instanceof d.R)return o}return d.v}async function z(n,e,t,r,a="i"){const o=t.length();for(let i=0;i<o;i++){r.scope[r.id]="k"===a?{value:t.get(i)}:{value:i};const o=await Z(n,e.body);if(o===d.z)break;if(o instanceof d.R)return o}return d.v}async function G(n,e,t,r){const a=t.iterator(n.abortSignal);let o;for(;null!=(o=await a.next());){const a=u.A.createFromGraphicLikeObject(o.geometry,o.attributes,t,n.timeZone);a._underlyingGraphic=o,r.scope[r.id]={value:a};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}function _(n,e,t,r,a){switch(e){case"=":return n===d.v?null:n;case"/=":return(0,d.s)(t)/(0,d.s)(n);case"*=":return(0,d.s)(t)*(0,d.s)(n);case"-=":return(0,d.s)(t)-(0,d.s)(n);case"+=":return(0,O.Kg)(t)||(0,O.Kg)(n)?(0,d.u)(t)+(0,d.u)(n):(0,d.s)(t)+(0,d.s)(n);case"%=":return(0,d.s)(t)%(0,d.s)(n);default:throw new l.D$(a,"UnsupportedOperator",r)}}async function T(n,e){return W(n,e,0)}async function W(n,e,t){if(t>=e.body.length)return d.v;const r=await Z(n,e.body[t]);return r instanceof d.R||r===d.z||r===d.A||t===e.body.length-1?r:W(n,e,t+1)}async function Y(n,e){let t=null;t=null===e.init?null:await U(n,e.init),t===d.v&&(t=null);const r=J(n,e.id);r.scope[r.id]={value:t}}function X(n,e){return P(n,e)}async function V(n,e){(0,d.B)(null===e.arguments?[]:e.arguments,3,3,n,e);const t=await U(n,e.arguments[0]);if(!1===(0,O.Lm)(t))throw new l.D$(n,"BooleanConditionRequired",e);return U(n,t?e.arguments[1]:e.arguments[2])}async function H(n,e){(0,d.B)(null===e.arguments?[]:e.arguments,2,3,n,e);const t=await U(n,e.arguments[0]);if(3===e.arguments.length){const r=await U(n,e.arguments[1]),a=(0,s.jd)(t,r);return null!=a&&""!==a?a:U(n,e.arguments[2])}return null==t||""===t?U(n,e.arguments[1]):t}async function Q(n,e){if(e.arguments.length<2)throw new l.D$(n,"WrongNumberOfParameters",e);if(2===e.arguments.length)return U(n,e.arguments[1]);if((e.arguments.length-1)%2==0)throw new l.D$(n,"WrongNumberOfParameters",e);return nn(n,e,1,await U(n,e.arguments[0]))}async function nn(n,e,t,r){const a=await U(n,e.arguments[t]);if((0,d.x)(a,r))return U(n,e.arguments[t+1]);const o=e.arguments.length-t;return 1===o?U(n,e.arguments[t]):2===o?null:3===o?U(n,e.arguments[t+2]):nn(n,e,t+2,r)}async function en(n,e){if(e.arguments.length<3)throw new l.D$(n,"WrongNumberOfParameters",e);if(e.arguments.length%2==0)throw new l.D$(n,"WrongNumberOfParameters",e);const t=await U(n,e.arguments[0]);if(!1===(0,O.Lm)(t))throw new l.D$(n,"BooleanConditionRequired",e.arguments[0]);return tn(n,e,0,t)}async function tn(n,e,t,r){if(!0===r)return U(n,e.arguments[t+1]);if(3===e.arguments.length-t)return U(n,e.arguments[t+2]);const a=await U(n,e.arguments[t+2]);if(!1===(0,O.Lm)(a))throw new l.D$(n,"ModuleExportNotFound",e.arguments[t+2]);return tn(n,e,t+2,a)}const rn=function(){const n=Object.create(null);(0,y.d)(n,j),(0,D.d)(n,j),(0,g.d)(n,j,X),(0,S.d)(n,j),(0,v.d)(n,j),(0,b.d)(n,j),(0,A.dW)(n,j),(0,m.registerFunctions)({functions:n,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:j,standardFunctionAsync:K}),n.iif=V,n.defaultvalue=H,n.decode=Q,n.when=en;const e=function(){this.textformatting={value:c.A.textFormatting()}};(e.prototype=Object.create(null)).infinity=Object.freeze({value:Number.POSITIVE_INFINITY}),e.prototype.pi=Object.freeze({value:Math.PI});for(const[t,r]of Object.entries(n))e.prototype[t]=Object.freeze({value:new f.UQ(r)});return e}();function an(n){const e={mode:"async",compiled:!1,functions:Object.create(null),signatures:[],standardFunction:j,standardFunctionAsync:K,evaluateIdentifier:X};for(let t=0;t<n.length;t++)n[t].registerFunctions(e);for(const[n,t]of Object.entries(e.functions))rn.prototype[n]=Object.freeze({value:new f.UQ(t)});for(let n=0;n<e.signatures.length;n++)(0,w.WC)(e.signatures[n],"async")}function on(n){console.log(n)}function sn(n,e){const t=new Set(Object.keys(e?.vars||{}).map(n=>(0,r.X)(n))),a=new Set(Object.keys(e?.customfunctions||{}).map(n=>(0,r.X)(n))),{globals:s,exports:c}=(0,i.a)(n);return async e=>{const i=e.spatialReference??N.A.WebMercator;let w=null;n.usesModules&&(w=new o.a(new Map,n.loadedModules));const h=new rn;for(const n of a)null!=e.customfunctions&&n in e.customfunctions?h[n]={value:new f.UQ(e.customfunctions[n])}:h[n]=I;for(const n of t){if(null==e.vars||!(n in e.vars)){n in h||(h[n]=I);continue}const t=e.vars[n]??null;(0,O.DU)(t)?h[n]={value:u.A.createFromGraphic(t,e.timeZone??null)}:h[n]={value:t}}for(const n of s)n in h||(h[n]=I);const p={lrucache:e.lrucache,interceptor:e.interceptor,services:e.services,console:e.console??on,abortSignal:e.abortSignal??r._,timeZone:e.timeZone??null,spatialReference:i,track:e.track,depthCounter:{depth:1},libraryResolver:w,exports:c,localScope:null,globalScope:h},y=await T(p,n);if(y instanceof d.R||y instanceof d.I){const n=y.value;if((0,d.q)(n))return null;if((0,d.i)(n))throw new l.D$(p,"IllegalResult",null);return n}if((0,d.q)(y))return null;if(y===d.z)throw new l.D$(p,"IllegalResult",null);if(y===d.A)throw new l.D$(p,"IllegalResult",null);throw new l.D$(p,"NeverReach",null)}}function cn(n,e){return sn(n,e)(e)}an([p.A]),an([h.A])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3543,7367],{71163:(n,e,t)=>{t.d(e,{C:()=>c});var r=t(29953);let a,o,i=!1;function s(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(n=>{o=n,i=!0,a=void 0})}async function c(n,e){return i?o.apply("invokeGeometryOp",[n,e]):(await s(),c(n,e))}},80672:(n,e,t)=>{t.d(e,{R:()=>a});var r=t(20655);function a(n,e){return null===n?e:new r.A({url:n.field("url")})}},87367:(n,e,t)=>{t.r(e),t.d(e,{registerFunctions:()=>C});var r=t(47609),a=t(66395),o=t(85935),i=t(78502),s=t(78878),c=t(80672),l=t(16442),u=t(71163),f=t(4576),d=t(5443),w=t(91075),h=t(48526),p=t(86738),y=t(39829),g=t(82799),m=t(65864),v=t(20655),S=t(70333),b=t(78888);async function D(n,e,t){const r=S.id?.findCredential(n.restUrl);if(!r)return null;if("loaded"===n.loadStatus&&""===e&&n.user?.sourceJSON&&!1===t)return n.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(t&&(a.query.returnUserLicenseTypeExtensions=!0),""===e){const e=await(0,b.A)(n.restUrl+"/community/self",a);if(e.data){const n=e.data;if(n?.username)return n}return null}const o=await(0,b.A)(n.restUrl+"/community/users/"+e,a);if(o.data){const n=o.data;return n.error?null:n}return null}var A=t(54218);function $(n){if(null==n)return n;switch(typeof n){case"string":case"number":return n;default:throw new o.D$(null,"InvalidParameter",null)}}function C(n){"async"===n.mode&&(n.functions.disjoint=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]||null===a[1]||(0,u.C)("disjoint",[a[0].toJSON(),a[1].toJSON()])))},n.functions.intersects=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("intersects",[a[0].toJSON(),a[1].toJSON()])))},n.functions.touches=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("touches",[a[0].toJSON(),a[1].toJSON()])))},n.functions.crosses=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("crosses",[a[0].toJSON(),a[1].toJSON()])))},n.functions.within=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("within",[a[0].toJSON(),a[1].toJSON()])))},n.functions.contains=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("contains",[a[0].toJSON(),a[1].toJSON()])))},n.functions.overlaps=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null!==a[0]&&null!==a[1]&&(0,u.C)("overlaps",[a[0].toJSON(),a[1].toJSON()])))},n.functions.equals=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>((0,s.B)(a,2,2,e,t),a[0]===a[1]||(a[0]instanceof w.A&&a[1]instanceof w.A?(0,u.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,s.e)(a[0])&&(0,s.e)(a[1])||!!((0,s.g)(a[0])&&(0,s.g)(a[1])||(0,s.f)(a[0])&&(0,s.f)(a[1])))&&a[0].equals(a[1]))))},n.functions.relate=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,3,3,e,t),a[0]instanceof w.A&&a[1]instanceof w.A)return(0,u.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,s.u)(a[2])]);if(a[0]instanceof w.A&&null===a[1])return!1;if(a[1]instanceof w.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new o.D$(e,"InvalidParameter",t)})},n.functions.intersection=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]||null===a[1]?null:(0,m.rS)(await(0,u.C)("intersection",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.union=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(0===(a=(0,s.C)(a)).length)throw new o.D$(e,"WrongNumberOfParameters",t);const c=[];if(1===a.length)if((0,A.cy)(a[0])){for(const n of(0,s.C)(a[0]))if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}}else{if(!(0,s.j)(a[0])){if(a[0]instanceof w.A)return(0,s.D)((0,i.Yq)(a[0]),e.spatialReference);if(null===a[0])return null;throw new o.D$(e,"InvalidParameter",t)}for(const n of(0,s.C)(a[0].toArray()))if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}}else for(const n of a)if(null!==n){if(!(n instanceof w.A))throw new o.D$(e,"InvalidParameter",t);c.push(n.toJSON())}return 0===c.length?null:(0,m.rS)(await(0,u.C)("union",[c]))})},n.functions.difference=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]?null:null===a[1]?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("difference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.symmetricdifference=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>(a=(0,s.C)(a),(0,l.ZL)(a,e,t),null===a[0]&&null===a[1]?null:null===a[0]?(0,i.Yq)(a[1]):null===a[1]?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.clip=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,e,t),!(a[1]instanceof d.A)&&null!==a[1])throw new o.D$(e,"InvalidParameter",t);if(null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return null===a[1]?null:(0,m.rS)(await(0,u.C)("clip",[a[0].toJSON(),a[1].toJSON()]))})},n.functions.cut=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,e,t),!(a[1]instanceof g.A)&&null!==a[1])throw new o.D$(e,"InvalidParameter",t);if(null===a[0])return[];if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return null===a[1]?[(0,i.Yq)(a[0])]:(await(0,u.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map(n=>(0,m.rS)(n))})},n.functions.area=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if((0,s.B)(a,1,2,e,t),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumArea($(a[1]),null,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}let i=a[0];if(((0,A.cy)(i)||(0,s.j)(i))&&(i=(0,s.E)(a[0],e.spatialReference)),null===i)return 0;if(!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("area",[i.toJSON(),$(a[1])])})},n.functions.areageodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{(0,s.B)(a,1,3,e,t);let i=(a=(0,s.C)(a))[0];((0,A.cy)(i)||(0,s.j)(i))&&(i=(0,s.E)(i,e.spatialReference));const c=$(a[1]),f=(0,l.rE)(a[2]);if((0,s.m)(i)){const n=await i.sumArea(c,f,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}if(null==i)return 0;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("geodeticArea",[i.toJSON(),c,f])})},n.functions.length=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if((0,s.B)(a,1,2,e,t),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumLength($(a[1]),null,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}let i=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.F)(a[0],e.spatialReference)),null===i)return 0;if(!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("length",[i.toJSON(),$(a[1])])})},n.functions.length3d=function(e,r){return n.standardFunctionAsync(e,r,async(n,a,i)=>{if((0,s.B)(i,1,2,e,r),null===(i=(0,s.C)(i))[0])return 0;let c=i[0];if(((0,A.cy)(i[0])||(0,s.j)(i[0]))&&(c=(0,s.F)(i[0],e.spatialReference)),null===c)return 0;if(!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:n,toLengthUnit:e}=await Promise.resolve().then(t.bind(t,40547)),r=(0,l.UI)(c);return n(c.spatialReference,e(i[1]),r)}return(0,u.C)("length",[c.toJSON(),$(i[1])])})},n.functions.lengthgeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{(0,s.B)(a,1,3,e,t);let i=(a=(0,s.C)(a))[0];((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.F)(a[0],e.spatialReference));const c=$(a[1]),f=(0,l.rE)(a[2]);if((0,s.m)(i)){const n=await i.sumLength(c,f,e.abortSignal);if(e.abortSignal.aborted)throw new o.D$(e,"Cancelled",t);return n}if(null===i)return 0;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("geodeticLength",[i.toJSON(),c,f])})},n.functions.distance=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,3,e,t);let i=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(i=(0,s.G)(a[0],e.spatialReference)),!(i instanceof w.A))throw new o.D$(e,"InvalidParameter",t);let c=a[1];if(((0,A.cy)(a[1])||(0,s.j)(a[1]))&&(c=(0,s.G)(a[1],e.spatialReference)),!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("distance",[i.toJSON(),c.toJSON(),$(a[2])])})},n.functions.distancegeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const i=a[0];if(!(i instanceof p.A))throw new o.D$(e,"InvalidParameter",t);const c=a[1];if(!(c instanceof p.A))throw new o.D$(e,"InvalidParameter",t);const f=new g.A({paths:[],spatialReference:i.spatialReference});return f.addPath([i,c]),(0,u.C)("geodeticLength",[f.toJSON(),$(a[2]),(0,l.rE)(a[3])])})},n.functions.densify=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);if(i<=0)throw new o.D$(e,"InvalidParameter",t);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,u.C)("densify",[a[0].toJSON(),i,$(a[2])]));default:return a[0]}})},n.functions.densifygeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const i=a[0];if(null==i)return null;if(!(0,s.h)(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);if(c<=0)throw new o.D$(e,"InvalidParameter",t);const f=$(a[2]),d=(0,l.rE)(a[3]);switch(i.type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,u.C)("geodeticDensify",[i.toJSON(),c,f,d]));default:return i}})},n.functions.generalize=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,4,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.H)((0,s.J)(a[2],!0));return(0,m.rS)(await(0,u.C)("generalize",[a[0].toJSON(),i,$(a[3]),{removeDegenerateParts:c}]))})},n.functions.buffer=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);return 0===c?(0,i.Yq)(a[0]):(0,m.rS)(await(0,u.C)("buffer",[a[0].toJSON(),c,$(a[2])]))})},n.functions.buffergeodetic=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,e,t);const c=a[0];if(null==c)return null;if(!(0,s.h)(c))throw new o.D$(e,"InvalidParameter",t);const f=(0,s.s)(a[1]);if(isNaN(f))throw new o.D$(e,"InvalidParameter",t);if(0===f)return(0,i.Yq)(c);const d=$(a[2]),w=(0,l.rE)(a[3]);return(0,m.rS)(await(0,u.C)("geodesicBuffer",[c.toJSON(),f,d,w]))})},n.functions.offset=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,6,e,t),null===a[0])return null;if(!(a[0]instanceof y.A||a[0]instanceof g.A))throw new o.D$(e,"InvalidParameter",t);const i=(0,s.s)(a[1]);if(isNaN(i))throw new o.D$(e,"InvalidParameter",t);const c=(0,l.R$)(a[3]),f=(0,s.s)((0,s.J)(a[4],10));if(isNaN(f))throw new o.D$(e,"InvalidParameter",t);const d=(0,s.s)((0,s.J)(a[5],0));if(isNaN(d))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("offset",[a[0].toJSON(),i,$(a[2]),{joins:c,miterLimit:f,flattenError:d}]))})},n.functions.rotate=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);const i=a[0]instanceof d.A?y.A.fromExtent(a[0]):a[0],c=(0,s.s)(a[1]);if(isNaN(c))throw new o.D$(e,"InvalidParameter",t);const l=(0,s.J)(a[2],null);if(null===l){const n="point"===i.type?i:i.extent?.center;return(0,m.rS)(await(0,u.C)("rotate",[i.toJSON(),c,n?.x,n?.y]))}if(l instanceof p.A)return(0,m.rS)(await(0,u.C)("rotate",[i.toJSON(),c,l.x,l.y]));throw new o.D$(e,"InvalidParameter",t)})},n.functions.centroid=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,2,e,t),null===a[0])return null;const i=(0,l.Hz)(a[1]);let c=a[0];if(((0,A.cy)(a[0])||(0,s.j)(a[0]))&&(c="geometric"===i?(0,s.G)(a[0],e.spatialReference):(0,s.E)(a[0],e.spatialReference),null===c))return null;if(!(c instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)("geometric"===i?await(0,u.C)("centroid",[c.toJSON()]):await(0,u.C)("labelPoint",[c.toJSON()]))})},n.functions.measuretocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.Cd)},n.functions.pointtocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.kr)},n.functions.distancetocoordinate=function(e,t){return n.standardFunctionAsync(e,t,l.Bn)},n.functions.multiparttosinglepart=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);if(a[0]instanceof p.A)return[(0,s.D)((0,i.Yq)(a[0]),e.spatialReference)];if(a[0]instanceof d.A)return[(0,s.D)((0,i.Yq)(a[0]),e.spatialReference)];const c=(0,m.rS)(await(0,u.C)("simplify",[a[0].toJSON()]));if(c instanceof y.A){const n=[],e=[];for(let t=0;t<c.rings.length;t++)if(c.isClockwise(c.rings[t])){const e=(0,m.rS)({rings:[c.rings[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(e)}else e.push({ring:c.rings[t],pt:c.getPoint(t,0)});for(let t=0;t<e.length;t++)for(let r=0;r<n.length;r++)if(n[r].contains(e[t].pt)){n[r].addRing(e[t].ring);break}return n}if(c instanceof g.A){const n=[];for(let e=0;e<c.paths.length;e++){const t=(0,m.rS)({paths:[c.paths[e]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(t)}return n}if(a[0]instanceof h.A){const n=[],t=(0,s.D)((0,i.Yq)(a[0]),e.spatialReference);for(let e=0;e<t.points.length;e++)n.push(t.getPoint(e));return n}return null})},n.functions.isselfintersecting=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,t)=>{(0,s.B)(t,1,1,n,e);let r=(t=(0,s.C)(t))[0];if(((0,A.cy)(t[0])||(0,s.j)(t[0]))&&(r=(0,s.F)(t[0],n.spatialReference)),r instanceof h.A){const n=r.points;for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if((0,f.aI)(n[e],n[t]))return!0;return!1}return(r instanceof g.A||r instanceof y.A)&&await(0,u.C)("isSelfIntersecting",[r.toJSON()])})},n.functions.issimple=function(e,t){return n.standardFunctionAsync(e,t,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return!0;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,u.C)("isSimple",[a[0].toJSON()])})},n.functions.simplify=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("simplify",[a[0].toJSON()]))})},n.functions.convexhull=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,e,t),null===a[0])return null;if(!(a[0]instanceof w.A))throw new o.D$(e,"InvalidParameter",t);return(0,m.rS)(await(0,u.C)("convexHull",[a[0].toJSON()]))})},n.functions.getuser=function(e,t){return n.standardFunctionAsync(e,t,async(n,i,l)=>{(0,s.B)(l,0,2,e,t);let u=(0,s.J)(l[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,s.u)(u),0===l.length||l[0]instanceof r.A){let n;n=e.services?.portal?e.services.portal:v.A.getDefault(),l.length>0&&(n=(0,c.R)(l[0],n));const t=await D(n,u,f);if(t){const n=JSON.parse(JSON.stringify(t));for(const e of["lastLogin","created","modified"])void 0!==n[e]&&null!==n[e]&&(n[e]=new Date(n[e]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(e))}return null}let d=null;if((0,s.m)(l[0])&&(d=l[0]),d){if(f=!1,u)return null;await d.load();const n=await d.getOwningSystemUrl();if(!n){if(!u){const n=await d.getIdentityUser();return n?a.A.convertObjectToArcadeDictionary({username:n},(0,s.K)(e)):null}return null}let t;t=e.services?.portal?e.services.portal:v.A.getDefault(),t=(0,c.R)(new r.A(n),t);const o=await D(t,u,f);if(o){const n=JSON.parse(JSON.stringify(o));for(const e of["lastLogin","created","modified"])void 0!==n[e]&&null!==n[e]&&(n[e]=new Date(n[e]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(e))}return null}throw new o.D$(e,"InvalidParameter",t)})},n.functions.nearestcoordinate=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,i)=>{if(i=(0,s.C)(i),(0,s.B)(i,2,2,e,t),!(i[0]instanceof w.A||null===i[0]))throw new o.D$(e,"InvalidParameter",t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(e,"InvalidParameter",t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof d.A?y.A.fromExtent(i[0]):i[0],l=await(0,u.C)("getNearestCoordinate",[c.toJSON(),i[1].toJSON(),{calculateLeftRightSide:!0}]);return null===l?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(l.coordinate),distance:l.distance,sideOfLine:0===l.distance?"straddle":l.isRightSide?"right":"left"},(0,s.K)(e),!1,!0)})},n.functions.nearestvertex=function(e,t){return n.standardFunctionAsync(e,t,async(n,r,i)=>{if(i=(0,s.C)(i),(0,s.B)(i,2,2,e,t),!(i[0]instanceof w.A||null===i[0]))throw new o.D$(e,"InvalidParameter",t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(e,"InvalidParameter",t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof d.A?y.A.fromExtent(i[0]):i[0],l=await(0,u.C)("getNearestVertex",[c.toJSON(),i[1].toJSON()]);return null===l?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(l.coordinate),distance:l.distance,sideOfLine:0===l.distance?"straddle":l.isRightSide?"right":"left"},(0,s.K)(e),!1,!0)})})}},93543:(n,e,t)=>{t.r(e),t.d(e,{executeScript:()=>cn,extend:()=>an,prepareScript:()=>sn});var r=t(48938),a=t(99719),o=t(72888),i=t(17433),s=t(15695),c=t(66395),l=t(85935),u=t(93833),f=t(92400),d=t(78878),w=t(19157),h=t(3367),p=t(63680),y=t(81113),g=t(32091),m=t(87367),v=t(41217),S=t(36770),b=t(47346),D=t(29304),A=t(4730),$=(t(44208),t(53966)),C=t(91075),N=t(16930),O=t(54218);const F=()=>$.A.getLogger("esri.arcade.arcadeAsyncRuntime"),I=Symbol("uninitialized");function x(n){if(n===I)throw new l.D$(null,"InvalidIdentifier",null)}function R(n){return x(n),n}function J(n,e){const t=(0,r.X)(e);if(null!==n.localScope){const e=n.localScope[t];if(void 0!==e)return{scope:n.localScope,id:t,var:e}}const a=n.globalScope[t];if(void 0!==a)return{scope:n.globalScope,id:t,var:a};throw new l.D$(n,"InvalidIdentifier",e)}function P(n,e,t="InvalidIdentifier"){const a=(0,r.X)(e);if(null!==n.localScope){const e=n.localScope[a];if(void 0!==e)return x(e),e.value}const o=n.globalScope[a];if(void 0!==o)return x(o),o.value;throw new l.D$(n,t,e)}const B=function(){};async function k(n,e){const t=[];for(let r=0;r<e.arguments.length;r++)t.push(await U(n,e.arguments[r]));return t}async function j(n,e,t){return!0===e.preparsed?t(n,null,e.arguments):t(n,e,await k(n,e))}B.prototype=Object.freeze(Object.create(null));class E extends f.fF{constructor(n,e,t,r){super(),this.definition=n,this.context=e,this._params=t,this._locals=r}createFunction(n){return(...e)=>{const t={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,services:this.context.services,abortSignal:this.context.abortSignal,localScope:new B,depthCounter:{depth:n.depthCounter.depth+1},globalScope:this.context.globalScope,track:this.context.track};if(t.depthCounter.depth>64)throw new l.D$(n,"MaximumCallDepth",null);return M(t,this.definition.body,this._params,this._locals,e,null)}}call(n,e){return K(n,e,(t,r,a)=>{const o={spatialReference:n.spatialReference,services:n.services,console:n.console,libraryResolver:n.libraryResolver,exports:n.exports,lrucache:n.lrucache,timeZone:n.timeZone??null,interceptor:n.interceptor,localScope:new B,abortSignal:n.abortSignal,globalScope:n.globalScope,depthCounter:{depth:n.depthCounter.depth+1},track:n.track};if(o.depthCounter.depth>64)throw new l.D$(n,"MaximumCallDepth",e);return M(o,this.definition.body,this._params,this._locals,a,e)})}marshalledCall(n,e,t,r){return r(n,e,async(a,o,i)=>{const s={spatialReference:n.spatialReference,services:n.services,globalScope:t.globalScope,depthCounter:{depth:n.depthCounter.depth+1},libraryResolver:n.libraryResolver,exports:n.exports,console:n.console,abortSignal:n.abortSignal,lrucache:n.lrucache,timeZone:n.timeZone??null,interceptor:n.interceptor,localScope:new B,track:n.track};return i=i.map(e=>!(0,d.i)(e)||e instanceof f.CU?e:(0,f.o6)(e,n,r)),(0,f.o6)(await M(s,this.definition.body,this._params,this._locals,i,e),t,r)})}}async function M(n,e,t,r,a,o){if(t.length!==a.length)throw new l.D$(n,"WrongNumberOfParameters",o);if(null!=n.localScope){for(let e=0;e<t.length;e++)n.localScope[t[e]]={value:a[e]};for(const e of r)n.localScope[e]=I}const i=await Z(n,e);if(i instanceof d.R)return i.value;if(i===d.z)throw new l.D$(n,"UnexpectedToken",o);if(i===d.A)throw new l.D$(n,"UnexpectedToken",o);return i instanceof d.I?i.value:i}class L extends a.x{constructor(n){super(),this.moduleGlobalContext=n}global(n){const e=(0,r.X)(n),t=this.moduleGlobalContext.globalScope[e];if(x(t),(0,d.i)(t.value)&&!(t.value instanceof f.CU)){const n=new f.CU;return n.fn=t.value,n.parameterEvaluator=j,n.context=this.moduleGlobalContext,this.moduleGlobalContext.globalScope[e]={value:n},n}return t.value}setGlobal(n,e){if((0,d.i)(e))throw new l.D$(null,"AssignModuleFunction",null);const t=(0,r.X)(n);if(void 0===this.moduleGlobalContext.globalScope[t])throw new l.D$(null,"ModuleExportNotFound",null);this.moduleGlobalContext.globalScope[t]={value:e}}hasGlobal(n){return this.moduleGlobalContext.exports.has((0,r.X)(n))}static async load(n,e){const{globals:t,exports:a}=(0,i.a)(e),s=new rn;for(const n of t)n in s||(s[n]=I);const c=n.spatialReference??N.A.WebMercator,l={lrucache:n.lrucache,interceptor:n.interceptor,services:n.services,console:n.console??on,abortSignal:n.abortSignal??r._,timeZone:n.timeZone??null,spatialReference:c,track:null,depthCounter:{depth:1},libraryResolver:new o.a(n.libraryResolver._moduleSingletons,e.loadedModules),exports:a,localScope:null,globalScope:s};return await T(l,e),new L(l)}}async function K(n,e,t){return!0===e.preparsed?t(n,null,e.arguments):t(n,e,await k(n,e))}async function U(n,e){e.breakpoint&&await e.breakpoint();try{switch(e.type){case"UpdateExpression":return await async function(n,e){const t=e.argument;if("CallExpression"===t.type)throw new l.D$(n,"NeverReach",e);if("MemberExpression"===t.type){const r=await U(n,t.object);let a,o;if(!0===t.computed)a=await U(n,t.property);else{if("Identifier"!==t.property.type)throw new l.D$(n,"Unrecognized",e);a=t.property.name}if((0,O.cy)(r)){if(!(0,O.Et)(a))throw new l.D$(n,"ArrayAccessMustBeNumber",e);if(a<0&&(a=r.length+a),a<0||a>=r.length)throw new l.D$(n,"OutOfBounds",e);o=(0,d.s)(r[a]),r[a]="++"===e.operator?o+1:o-1}else if(r instanceof c.A){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasField(a))throw new l.D$(n,"FieldNotFound",e,{key:a});o=(0,d.s)(r.field(a)),r.setField(a,"++"===e.operator?o+1:o-1)}else if(r instanceof L){if(!1===(0,O.Kg)(a))throw new l.D$(n,"ModuleAccessorMustBeString",e);if(!0!==r.hasGlobal(a))throw new l.D$(n,"ModuleExportNotFound",e);o=(0,d.s)(r.global(a)),r.setGlobal(a,"++"===e.operator?o+1:o-1)}else{if(!(0,d.k)(r))throw(0,d.j)(r)?new l.D$(n,"Immutable",e):new l.D$(n,"InvalidParameter",e);if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasField(a))throw new l.D$(n,"FieldNotFound",e,{key:a});o=(0,d.s)(r.field(a)),r.setField(a,"++"===e.operator?o+1:o-1)}return!1===e.prefix?o:"++"===e.operator?o+1:o-1}const r=J(n,t),a=(0,d.s)(R(r.var).value),o="++"===e.operator?a+1:a-1;return r.scope[r.id]={value:o},!1===e.prefix?a:"++"===e.operator?a+1:a-1}(n,e);case"AssignmentExpression":return await async function(n,e){const t=e.left;if("MemberExpression"===t.type){const r=await U(n,t.object);let a;if(!0===t.computed)a=await U(n,t.property);else{if("Identifier"!==t.property.type)throw new l.D$(n,"InvalidIdentifier",e);a=t.property.name}const o=await U(n,e.right);if((0,O.cy)(r)){if(!(0,O.Et)(a))throw new l.D$(n,"ArrayAccessMustBeNumber",e);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new l.D$(n,"OutOfBounds",e);if(a===r.length){if("="!==e.operator)throw new l.D$(n,"OutOfBounds",e);r[a]=_(o,e.operator,r[a],e,n)}else r[a]=_(o,e.operator,r[a],e,n)}else if(r instanceof c.A){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0===r.hasField(a))r.setField(a,_(o,e.operator,r.field(a),e,n));else{if("="!==e.operator)throw new l.D$(n,"FieldNotFound",e,{key:a});r.setField(a,_(o,e.operator,null,e,n))}}else if(r instanceof L){if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0!==r.hasGlobal(a))throw new l.D$(n,"ModuleExportNotFound",e);r.setGlobal(a,_(o,e.operator,r.global(a),e,n))}else{if(!(0,d.k)(r))throw(0,d.j)(r)?new l.D$(n,"Immutable",e):new l.D$(n,"InvalidParameter",e);if(!1===(0,O.Kg)(a))throw new l.D$(n,"KeyAccessorMustBeString",e);if(!0===r.hasField(a))r.setField(a,_(o,e.operator,r.field(a),e,n));else{if("="!==e.operator)throw new l.D$(n,"FieldNotFound",e,{key:a});r.setField(a,_(o,e.operator,null,e,n))}}return d.v}const r=J(n,t),a=await U(n,e.right);return r.scope[r.id]={value:_(a,e.operator,"="!==e.operator?R(r.var).value:null,e,n)},d.v}(n,e);case"TemplateLiteral":return await async function(n,e){let t="",r=0;for(const a of e.quasis)if(t+=a.value?a.value.cooked:"",!1===a.tail){if(e.expressions[r]){const a=await U(n,e.expressions[r]);if((0,d.i)(a))throw new l.D$(n,"NoFunctionInTemplateLiteral",e);t+=(0,d.u)(a)}r++}return t}(n,e);case"Identifier":return X(n,e);case"MemberExpression":return await async function(n,e){const t=await U(n,e.object);if(null===t)throw new l.D$(n,"MemberOfNull",e);if(!1===e.computed){if("Identifier"===e.property.type){if(t instanceof c.A||(0,d.r)(t))return t.field(e.property.name);if(t instanceof C.A)return(0,s.Bl)(t,e.property.name,n,e);if(t instanceof L){if(!t.hasGlobal(e.property.name))throw new l.D$(n,"InvalidIdentifier",e);return t.global(e.property.name)}throw new l.D$(n,"InvalidMemberAccessKey",e)}throw new l.D$(n,"InvalidMemberAccessKey",e)}let r=await U(n,e.property);if(t instanceof c.A||(0,d.r)(t)){if((0,O.Kg)(r))return t.field(r);throw new l.D$(n,"InvalidMemberAccessKey",e)}if(t instanceof L){if((0,O.Kg)(r))return t.global(r);throw new l.D$(n,"InvalidMemberAccessKey",e)}if(t instanceof C.A){if((0,O.Kg)(r))return(0,s.Bl)(t,r,n,e);throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,O.cy)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l.D$(n,"OutOfBounds",e);return t[r]}throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,d.j)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length()+r),r>=t.length()||r<0)throw new l.D$(n,"OutOfBounds",e);return t.get(r)}throw new l.D$(n,"InvalidMemberAccessKey",e)}if((0,O.Kg)(t)){if((0,O.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l.D$(n,"OutOfBounds",e);return t[r]}throw new l.D$(n,"InvalidMemberAccessKey",e)}throw new l.D$(n,"InvalidMemberAccessKey",e)}(n,e);case"Literal":return e.value;case"CallExpression":return await async function(n,e){if("MemberExpression"===e.callee.type){const t=await U(n,e.callee.object);if(!(t instanceof L))throw new l.D$(n,"FunctionNotFound",e);const r=!1===e.callee.computed?e.callee.property.name:await U(n,e.callee.property);if(!t.hasGlobal(r))throw new l.D$(n,"FunctionNotFound",e);const a=t.global(r);if(!(0,d.i)(a))throw new l.D$(n,"CallNonFunction",e);return a.call(n,e)}if("Identifier"!==e.callee.type)throw new l.D$(n,"FunctionNotFound",e);const t=P(n,e.callee,"FunctionNotFound");if((0,d.i)(t))return t.call(n,e);throw new l.D$(n,"CallNonFunction",e)}(n,e);case"UnaryExpression":return await async function(n,e){const t=await U(n,e.argument);if((0,O.Lm)(t)){if("!"===e.operator)return!t;if("-"===e.operator)return-1*(0,d.s)(t);if("+"===e.operator)return 1*(0,d.s)(t);if("~"===e.operator)return~(0,d.s)(t);throw new l.D$(n,"UnsupportUnaryOperator",e)}if("-"===e.operator)return-1*(0,d.s)(t);if("+"===e.operator)return 1*(0,d.s)(t);if("~"===e.operator)return~(0,d.s)(t);throw new l.D$(n,"UnsupportUnaryOperator",e)}(n,e);case"BinaryExpression":return await async function(n,e){const t=await U(n,e.left),r=await U(n,e.right);switch(e.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,d.y)((0,d.s)(t),(0,d.s)(r),e.operator);case"==":return(0,d.x)(t,r);case"!=":return!(0,d.x)(t,r);case"<":case">":case"<=":case">=":return(0,d.w)(t,r,e.operator);case"+":return(0,O.Kg)(t)||(0,O.Kg)(r)?(0,d.u)(t)+(0,d.u)(r):(0,d.s)(t)+(0,d.s)(r);case"-":return(0,d.s)(t)-(0,d.s)(r);case"*":return(0,d.s)(t)*(0,d.s)(r);case"/":return(0,d.s)(t)/(0,d.s)(r);case"%":return(0,d.s)(t)%(0,d.s)(r);default:throw new l.D$(n,"UnsupportedOperator",e)}}(n,e);case"LogicalExpression":return await async function(n,e){const t=await U(n,e.left);if(!(0,O.Lm)(t))throw new l.D$(n,"LogicalExpressionOnlyBoolean",e);switch(e.operator){case"||":{if(!0===t)return t;const r=await U(n,e.right);if((0,O.Lm)(r))return r;throw new l.D$(n,"LogicExpressionOrAnd",e)}case"&&":{if(!1===t)return t;const r=await U(n,e.right);if((0,O.Lm)(r))return r;throw new l.D$(n,"LogicExpressionOrAnd",e)}default:throw new l.D$(n,"LogicExpressionOrAnd",e)}}(n,e);case"ArrayExpression":return await async function(n,e){const t=[];for(let r=0;r<e.elements.length;r++)t.push(await U(n,e.elements[r]));for(let r=0;r<t.length;r++){if((0,d.i)(t[r]))throw new l.D$(n,"NoFunctionInArray",e);t[r]===d.v&&(t[r]=null)}return t}(n,e);case"ObjectExpression":return await async function(n,e){const t=[];for(let r=0;r<e.properties.length;r++){const a=e.properties[r],o=await U(n,a.value),i="Identifier"===a.key.type?a.key.name:await U(n,a.key);t[r]={key:i,value:o}}const r=Object.create(null),a=new Map;for(let o=0;o<t.length;o++){const i=t[o];if((0,d.i)(i.value))throw new l.D$(n,"NoFunctionInDictionary",e);if(!1===(0,O.Kg)(i.key))throw new l.D$(n,"KeyMustBeString",e);let s=i.key.toString();const c=s.toLowerCase();a.has(c)?s=a.get(c):a.set(c,s),i.value===d.v?r[s]=null:r[s]=i.value}const o=new c.A(r);return o.immutable=!1,o}(n,e);default:throw new l.D$(n,"Unrecognized",e)}}catch(t){throw(0,l.Nh)(n,e,t)}}async function Z(n,e){e.breakpoint&&await e.breakpoint();try{switch(e.type){case"ImportDeclaration":return await async function(n,e){const t=J(n,e.specifiers[0].local),r=n.libraryResolver;if(null==r)throw F().error("Internal error: module loader not initialized"),new l.D$(n,"NeverReach",e);const a=r.loadLibrary(t.id);let o;return r._moduleSingletons?.has(a.uri)?o=r._moduleSingletons.get(a.uri):(o=await L.load(n,a.syntax),r._moduleSingletons?.set(a.uri,o)),t.scope[t.id]={value:o},d.v}(n,e);case"ExportNamedDeclaration":return await async function(n,e){return await Z(n,e.declaration),d.v}(n,e);case"VariableDeclaration":return await async function(n,e){for(const t of e.declarations)await Y(n,t);return d.v}(n,e);case"BlockStatement":return await T(n,e);case"FunctionDeclaration":return await async function(n,e){if(null!=n.localScope)throw F().error("Function declarations are only valid in global scope."),new l.D$(n,"NeverReach",e);const t=(0,r.X)(e.id);if(!(t in n.globalScope))throw F().error(`Function "${t}" not declared.`),new l.D$(n,"NeverReach",e);const a=(0,i.S)(e),o=e.params.map(n=>(0,r.X)(n)),s=Array.from(a).filter(n=>!o.includes(n));return n.globalScope[t]={value:new E(e,n,o,s)},d.v}(n,e);case"ReturnStatement":return await async function(n,e){if(null===e.argument)return new d.R(d.v);const t=await U(n,e.argument);return new d.R(t)}(n,e);case"IfStatement":return await async function(n,e){const t=await U(n,e.test);if(!0===t)return Z(n,e.consequent);if(!1===t)return null!==e.alternate?Z(n,e.alternate):d.v;throw new l.D$(n,"BooleanConditionRequired",e)}(n,e);case"ExpressionStatement":return await async function(n,e){const t=await U(n,e.expression);return t===d.v?d.v:new d.I(t)}(n,e);case"ForStatement":return await async function(n,e){try{for(null!==e.init&&("VariableDeclaration"===e.init.type?await Z(n,e.init):await U(n,e.init));;){if(null!==e.test){const t=await U(n,e.test);if(!0===n.abortSignal?.aborted)throw new l.D$(n,"Cancelled",e);if(!1===t)break;if(!0!==t)throw new l.D$(n,"BooleanConditionRequired",e)}const t=await Z(n,e.body);if(t===d.z)break;if(t instanceof d.R)return t;null!==e.update&&await U(n,e.update)}return d.v}catch(n){throw n}}(n,e);case"WhileStatement":return await async function(n,e){let t=await U(n,e.test);if(!1===t)return d.v;if(!0!==t)throw new l.D$(n,"BooleanConditionRequired",e);for(;!0===t;){const r=await Z(n,e.body);if(r===d.z)break;if(r instanceof d.R)return r;if(t=await U(n,e.test),!0!==t&&!1!==t)throw new l.D$(n,"BooleanConditionRequired",e)}return d.v}(n,e);case"ForInStatement":return await async function(n,e){const t=await U(n,e.right);"VariableDeclaration"===e.left.type&&await Z(n,e.left);const r=J(n,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left);return(0,O.cy)(t)||(0,O.Kg)(t)?await q(n,e,t,r):(0,d.j)(t)?await z(n,e,t,r):t instanceof c.A||(0,d.r)(t)?await q(n,e,t.keys(),r,"k"):(0,d.m)(t)?await G(n,e,t,r):(0,d.h)(t)?await q(n,e,(0,s.T)(t),r,"k"):d.v}(n,e);case"ForOfStatement":return await async function(n,e){const t=await U(n,e.right);"VariableDeclaration"===e.left.type&&await Z(n,e.left);const r=J(n,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left);return(0,O.cy)(t)||(0,O.Kg)(t)?await q(n,e,t,r,"k"):(0,d.j)(t)?await z(n,e,t,r,"k"):t instanceof c.A||(0,d.r)(t)?await async function(n,e,t,r){for(const a of t.keys()){const o=t.field(a);r.scope[r.id]={value:c.A.containerEntry(a,o)};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}(n,e,t,r):(0,d.m)(t)?await G(n,e,t,r):(0,d.h)(t)?await async function(n,e,t,r){for(const a of(0,s.T)(t)){const o=(0,s.Bl)(t,a,n,e,1);r.scope[r.id]={value:c.A.containerEntry(a,o)};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}(n,e,t,r):d.v}(n,e);case"BreakStatement":return d.z;case"EmptyStatement":return d.v;case"ContinueStatement":return d.A;default:throw new l.D$(n,"Unrecognized",e)}}catch(t){throw(0,l.Nh)(n,e,t)}}async function q(n,e,t,r,a="i"){const o=t.length;for(let i=0;i<o;i++){if("k"===a){if(i>=t.length)throw new l.D$(n,"OutOfBounds",e);r.scope[r.id]={value:t[i]}}else r.scope[r.id]={value:i};const o=await Z(n,e.body);if(o===d.z)break;if(o instanceof d.R)return o}return d.v}async function z(n,e,t,r,a="i"){const o=t.length();for(let i=0;i<o;i++){r.scope[r.id]="k"===a?{value:t.get(i)}:{value:i};const o=await Z(n,e.body);if(o===d.z)break;if(o instanceof d.R)return o}return d.v}async function G(n,e,t,r){const a=t.iterator(n.abortSignal);let o;for(;null!=(o=await a.next());){const a=u.A.createFromGraphicLikeObject(o.geometry,o.attributes,t,n.timeZone);a._underlyingGraphic=o,r.scope[r.id]={value:a};const i=await Z(n,e.body);if(i===d.z)break;if(i instanceof d.R)return i}return d.v}function _(n,e,t,r,a){switch(e){case"=":return n===d.v?null:n;case"/=":return(0,d.s)(t)/(0,d.s)(n);case"*=":return(0,d.s)(t)*(0,d.s)(n);case"-=":return(0,d.s)(t)-(0,d.s)(n);case"+=":return(0,O.Kg)(t)||(0,O.Kg)(n)?(0,d.u)(t)+(0,d.u)(n):(0,d.s)(t)+(0,d.s)(n);case"%=":return(0,d.s)(t)%(0,d.s)(n);default:throw new l.D$(a,"UnsupportedOperator",r)}}async function T(n,e){return W(n,e,0)}async function W(n,e,t){if(t>=e.body.length)return d.v;const r=await Z(n,e.body[t]);return r instanceof d.R||r===d.z||r===d.A||t===e.body.length-1?r:W(n,e,t+1)}async function Y(n,e){let t=null;t=null===e.init?null:await U(n,e.init),t===d.v&&(t=null);const r=J(n,e.id);r.scope[r.id]={value:t}}function X(n,e){return P(n,e)}async function V(n,e){(0,d.B)(null===e.arguments?[]:e.arguments,3,3,n,e);const t=await U(n,e.arguments[0]);if(!1===(0,O.Lm)(t))throw new l.D$(n,"BooleanConditionRequired",e);return U(n,t?e.arguments[1]:e.arguments[2])}async function H(n,e){(0,d.B)(null===e.arguments?[]:e.arguments,2,3,n,e);const t=await U(n,e.arguments[0]);if(3===e.arguments.length){const r=await U(n,e.arguments[1]),a=(0,s.jd)(t,r);return null!=a&&""!==a?a:U(n,e.arguments[2])}return null==t||""===t?U(n,e.arguments[1]):t}async function Q(n,e){if(e.arguments.length<2)throw new l.D$(n,"WrongNumberOfParameters",e);if(2===e.arguments.length)return U(n,e.arguments[1]);if((e.arguments.length-1)%2==0)throw new l.D$(n,"WrongNumberOfParameters",e);return nn(n,e,1,await U(n,e.arguments[0]))}async function nn(n,e,t,r){const a=await U(n,e.arguments[t]);if((0,d.x)(a,r))return U(n,e.arguments[t+1]);const o=e.arguments.length-t;return 1===o?U(n,e.arguments[t]):2===o?null:3===o?U(n,e.arguments[t+2]):nn(n,e,t+2,r)}async function en(n,e){if(e.arguments.length<3)throw new l.D$(n,"WrongNumberOfParameters",e);if(e.arguments.length%2==0)throw new l.D$(n,"WrongNumberOfParameters",e);const t=await U(n,e.arguments[0]);if(!1===(0,O.Lm)(t))throw new l.D$(n,"BooleanConditionRequired",e.arguments[0]);return tn(n,e,0,t)}async function tn(n,e,t,r){if(!0===r)return U(n,e.arguments[t+1]);if(3===e.arguments.length-t)return U(n,e.arguments[t+2]);const a=await U(n,e.arguments[t+2]);if(!1===(0,O.Lm)(a))throw new l.D$(n,"ModuleExportNotFound",e.arguments[t+2]);return tn(n,e,t+2,a)}const rn=function(){const n=Object.create(null);(0,y.d)(n,j),(0,D.d)(n,j),(0,g.d)(n,j,X),(0,S.d)(n,j),(0,v.d)(n,j),(0,b.d)(n,j),(0,A.dW)(n,j),(0,m.registerFunctions)({functions:n,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:j,standardFunctionAsync:K}),n.iif=V,n.defaultvalue=H,n.decode=Q,n.when=en;const e=function(){this.textformatting={value:c.A.textFormatting()}};(e.prototype=Object.create(null)).infinity=Object.freeze({value:Number.POSITIVE_INFINITY}),e.prototype.pi=Object.freeze({value:Math.PI});for(const[t,r]of Object.entries(n))e.prototype[t]=Object.freeze({value:new f.UQ(r)});return e}();function an(n){const e={mode:"async",compiled:!1,functions:Object.create(null),signatures:[],standardFunction:j,standardFunctionAsync:K,evaluateIdentifier:X};for(let t=0;t<n.length;t++)n[t].registerFunctions(e);for(const[n,t]of Object.entries(e.functions))rn.prototype[n]=Object.freeze({value:new f.UQ(t)});for(let n=0;n<e.signatures.length;n++)(0,w.WC)(e.signatures[n],"async")}function on(n){console.log(n)}function sn(n,e){const t=new Set(Object.keys(e?.vars||{}).map(n=>(0,r.X)(n))),a=new Set(Object.keys(e?.customfunctions||{}).map(n=>(0,r.X)(n))),{globals:s,exports:c}=(0,i.a)(n);return async e=>{const i=e.spatialReference??N.A.WebMercator;let w=null;n.usesModules&&(w=new o.a(new Map,n.loadedModules));const h=new rn;for(const n of a)null!=e.customfunctions&&n in e.customfunctions?h[n]={value:new f.UQ(e.customfunctions[n])}:h[n]=I;for(const n of t){if(null==e.vars||!(n in e.vars)){n in h||(h[n]=I);continue}const t=e.vars[n]??null;(0,O.DU)(t)?h[n]={value:u.A.createFromGraphic(t,e.timeZone??null)}:h[n]={value:t}}for(const n of s)n in h||(h[n]=I);const p={lrucache:e.lrucache,interceptor:e.interceptor,services:e.services,console:e.console??on,abortSignal:e.abortSignal??r._,timeZone:e.timeZone??null,spatialReference:i,track:e.track,depthCounter:{depth:1},libraryResolver:w,exports:c,localScope:null,globalScope:h},y=await T(p,n);if(y instanceof d.R||y instanceof d.I){const n=y.value;if((0,d.q)(n))return null;if((0,d.i)(n))throw new l.D$(p,"IllegalResult",null);return n}if((0,d.q)(y))return null;if(y===d.z)throw new l.D$(p,"IllegalResult",null);if(y===d.A)throw new l.D$(p,"IllegalResult",null);throw new l.D$(p,"NeverReach",null)}}function cn(n,e){return sn(n,e)(e)}an([p.A]),an([h.A])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4996],{16930:(e,t,r)=>{r.d(t,{A:()=>d});var o,n=r(31635),i=r(65008),s=r(25482),a=r(4718),f=r(83047),_=r(56507),u=r(10107),c=r(40608),l=r(43937),P=r(21325);let d=class extends s.o{static{o=this}static{this.GCS_NAD_1927=null}static{this.WGS84=null}static{this.WebMercator=null}static{this.PlateCarree=null}static fromJSON(e){if(!e)return null;if(102100===e?.wkid)return o.WebMercator;if(4326===e?.wkid)return o.WGS84;const t=new o;return t.read(e),t}constructor(e){super(e),this.latestWkid=null,this.wkid=null,this.wkt=null,this.wkt2=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(e){if(e&&"object"==typeof e)return e;const t="string"==typeof e?"wkt":"wkid";return{[t]:e}}get isWGS84(){return(0,P.oT)(this)}get isWebMercator(){return(0,P.K8)(this)}get isGeographic(){return(0,P.EA)(this)}get isWrappable(){return(0,P.d9)(this)}get metersPerUnit(){return(0,f.GA)(this)}get unit(){return(0,f.Ij)(this)||(this.isGeographic?"degrees":null)}writeWkt(e,t){this.wkid||(t.wkt=e)}clone(){if(this===o.WGS84)return new o(P.KK);if(this===o.WebMercator)return new o(P.ch);const e=new o;return null!=this.wkid?(e.wkid=this.wkid,null!=this.latestWkid&&(e.latestWkid=this.latestWkid),null!=this.vcsWkid&&(e.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(e.latestVcsWkid=this.latestVcsWkid)):(null!=this.wkt&&(e.wkt=this.wkt),null!=this.wkt2&&(e.wkt2=this.wkt2)),this.imageCoordinateSystem&&(e.imageCoordinateSystem=(0,a.o8)(this.imageCoordinateSystem)),e}equals(e){if(null==e)return!1;if(this.imageCoordinateSystem||e.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==e.imageCoordinateSystem)return!1;const{id:t,referenceServiceName:r}=e.imageCoordinateSystem,{geodataXform:o}=e.imageCoordinateSystem,n=this.imageCoordinateSystem;return null==t||o?JSON.stringify(n)===JSON.stringify(e.imageCoordinateSystem):r?n.id===t&&n.referenceServiceName===r:n.id===t}return(0,P.aI)(this,e)}toJSON(e){return this.write(void 0,e)}};(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWGS84",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWebMercator",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isGeographic",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWrappable",null),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"latestWkid",void 0),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"metersPerUnit",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"unit",null),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkt}}}}}}})],d.prototype,"wkid",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkid}}}}}}})],d.prototype,"wkt",void 0),(0,n.Cg)([(0,l.K)("wkt"),(0,l.K)("web-scene","wkt")],d.prototype,"writeWkt",null),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!1}})],d.prototype,"wkt2",void 0),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"vcsWkid",void 0),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"latestVcsWkid",void 0),(0,n.Cg)([(0,u.MZ)()],d.prototype,"imageCoordinateSystem",void 0),d=o=(0,n.Cg)([(0,c.$)("esri.geometry.SpatialReference")],d),d.prototype.toJSON.isDefaultToJSON=!0,d.GCS_NAD_1927=i.A.freeze(new d({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'})),d.WGS84=i.A.freeze(new d(P.KK)),d.WebMercator=i.A.freeze(new d(P.ch)),d.PlateCarree=i.A.freeze(new d(P.tQ))},21325:(e,t,r)=>{r.d(t,{B3:()=>p,EA:()=>d,K8:()=>T,KK:()=>R,KQ:()=>O,Mc:()=>a,Vp:()=>l,YX:()=>P,ZL:()=>m,aI:()=>c,ch:()=>G,d9:()=>A,fn:()=>U,jp:()=>g,oT:()=>E,q8:()=>M,r1:()=>h,tQ:()=>N,tl:()=>y,x1:()=>S});var o=r(799),n=(r(83290),r(22530));const i=[102100,102113,3857,3785,900913],s=[4326,...i,104905,104971],a=[-20037508.342788905,20037508.342788905],f=[-20037508.342787,20037508.342787],_={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},u={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},102100:_,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},3857:_,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:_};function c(e,t){if(e===t)return!0;if(null==e||null==t)return!1;const r=e.wkid,o=t.wkid;if(null!=r||null!=o){if(r===o)return!0;if(T(e)&&T(t))return!0;const n=e.latestWkid;if(null!=n&&o===n)return!0;const i=t.latestWkid;return null!=i&&r===i}let n,i;return e.wkt2&&t.wkt2?(n=e.wkt2,i=t.wkt2):e.wkt&&t.wkt&&(n=e.wkt,i=t.wkt),!(!n||!i)&&n.toUpperCase()===i.toUpperCase()}function l(e){const t=e?.wkid;return null!=t&&t>=2e3&&u[t]||null}function P(e){if(!e)return;const{wkid:t,vcsWkid:r}=e;if(t)return r?JSON.stringify({wkid:t,vcsWkid:r}):String(t);const o=e.wkt||e.wkt2;return JSON.stringify(o?r?{wkt:o,vcsWkid:r}:{wkt:o}:{})}function d(e){if(!U(e))return!1;const{wkid:t}=e;if(t)return null==n.A[t];const r=e.wkt2||e.wkt;return!!r&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(r)}function p(e){return!(M(e)||O(e))}function E(e){return 4326===e?.wkid}function g(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function S(e){return 4490===e?.wkid}function T(e){const t=e?.wkid;return null!=t&&t>=2e3&&i.includes(t)}function h(e){return 32662===e?.wkid}function y(e){return 104971===e||104905===e}function M(e){return y(e?.wkid)}function m(e){return 104903===e}function O(e){return m(e?.wkid)}function A(e){const t=e?.wkid;return null!=t&&t>=2e3&&s.includes(t)}function U(e){if(null==e)return!1;const t=e.wkid;return null!=t&&t>=2e3||null!=e.wkt2||null!=e.wkt}const R={wkid:4326,wkt:(0,o.HC)(u[4326].wkTemplate,{Central_Meridian:"0.0"})},G={wkid:102100,latestWkid:3857},N={wkid:32662}},22530:(e,t,r)=>{let o;r.d(t,{A:()=>n});const n={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,10477:0,10481:2,10516:2,10592:0,10594:0,10596:0,10598:0,10601:0,10603:0,10626:0,10632:0,10641:0,10665:0,10674:0,10744:0,10745:0,10759:0,10773:0,10802:0,10820:0,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,65061:2,65062:2,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1,103978:2,103979:0,103980:2,103981:0};for(o=2e3;o<=2045;o++)n[o]=0;for(o=2056;o<=2065;o++)n[o]=0;for(o=2067;o<=2135;o++)n[o]=0;for(o=2137;o<=2154;o++)n[o]=0;for(o=2161;o<=2170;o++)n[o]=0;for(o=2172;o<=2193;o++)n[o]=0;for(o=2195;o<=2198;o++)n[o]=0;for(o=2200;o<=2203;o++)n[o]=0;for(o=2205;o<=2217;o++)n[o]=0;for(o=2222;o<=2224;o++)n[o]=1;for(o=2225;o<=2250;o++)n[o]=2;for(o=2251;o<=2253;o++)n[o]=1;for(o=2257;o<=2264;o++)n[o]=2;for(o=2274;o<=2279;o++)n[o]=2;for(o=2280;o<=2282;o++)n[o]=1;for(o=2283;o<=2289;o++)n[o]=2;for(o=2290;o<=2292;o++)n[o]=0;for(o=2308;o<=2313;o++)n[o]=0;for(o=2315;o<=2491;o++)n[o]=0;for(o=2494;o<=2866;o++)n[o]=0;for(o=2867;o<=2869;o++)n[o]=1;for(o=2870;o<=2888;o++)n[o]=2;for(o=2891;o<=2895;o++)n[o]=2;for(o=2896;o<=2898;o++)n[o]=1;for(o=2902;o<=2908;o++)n[o]=2;for(o=2915;o<=2920;o++)n[o]=2;for(o=2921;o<=2923;o++)n[o]=1;for(o=2924;o<=2930;o++)n[o]=2;for(o=2931;o<=2962;o++)n[o]=0;for(o=2964;o<=2968;o++)n[o]=2;for(o=2969;o<=2973;o++)n[o]=0;for(o=2975;o<=2991;o++)n[o]=0;for(o=2995;o<=3051;o++)n[o]=0;for(o=3054;o<=3079;o++)n[o]=0;for(o=3081;o<=3088;o++)n[o]=0;for(o=3092;o<=3101;o++)n[o]=0;for(o=3106;o<=3138;o++)n[o]=0;for(o=3146;o<=3151;o++)n[o]=0;for(o=3153;o<=3166;o++)n[o]=0;for(o=3168;o<=3172;o++)n[o]=0;for(o=3174;o<=3203;o++)n[o]=0;for(o=3294;o<=3358;o++)n[o]=0;for(o=3367;o<=3403;o++)n[o]=0;for(o=3408;o<=3416;o++)n[o]=0;for(o=3417;o<=3438;o++)n[o]=2;for(o=3441;o<=3446;o++)n[o]=2;for(o=3447;o<=3450;o++)n[o]=0;for(o=3451;o<=3459;o++)n[o]=2;for(o=3460;o<=3478;o++)n[o]=0;for(o=3554;o<=3559;o++)n[o]=0;for(o=3560;o<=3570;o++)n[o]=2;for(o=3571;o<=3581;o++)n[o]=0;for(o=3594;o<=3597;o++)n[o]=0;for(o=3601;o<=3604;o++)n[o]=0;for(o=3637;o<=3639;o++)n[o]=0;for(o=3665;o<=3667;o++)n[o]=0;for(o=3693;o<=3695;o++)n[o]=0;for(o=3701;o<=3727;o++)n[o]=0;for(o=3728;o<=3739;o++)n[o]=2;for(o=3740;o<=3751;o++)n[o]=0;for(o=3753;o<=3760;o++)n[o]=2;for(o=3761;o<=3773;o++)n[o]=0;for(o=3775;o<=3777;o++)n[o]=0;for(o=3779;o<=3781;o++)n[o]=0;for(o=3783;o<=3785;o++)n[o]=0;for(o=3788;o<=3791;o++)n[o]=0;for(o=3797;o<=3802;o++)n[o]=0;for(o=3814;o<=3816;o++)n[o]=0;for(o=3825;o<=3829;o++)n[o]=0;for(o=3832;o<=3841;o++)n[o]=0;for(o=3844;o<=3852;o++)n[o]=0;for(o=3873;o<=3885;o++)n[o]=0;for(o=3890;o<=3893;o++)n[o]=0;for(o=3907;o<=3912;o++)n[o]=0;for(o=3942;o<=3950;o++)n[o]=0;for(o=3968;o<=3970;o++)n[o]=0;for(o=3973;o<=3976;o++)n[o]=0;for(o=3986;o<=3989;o++)n[o]=0;for(o=3994;o<=3997;o++)n[o]=0;for(o=4048;o<=4051;o++)n[o]=0;for(o=4056;o<=4063;o++)n[o]=0;for(o=4093;o<=4096;o++)n[o]=0;for(o=4390;o<=4398;o++)n[o]=0;for(o=4399;o<=4413;o++)n[o]=2;for(o=4418;o<=4433;o++)n[o]=2;for(o=4455;o<=4457;o++)n[o]=2;for(o=4484;o<=4489;o++)n[o]=0;for(o=4491;o<=4554;o++)n[o]=0;for(o=4568;o<=4589;o++)n[o]=0;for(o=4652;o<=4656;o++)n[o]=0;for(o=4766;o<=4800;o++)n[o]=0;for(o=5014;o<=5016;o++)n[o]=0;for(o=5069;o<=5072;o++)n[o]=0;for(o=5105;o<=5130;o++)n[o]=0;for(o=5167;o<=5188;o++)n[o]=0;for(o=5253;o<=5259;o++)n[o]=0;for(o=5269;o<=5275;o++)n[o]=0;for(o=5292;o<=5311;o++)n[o]=0;for(o=5329;o<=5331;o++)n[o]=0;for(o=5343;o<=5349;o++)n[o]=0;for(o=5355;o<=5357;o++)n[o]=0;for(o=5387;o<=5389;o++)n[o]=0;for(o=5459;o<=5463;o++)n[o]=0;for(o=5479;o<=5482;o++)n[o]=0;for(o=5518;o<=5520;o++)n[o]=0;for(o=5530;o<=5539;o++)n[o]=0;for(o=5550;o<=5552;o++)n[o]=0;for(o=5562;o<=5583;o++)n[o]=0;for(o=5623;o<=5625;o++)n[o]=2;for(o=5631;o<=5639;o++)n[o]=0;for(o=5649;o<=5653;o++)n[o]=0;for(o=5663;o<=5680;o++)n[o]=0;for(o=5682;o<=5685;o++)n[o]=0;for(o=5875;o<=5877;o++)n[o]=0;for(o=5896;o<=5899;o++)n[o]=0;for(o=5921;o<=5940;o++)n[o]=0;for(o=6050;o<=6125;o++)n[o]=0;for(o=6244;o<=6275;o++)n[o]=0;for(o=6328;o<=6348;o++)n[o]=0;for(o=6350;o<=6356;o++)n[o]=0;for(o=6366;o<=6372;o++)n[o]=0;for(o=6381;o<=6387;o++)n[o]=0;for(o=6393;o<=6404;o++)n[o]=0;for(o=6480;o<=6483;o++)n[o]=0;for(o=6511;o<=6514;o++)n[o]=0;for(o=6579;o<=6581;o++)n[o]=0;for(o=6619;o<=6624;o++)n[o]=0;for(o=6625;o<=6627;o++)n[o]=2;for(o=6628;o<=6632;o++)n[o]=0;for(o=6634;o<=6637;o++)n[o]=0;for(o=6669;o<=6692;o++)n[o]=0;for(o=6707;o<=6709;o++)n[o]=0;for(o=6720;o<=6723;o++)n[o]=0;for(o=6732;o<=6738;o++)n[o]=0;for(o=6931;o<=6933;o++)n[o]=0;for(o=6956;o<=6959;o++)n[o]=0;for(o=7005;o<=7007;o++)n[o]=0;for(o=7057;o<=7070;o++)n[o]=2;for(o=7074;o<=7082;o++)n[o]=0;for(o=7109;o<=7118;o++)n[o]=0;for(o=7119;o<=7127;o++)n[o]=1;for(o=7374;o<=7376;o++)n[o]=0;for(o=7528;o<=7586;o++)n[o]=0;for(o=7587;o<=7645;o++)n[o]=2;for(o=7692;o<=7696;o++)n[o]=0;for(o=7755;o<=7787;o++)n[o]=0;for(o=7791;o<=7795;o++)n[o]=0;for(o=7799;o<=7801;o++)n[o]=0;for(o=7803;o<=7805;o++)n[o]=0;for(o=7825;o<=7831;o++)n[o]=0;for(o=7845;o<=7859;o++)n[o]=0;for(o=8013;o<=8032;o++)n[o]=0;for(o=8065;o<=8068;o++)n[o]=1;for(o=8518;o<=8529;o++)n[o]=2;for(o=8533;o<=8536;o++)n[o]=2;for(o=8538;o<=8540;o++)n[o]=2;for(o=8677;o<=8679;o++)n[o]=0;for(o=8836;o<=8840;o++)n[o]=0;for(o=8857;o<=8859;o++)n[o]=0;for(o=8908;o<=8910;o++)n[o]=0;for(o=9154;o<=9159;o++)n[o]=0;for(o=9205;o<=9218;o++)n[o]=0;for(o=9271;o<=9273;o++)n[o]=0;for(o=9295;o<=9297;o++)n[o]=0;for(o=9356;o<=9360;o++)n[o]=0;for(o=9404;o<=9407;o++)n[o]=0;for(o=9476;o<=9482;o++)n[o]=0;for(o=9487;o<=9494;o++)n[o]=0;for(o=9697;o<=9699;o++)n[o]=0;for(o=9821;o<=9865;o++)n[o]=0;for(o=10285;o<=10291;o++)n[o]=0;for(o=10314;o<=10317;o++)n[o]=0;for(o=10448;o<=10465;o++)n[o]=0;for(o=10726;o<=10729;o++)n[o]=0;for(o=10731;o<=10733;o++)n[o]=0;for(o=11114;o<=11118;o++)n[o]=0;for(o=20004;o<=20032;o++)n[o]=0;for(o=20047;o<=20049;o++)n[o]=0;for(o=20062;o<=20092;o++)n[o]=0;for(o=20135;o<=20138;o++)n[o]=0;for(o=20248;o<=20258;o++)n[o]=0;for(o=20348;o<=20358;o++)n[o]=0;for(o=20436;o<=20440;o++)n[o]=0;for(o=20822;o<=20824;o++)n[o]=0;for(o=20904;o<=20932;o++)n[o]=0;for(o=20934;o<=20936;o++)n[o]=0;for(o=21004;o<=21032;o++)n[o]=0;for(o=21035;o<=21037;o++)n[o]=0;for(o=21095;o<=21097;o++)n[o]=0;for(o=21148;o<=21150;o++)n[o]=0;for(o=21207;o<=21264;o++)n[o]=0;for(o=21307;o<=21364;o++)n[o]=0;for(o=21413;o<=21423;o++)n[o]=0;for(o=21453;o<=21463;o++)n[o]=0;for(o=21473;o<=21483;o++)n[o]=0;for(o=21780;o<=21782;o++)n[o]=0;for(o=21891;o<=21894;o++)n[o]=0;for(o=21896;o<=21899;o++)n[o]=0;for(o=22171;o<=22177;o++)n[o]=0;for(o=22181;o<=22187;o++)n[o]=0;for(o=22191;o<=22197;o++)n[o]=0;for(o=22207;o<=22222;o++)n[o]=0;for(o=22229;o<=22232;o++)n[o]=0;for(o=22234;o<=22236;o++)n[o]=0;for(o=22243;o<=22250;o++)n[o]=0;for(o=22262;o<=22265;o++)n[o]=0;for(o=22307;o<=22322;o++)n[o]=0;for(o=22348;o<=22357;o++)n[o]=0;for(o=22407;o<=22422;o++)n[o]=0;for(o=22462;o<=22465;o++)n[o]=0;for(o=22521;o<=22525;o++)n[o]=0;for(o=22607;o<=22622;o++)n[o]=0;for(o=22641;o<=22646;o++)n[o]=0;for(o=22648;o<=22657;o++)n[o]=0;for(o=22707;o<=22722;o++)n[o]=0;for(o=22762;o<=22765;o++)n[o]=0;for(o=22807;o<=22822;o++)n[o]=0;for(o=22991;o<=22994;o++)n[o]=0;for(o=23028;o<=23038;o++)n[o]=0;for(o=23301;o<=23333;o++)n[o]=2;for(o=23830;o<=23853;o++)n[o]=0;for(o=23866;o<=23872;o++)n[o]=0;for(o=23877;o<=23884;o++)n[o]=0;for(o=23886;o<=23894;o++)n[o]=0;for(o=23946;o<=23948;o++)n[o]=0;for(o=24311;o<=24313;o++)n[o]=0;for(o=24342;o<=24347;o++)n[o]=0;for(o=24370;o<=24374;o++)n[o]=10;for(o=24375;o<=24381;o++)n[o]=0;for(o=24718;o<=24721;o++)n[o]=0;for(o=24817;o<=24821;o++)n[o]=0;for(o=24877;o<=24882;o++)n[o]=0;for(o=24891;o<=24893;o++)n[o]=0;for(o=25391;o<=25395;o++)n[o]=0;for(o=25828;o<=25838;o++)n[o]=0;for(o=26191;o<=26195;o++)n[o]=0;for(o=26391;o<=26393;o++)n[o]=0;for(o=26701;o<=26722;o++)n[o]=0;for(o=26729;o<=26799;o++)n[o]=2;for(o=26801;o<=26803;o++)n[o]=2;for(o=26811;o<=26813;o++)n[o]=2;for(o=26847;o<=26870;o++)n[o]=2;for(o=26891;o<=26899;o++)n[o]=0;for(o=26901;o<=26923;o++)n[o]=0;for(o=26929;o<=26946;o++)n[o]=0;for(o=26948;o<=26998;o++)n[o]=0;for(o=27037;o<=27040;o++)n[o]=0;for(o=27205;o<=27232;o++)n[o]=0;for(o=27258;o<=27260;o++)n[o]=0;for(o=27391;o<=27398;o++)n[o]=0;for(o=27561;o<=27564;o++)n[o]=0;for(o=27571;o<=27574;o++)n[o]=0;for(o=27581;o<=27584;o++)n[o]=0;for(o=27591;o<=27594;o++)n[o]=0;for(o=27700;o<=27707;o++)n[o]=0;for(o=28191;o<=28193;o++)n[o]=0;for(o=28348;o<=28358;o++)n[o]=0;for(o=28402;o<=28432;o++)n[o]=0;for(o=28462;o<=28492;o++)n[o]=0;for(o=29118;o<=29122;o++)n[o]=0;for(o=29168;o<=29172;o++)n[o]=0;for(o=29177;o<=29185;o++)n[o]=0;for(o=29187;o<=29195;o++)n[o]=0;for(o=29900;o<=29903;o++)n[o]=0;for(o=30161;o<=30179;o++)n[o]=0;for(o=30491;o<=30494;o++)n[o]=0;for(o=30729;o<=30732;o++)n[o]=0;for(o=31251;o<=31259;o++)n[o]=0;for(o=31265;o<=31268;o++)n[o]=0;for(o=31275;o<=31279;o++)n[o]=0;for(o=31281;o<=31297;o++)n[o]=0;for(o=31461;o<=31469;o++)n[o]=0;for(o=31491;o<=31495;o++)n[o]=0;for(o=31917;o<=31922;o++)n[o]=0;for(o=31965;o<=32e3;o++)n[o]=0;for(o=32001;o<=32003;o++)n[o]=2;for(o=32005;o<=32031;o++)n[o]=2;for(o=32033;o<=32060;o++)n[o]=2;for(o=32064;o<=32067;o++)n[o]=2;for(o=32074;o<=32077;o++)n[o]=2;for(o=32081;o<=32086;o++)n[o]=0;for(o=32107;o<=32130;o++)n[o]=0;for(o=32133;o<=32159;o++)n[o]=0;for(o=32164;o<=32167;o++)n[o]=2;for(o=32180;o<=32199;o++)n[o]=0;for(o=32201;o<=32260;o++)n[o]=0;for(o=32301;o<=32360;o++)n[o]=0;for(o=32401;o<=32460;o++)n[o]=0;for(o=32501;o<=32560;o++)n[o]=0;for(o=32601;o<=32662;o++)n[o]=0;for(o=32664;o<=32667;o++)n[o]=2;for(o=32701;o<=32761;o++)n[o]=0;for(o=53001;o<=53004;o++)n[o]=0;for(o=53008;o<=53019;o++)n[o]=0;for(o=53021;o<=53032;o++)n[o]=0;for(o=53034;o<=53037;o++)n[o]=0;for(o=53042;o<=53046;o++)n[o]=0;for(o=53074;o<=53080;o++)n[o]=0;for(o=54001;o<=54004;o++)n[o]=0;for(o=54008;o<=54019;o++)n[o]=0;for(o=54021;o<=54032;o++)n[o]=0;for(o=54034;o<=54037;o++)n[o]=0;for(o=54042;o<=54046;o++)n[o]=0;for(o=54048;o<=54053;o++)n[o]=0;for(o=54074;o<=54080;o++)n[o]=0;for(o=54090;o<=54096;o++)n[o]=0;for(o=54098;o<=54101;o++)n[o]=0;for(o=65161;o<=65163;o++)n[o]=0;for(o=102001;o<=102040;o++)n[o]=0;for(o=102042;o<=102063;o++)n[o]=0;for(o=102065;o<=102067;o++)n[o]=0;for(o=102070;o<=102117;o++)n[o]=0;for(o=102122;o<=102216;o++)n[o]=0;for(o=102221;o<=102377;o++)n[o]=0;for(o=102382;o<=102388;o++)n[o]=0;for(o=102389;o<=102398;o++)n[o]=2;for(o=102399;o<=102444;o++)n[o]=0;for(o=102445;o<=102447;o++)n[o]=2;for(o=102448;o<=102458;o++)n[o]=0;for(o=102459;o<=102468;o++)n[o]=2;for(o=102469;o<=102499;o++)n[o]=0;for(o=102500;o<=102519;o++)n[o]=1;for(o=102520;o<=102524;o++)n[o]=0;for(o=102525;o<=102529;o++)n[o]=2;for(o=102530;o<=102588;o++)n[o]=0;for(o=102590;o<=102598;o++)n[o]=0;for(o=102601;o<=102603;o++)n[o]=0;for(o=102605;o<=102628;o++)n[o]=0;for(o=102629;o<=102646;o++)n[o]=2;for(o=102648;o<=102700;o++)n[o]=2;for(o=102701;o<=102703;o++)n[o]=0;for(o=102707;o<=102730;o++)n[o]=2;for(o=102733;o<=102758;o++)n[o]=2;for(o=102767;o<=102900;o++)n[o]=0;for(o=102901;o<=102933;o++)n[o]=2;for(o=102934;o<=102950;o++)n[o]=13;for(o=102951;o<=102963;o++)n[o]=0;for(o=102965;o<=102969;o++)n[o]=0;for(o=102971;o<=102973;o++)n[o]=0;for(o=102975;o<=102989;o++)n[o]=0;for(o=102990;o<=102992;o++)n[o]=1;for(o=102997;o<=103002;o++)n[o]=0;for(o=103003;o<=103008;o++)n[o]=2;for(o=103009;o<=103011;o++)n[o]=0;for(o=103012;o<=103014;o++)n[o]=2;for(o=103019;o<=103021;o++)n[o]=0;for(o=103022;o<=103024;o++)n[o]=2;for(o=103029;o<=103031;o++)n[o]=0;for(o=103032;o<=103034;o++)n[o]=2;for(o=103065;o<=103068;o++)n[o]=0;for(o=103074;o<=103076;o++)n[o]=0;for(o=103077;o<=103079;o++)n[o]=1;for(o=103080;o<=103082;o++)n[o]=0;for(o=103083;o<=103085;o++)n[o]=2;for(o=103090;o<=103093;o++)n[o]=0;for(o=103097;o<=103099;o++)n[o]=0;for(o=103100;o<=103102;o++)n[o]=2;for(o=103107;o<=103109;o++)n[o]=0;for(o=103110;o<=103112;o++)n[o]=2;for(o=103113;o<=103116;o++)n[o]=0;for(o=103117;o<=103120;o++)n[o]=2;for(o=103153;o<=103157;o++)n[o]=0;for(o=103158;o<=103162;o++)n[o]=2;for(o=103163;o<=103165;o++)n[o]=0;for(o=103166;o<=103168;o++)n[o]=1;for(o=103169;o<=103171;o++)n[o]=2;for(o=103186;o<=103188;o++)n[o]=0;for(o=103189;o<=103191;o++)n[o]=2;for(o=103192;o<=103195;o++)n[o]=0;for(o=103196;o<=103199;o++)n[o]=2;for(o=103200;o<=103224;o++)n[o]=0;for(o=103225;o<=103227;o++)n[o]=1;for(o=103232;o<=103237;o++)n[o]=0;for(o=103238;o<=103243;o++)n[o]=2;for(o=103244;o<=103246;o++)n[o]=0;for(o=103247;o<=103249;o++)n[o]=2;for(o=103254;o<=103256;o++)n[o]=0;for(o=103257;o<=103259;o++)n[o]=2;for(o=103264;o<=103266;o++)n[o]=0;for(o=103267;o<=103269;o++)n[o]=2;for(o=103300;o<=103375;o++)n[o]=0;for(o=103381;o<=103383;o++)n[o]=0;for(o=103384;o<=103386;o++)n[o]=1;for(o=103387;o<=103389;o++)n[o]=0;for(o=103390;o<=103392;o++)n[o]=2;for(o=103397;o<=103399;o++)n[o]=0;for(o=103400;o<=103471;o++)n[o]=2;for(o=103476;o<=103478;o++)n[o]=0;for(o=103479;o<=103481;o++)n[o]=2;for(o=103486;o<=103488;o++)n[o]=0;for(o=103489;o<=103491;o++)n[o]=2;for(o=103492;o<=103495;o++)n[o]=0;for(o=103496;o<=103499;o++)n[o]=2;for(o=103528;o<=103543;o++)n[o]=0;for(o=103544;o<=103548;o++)n[o]=2;for(o=103549;o<=103551;o++)n[o]=0;for(o=103552;o<=103554;o++)n[o]=1;for(o=103555;o<=103557;o++)n[o]=2;for(o=103558;o<=103560;o++)n[o]=0;for(o=103571;o<=103573;o++)n[o]=0;for(o=103574;o<=103576;o++)n[o]=2;for(o=103577;o<=103580;o++)n[o]=0;for(o=103581;o<=103583;o++)n[o]=2;for(o=103595;o<=103694;o++)n[o]=0;for(o=103696;o<=103699;o++)n[o]=0;for(o=103700;o<=103793;o++)n[o]=2;for(o=103794;o<=103890;o++)n[o]=0;for(o=103891;o<=103896;o++)n[o]=2;for(o=103900;o<=103971;o++)n[o]=2;for(o=103972;o<=103977;o++)n[o]=0;for(o=112e3;o<=112101;o++)n[o]=0},34727:(e,t,r)=>{r.d(t,{$8:()=>m,Cc:()=>s,Hx:()=>p,Io:()=>y,KJ:()=>_,Sp:()=>l,XM:()=>u,YN:()=>c,ZH:()=>d,b6:()=>M,cU:()=>n,gg:()=>P,hs:()=>a,kU:()=>f,or:()=>A,pF:()=>R,pq:()=>U,qE:()=>i});const o=new Float32Array(1);function n(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function i(e,t,r){return Math.min(Math.max(e,t),r)}function s(e,t,r){return e+(t-e)*r}function a(e,t,r,o,n){return s(o,n,(e-t)/(r-t))}function f(e){return e*Math.PI/180}function _(e){return 180*e/Math.PI}function u(e){return Math.acos(i(e,-1,1))}function c(e){return Math.asin(i(e,-1,1))}function l(e,t,r=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=r}function P(e,t,r=1e-6){return!l(e,t,r)&&e>t}function d(e,t,r=1e-6){return!l(e,t,r)&&e<t}function p(e,t,r=1e-6){return l(e,t,r)||e>t}const E=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(e){return E.setFloat64(0,e),E.getBigInt64(0)}const S=1000000n,T=h(1);function h(e){const t=g(e=Math.abs(e)),r=function(e){return E.setBigInt64(0,e),E.getFloat64(0)}(t<=S?S:t-S);return Math.abs(e-r)}function y(e,t,r=T){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;if(null!=r&&h(Math.min(Math.abs(e),Math.abs(t)))<r)return Math.abs(e-t)<=r;const o=g(e),n=g(t);return o<0==n<0&&!((o<n?n-o:o-n)>S)}function M(e,t,r=1e-6){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;const o=Math.abs(e-t),n=Math.abs(e),i=Math.abs(t);if(0===e||0===t||n<1e-12&&i<1e-12){if(o>.01*r)return!1}else if(o/(n+i)>r)return!1;return!0}function m(e){return O(Math.max(-U,Math.min(e,U)))}function O(e){return o[0]=e,o[0]}function A(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],o=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(l(t,1)&&l(r,1)&&l(o,1))}const U=O(34028234663852886e22);function R(e,t,r){if(void 0===r||0===+r)return Math[e](t);if(t=+t,r=+r,isNaN(t)||"number"!=typeof r||r%1!=0)return NaN;let o=t.toString().split("e");return o=(t=Math[e](+(o[0]+"e"+(o[1]?+o[1]-r:-r)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+r:r))}},43937:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(10107);function n(e,t,r){let n,i;return void 0===t?(i=e,n=[void 0]):"string"!=typeof t?(i=e,n=[void 0],r=t):(i=t,n=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;for(const a of n){const n=(0,o.rM)(e,a,i);n.write&&"object"==typeof n.write||(n.write={}),r&&(n.write.target=r),n.write.writer=s[t]}}}},73941:(e,t,r)=>{r.d(t,{FY:()=>a,LJ:()=>f,Ro:()=>_,fv:()=>s,jA:()=>d,tO:()=>l,xP:()=>p,y7:()=>P});var o=r(79258),n=r(21325);function i(e){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const s=i(o.$O),a=i(o.sH),f=i(o.Sw),_={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${o.$O.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},u=a.wkt.toUpperCase(),c=f.wkt.toUpperCase();function l(e){if(null!=e&&(0,n.fn)(e)){const t=e.wkid,r=e.wkt2??e.wkt;if((0,n.tl)(t))return o.sH;const i=r?.toUpperCase();if(r&&i===u)return o.sH;if((0,n.ZL)(t)||i&&i===c)return o.Sw}return o.$O}function P(e){return(0,n.tl)(e)?o.sH:(0,n.ZL)(e)?o.Sw:o.$O}function d(e){return(0,n.aI)(e,s)}function p(e){return d(e)||(0,n.aI)(e,a)||(0,n.aI)(e,f)}},79258:(e,t,r)=>{r.d(t,{$O:()=>n,Sw:()=>s,sH:()=>i});class o{constructor(e,t,r,o,n,i){this.semiMajorAxis=e,this.flattening=t,this.outerAtmosphereRimWidth=r,this.atmosphereHeight=o,this.scaleHeight=n;const s=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*s,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=i||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}}const n=new o(6378137,1/298.257223563,3e5,1e5,.085,.006694379990137799),i=new o(3396190,1/169.8944472236118,23e4,6e4,.111),s=new o(1737400,0,0,0,0)},83047:(e,t,r)=>{r.d(t,{Ao:()=>k,B5:()=>b,G9:()=>R,GA:()=>N,Ij:()=>I,KX:()=>C,LA:()=>U,PQ:()=>m,Sk:()=>L,UW:()=>O,b$:()=>Y,dk:()=>x,dy:()=>f,k1:()=>G,oU:()=>M,vl:()=>A,x1:()=>F,yD:()=>P}),r(44208);var o=r(66552),n=r(73941),i=r(79258),s=r(21325),a=r(22530);const f=39.37,_=i.$O.radius*Math.PI/200,u=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,c=a.A,l=/UNIT\[([^\]]+)]/i,P=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),d=(0,o.O)()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),p=e=>e*e,E=e=>e*e*e,g={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:p(.001)},"square-centimeters":{inBaseUnits:p(.01)},"square-decimeters":{inBaseUnits:p(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:p(1e3)},"square-inches":{inBaseUnits:p(.0254)},"square-feet":{inBaseUnits:p(.3048)},"square-yards":{inBaseUnits:p(.9144)},"square-miles":{inBaseUnits:p(1609.344)},"square-nautical-miles":{inBaseUnits:p(1852)},"square-us-feet":{inBaseUnits:p(1200/3937)},acres:{inBaseUnits:.0015625*p(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*E(.001)},"cubic-centimeters":{inBaseUnits:1e3*E(.01)},"cubic-decimeters":{inBaseUnits:1e3*E(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*E(1e3)},"cubic-inches":{inBaseUnits:1e3*E(.0254)},"cubic-feet":{inBaseUnits:1e3*E(.3048)},"cubic-yards":{inBaseUnits:1e3*E(.9144)},"cubic-miles":{inBaseUnits:1e3*E(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},S=(()=>{const e={};for(const t in g)for(const r in g[t].units)e[r]=t;return e})(),T=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function h(e){const t=S[e];if(!t)throw new Error("unknown type");return t}function y(e,t=null){return t=t||h(e),g[t].baseUnit===e}function M(e,t,r){if(t===r)return e;const o=h(t);if(o!==h(r))throw new Error("incompatible units");const n=y(t,o)?e:function(e,t,r){return e*g[r].units[t].inBaseUnits}(e,t,o);return y(r,o)?n:function(e,t,r){return e/g[r].units[t].inBaseUnits}(n,r,o)}function m(e,t,r,o=!1){if(!o&&(0,s.EA)(t))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=I(t);return n!==r&&(e=n?M(e,n,r):M(e*=N(t),"meters",r)),e}function O(e,t,r,o=!1){if(!o&&(0,s.EA)(r))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=I(r);return t!==n&&(e=n?M(e,t,n):M(e,t,"meters")/N(r)),e}function A(e,t,r){return M(e,t,"meters")/(r*Math.PI/180)}function U(e){return d.fromJSON(e.toLowerCase())||null}function R(e){if(null!=e&&!(0,s.B3)(e))return 1;const t=N(e);return t>1e5?1:t}function G(e){return N(e)>=(0,n.tO)(e).metersPerDegree?"meters":I(e)}function N(e,t=i.$O.metersPerDegree){return k(e,!0)??t}function k(e,t=!1){const r=e?.wkid??null,o=e?.wkt2??e?.wkt??null;let n=null;if(r){if((0,s.tl)(r))return i.sH.metersPerDegree;if((0,s.ZL)(r))return i.Sw.metersPerDegree;n=c.values[c[r]],!n&&t&&P.has(r)&&(n=_)}else o&&(F(o)?n=w(u.exec(o),n):B(o)&&(n=w(l.exec(o),n)));return n}function C(e){return(0,s.EA)(e)?1:N(e)}function w(e,t){return e?.[1]?D(e[1]):t}function D(e){return parseFloat(e.split(",")[1])}function I(e){const t=e?.wkid??null,r=e?.wkt2??e?.wkt??null;let o=null;if(t)o=c.units[c[t]];else if(r){const e=F(r)?u:B(r)?l:null;if(e){const t=e.exec(r);t?.[1]&&(o=function(e){const t=/[\\"']([^\\"']+)/.exec(e);let r=t?.[1];if(!r||!U(r)){const t=D(e);r=null;const o=c.values;for(let e=0;e<o.length;++e)if(Math.abs(t-o[e])<W){r=c.units[e];break}}return r}(t[1]))}}return null!=o?U(o):null}function b(e){const t=I(e);return null==t?null:T.get(t)}function B(e){return/^GEOCCS/i.test(e)}function F(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const W=1e-7,x=(0,o.O)()({esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"}),L=(0,o.O)()({esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"}),Y=(0,o.O)()({esriDUDecimalDegrees:"degrees",esriDURadians:"radians"})},83290:(e,t,r)=>{r.d(t,{P:()=>p,a:()=>u,g:()=>N,h:()=>_,i:()=>a,j:()=>h,l:()=>f,p:()=>B});var o=r(2741),n=r(44208);let i,s=null;function a(){return!!s}function f(){return i||(i=r.e(6187).then(r.bind(r,46187)).then(({default:e})=>e({locateFile:e=>(0,o.s)(`esri/geometry/support/${e}`)})).then(e=>{C(e)}),i)}const _={geogToProj(e,t,r){s.ensureCache.prepare();const o=I(r),n=r===o,i=s.ensureFloat64(o),a=s._pe_geog_to_proj(s.getPointer(e),t,i);return a&&b(r,t,i,n),a},projGeog(e,t,r,o){switch(o){case u.PE_TRANSFORM_P_TO_G:return _.projToGeog(e,t,r);case u.PE_TRANSFORM_G_TO_P:return _.geogToProj(e,t,r)}return 0},projToGeog:(e,t,r)=>_.projToGeogCenter(e,t,r,0),projToGeogCenter(e,t,r,o){s.ensureCache.prepare();const n=I(r),i=r===n,a=s.ensureFloat64(n),f=s._pe_proj_to_geog_center(s.getPointer(e),t,a,o);return f&&b(r,t,a,i),f}};class u{static init(){u.PE_BUFFER_MAX=s.PeDefs.prototype.PE_BUFFER_MAX,u.PE_NAME_MAX=s.PeDefs.prototype.PE_NAME_MAX,u.PE_MGRS_MAX=s.PeDefs.prototype.PE_MGRS_MAX,u.PE_USNG_MAX=s.PeDefs.prototype.PE_USNG_MAX,u.PE_DD_MAX=s.PeDefs.prototype.PE_DD_MAX,u.PE_DDM_MAX=s.PeDefs.prototype.PE_DDM_MAX,u.PE_DMS_MAX=s.PeDefs.prototype.PE_DMS_MAX,u.PE_UTM_MAX=s.PeDefs.prototype.PE_UTM_MAX,u.PE_PARM_MAX=s.PeDefs.prototype.PE_PARM_MAX,u.PE_TYPE_NONE=s.PeDefs.prototype.PE_TYPE_NONE,u.PE_TYPE_GEOGCS=s.PeDefs.prototype.PE_TYPE_GEOGCS,u.PE_TYPE_PROJCS=s.PeDefs.prototype.PE_TYPE_PROJCS,u.PE_TYPE_GEOGTRAN=s.PeDefs.prototype.PE_TYPE_GEOGTRAN,u.PE_TYPE_COORDSYS=s.PeDefs.prototype.PE_TYPE_COORDSYS,u.PE_TYPE_UNIT=s.PeDefs.prototype.PE_TYPE_UNIT,u.PE_TYPE_LINUNIT=s.PeDefs.prototype.PE_TYPE_LINUNIT,u.PE_STR_OPTS_NONE=s.PeDefs.prototype.PE_STR_OPTS_NONE,u.PE_STR_AUTH_NONE=s.PeDefs.prototype.PE_STR_AUTH_NONE,u.PE_STR_AUTH_TOP=s.PeDefs.prototype.PE_STR_AUTH_TOP,u.PE_STR_NAME_CANON=s.PeDefs.prototype.PE_STR_NAME_CANON,u.PE_STR_FMT_WKT=s.PeDefs.prototype.PE_STR_FMT_WKT,u.PE_STR_FMT_WKT2=s.PeDefs.prototype.PE_STR_FMT_WKT2,u.PE_PARM_X0=s.PeDefs.prototype.PE_PARM_X0,u.PE_PARM_ND=s.PeDefs.prototype.PE_PARM_ND,u.PE_TRANSFORM_1_TO_2=s.PeDefs.prototype.PE_TRANSFORM_1_TO_2,u.PE_TRANSFORM_2_TO_1=s.PeDefs.prototype.PE_TRANSFORM_2_TO_1,u.PE_TRANSFORM_P_TO_G=s.PeDefs.prototype.PE_TRANSFORM_P_TO_G,u.PE_TRANSFORM_G_TO_P=s.PeDefs.prototype.PE_TRANSFORM_G_TO_P,u.PE_HORIZON_RECT=s.PeDefs.prototype.PE_HORIZON_RECT,u.PE_HORIZON_POLY=s.PeDefs.prototype.PE_HORIZON_POLY,u.PE_HORIZON_LINE=s.PeDefs.prototype.PE_HORIZON_LINE,u.PE_HORIZON_DELTA=s.PeDefs.prototype.PE_HORIZON_DELTA}}let c=null;const l={},P={},d=e=>{const t=e.getType();switch(t){case u.PE_TYPE_GEOGCS:e=s.castObject(e,s.PeGeogcs);break;case u.PE_TYPE_PROJCS:e=s.castObject(e,s.PeProjcs);break;case u.PE_TYPE_GEOGTRAN:e=s.castObject(e,s.PeGeogtran);break;default:t&u.PE_TYPE_UNIT&&(e=s.castObject(e,s.PeUnit))}return e},p={initialize(){s.PeFactory.prototype.initialize(null)},coordsys:e=>p.factoryByType(u.PE_TYPE_COORDSYS,e),factoryByType(e,t){let r=null,o=l[e];if(o||(o={},l[e]=o),o.hasOwnProperty(String(t))&&(r=o[t],s.compare(r,s.NULL)&&(r=null)),!r){const n=s.PeFactory.prototype.factoryByType(e,t);s.compare(n,s.NULL)||(r=d(n),o[t]=r)}return r},fromString(e,t){let r=null,o=P[e];if(o||(o={},P[e]=o),o.hasOwnProperty(t)&&(r=o[t],s.compare(r,s.NULL)&&(r=null)),!r){const n=s.PeFactory.prototype.fromString(e,t);s.compare(n,s.NULL)||(r=d(n),o[t]=r)}return r},geogcs:e=>p.factoryByType(u.PE_TYPE_GEOGCS,e),geogtran:e=>p.factoryByType(u.PE_TYPE_GEOGTRAN,e),getCode:e=>s.PeFactory.prototype.getCode(e),projcs:e=>p.factoryByType(u.PE_TYPE_PROJCS,e),unit:e=>p.factoryByType(u.PE_TYPE_UNIT,e)};let E,g=null;const S={PE_GTLIST_OPTS_COMMON:0,init(){S.PE_GTLIST_OPTS_COMMON=s.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,E=s._pe_getPeGTlistExtendedEntrySize()},getGTlist(e,t,r,o,n,i){let a=null;const f=new s.PeInteger(i);try{const _=s.PeGTlistExtended.prototype.getGTlist(e,t,r,o,n,f);if((i=f.val)&&(a=[_],i>1)){const e=s.getPointer(_);for(let t=1;t<i;t++)a.push(s.wrapPointer(e+E*t,s.PeGTlistExtendedEntry))}}finally{s.destroy(f)}return a}},T={destroy(e){if(e?.length){for(const t of e)w(t),t.getEntries().forEach(e=>{w(e);const t=e.getGeogtran();w(t),t.getParameters().forEach(w),[t.getGeogcs1(),t.getGeogcs2()].forEach(e=>{w(e);const t=e.getDatum();w(t),w(t.getSpheroid()),w(e.getPrimem()),w(e.getUnit())})});s.PeGTlistExtendedEntry.prototype.Delete(e[0])}}},h={geogToGeog(e,t,r,o,n){s.ensureCache.prepare();const i=I(r),a=r===i,f=s.ensureFloat64(i);let _=0;o&&(_=s.ensureFloat64(o));const u=s._pe_geog_to_geog(s.getPointer(e),t,f,_,n);return u&&b(r,t,f,a),u}},y={geodesicCoordinate(e,t,r,o,n,i,a,f){s.PeLineType.prototype.geodesic_coordinate(e,t,r,o,n,i,a,f)},geodeticCoordinate(e,t,r,o,n,i,a,f,_){s.PeLineType.prototype.geodetic_coordinate(e,t,r,o,n,i,a,f,_)},geodeticDistance(e,t,r,o,n,i,a,f,_,u){s.PeLineType.prototype.geodetic_distance(e,t,r,o,n,i,a,f,_,u)},greatEllipticDistance(e,t,r,o,n,i,a,f,_){s.PeLineType.prototype.great_elliptic_distance(e,t,r,o,n,i,a,f,_)}},M={phiToEta:(e,t)=>s.PeMath.prototype.phi_to_eta(e,t),etaToPhi:(e,t)=>s.PeMath.prototype.eta_to_phi(e,t),phiToPhig:(e,t)=>s.PeMath.prototype.phi_to_phig(e,t),q:(e,t,r)=>s.PeMath.prototype.q(e,t,r),q90:(e,t)=>s.PeMath.prototype.q90(e,t)},m=(e,t,r,o,n,i)=>{let a,f;switch(s.ensureCache.prepare(),e){case"dd":a=s._pe_geog_to_dd,f=u.PE_DD_MAX;break;case"ddm":a=s._pe_geog_to_ddm,f=u.PE_DDM_MAX;break;case"dms":a=s._pe_geog_to_dms,f=u.PE_DMS_MAX}let _=0;t&&(_=s.getPointer(t));const c=I(o),l=s.ensureFloat64(c),P=D(r,f),d=a(_,r,l,n,s.ensureInt32(P));if(d)for(let e=0;e<r;e++)i[e]=s.UTF8ToString(P[e]);return d},O=(e,t,r,o,n)=>{let i;switch(s.ensureCache.prepare(),e){case"dd":i=s._pe_dd_to_geog;break;case"ddm":i=s._pe_ddm_to_geog;break;case"dms":i=s._pe_dms_to_geog}let a=0;t&&(a=s.getPointer(t));const f=o.map(e=>s.ensureString(e)),_=s.ensureInt32(f),u=s.ensureFloat64(new Array(2*r)),c=i(a,r,_,u);return c&&b(n,r,u),c},A={geogToDms:(e,t,r,o,n)=>m("dms",e,t,r,o,n),dmsToGeog:(e,t,r,o)=>O("dms",e,t,r,o),geogToDdm:(e,t,r,o,n)=>m("ddm",e,t,r,o,n),ddmToGeog:(e,t,r,o)=>O("ddm",e,t,r,o),geogToDd:(e,t,r,o,n)=>m("dd",e,t,r,o,n),ddToGeog:(e,t,r,o)=>O("dd",e,t,r,o)};class U{static init(){U.PE_MGRS_STYLE_NEW=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,U.PE_MGRS_STYLE_OLD=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,U.PE_MGRS_STYLE_AUTO=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,U.PE_MGRS_180_ZONE_1_PLUS=s.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,U.PE_MGRS_ADD_SPACES=s.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}static geogToMgrsExtended(e,t,r,o,n,i,a){s.ensureCache.prepare();let f=0;e&&(f=s.getPointer(e));const _=I(r),c=s.ensureFloat64(_),l=D(t,u.PE_MGRS_MAX),P=s.ensureInt32(l),d=s._pe_geog_to_mgrs_extended(f,t,c,o,n,i,P);if(d)for(let e=0;e<t;e++)a[e]=s.UTF8ToString(l[e]);return d}static mgrsToGeogExtended(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=r.map(e=>s.ensureString(e)),f=s.ensureInt32(a),_=s.ensureFloat64(new Array(2*t)),u=s._pe_mgrs_to_geog_extended(i,t,f,o,_);return u&&b(n,t,_),u}}const R={geogToUsng(e,t,r,o,n,i,a){s.ensureCache.prepare();let f=0;e&&(f=s.getPointer(e));const _=I(r),c=s.ensureFloat64(_),l=D(t,u.PE_MGRS_MAX),P=s.ensureInt32(l),d=s._pe_geog_to_usng(f,t,c,o,n,i,P);if(d)for(let e=0;e<t;e++)a[e]=s.UTF8ToString(l[e]);return d},usngToGeog(e,t,r,o){s.ensureCache.prepare();let n=0;e&&(n=s.getPointer(e));const i=r.map(e=>s.ensureString(e)),a=s.ensureInt32(i),f=s.ensureFloat64(new Array(2*t)),_=s._pe_usng_to_geog(n,t,a,f);return _&&b(o,t,f),_}};class G{static init(){G.PE_UTM_OPTS_NONE=s.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,G.PE_UTM_OPTS_ADD_SPACES=s.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,G.PE_UTM_OPTS_NS=s.PeNotationUtm.prototype.PE_UTM_OPTS_NS}static geogToUtm(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=I(r),f=s.ensureFloat64(a),_=D(t,u.PE_UTM_MAX),c=s.ensureInt32(_),l=s._pe_geog_to_utm(i,t,f,o,c);if(l)for(let e=0;e<t;e++)n[e]=s.UTF8ToString(_[e]);return l}static utmToGeog(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=r.map(e=>s.ensureString(e)),f=s.ensureInt32(a),_=s.ensureFloat64(new Array(2*t)),u=s._pe_utm_to_geog(i,t,f,o,_);return u&&b(n,t,_),u}}class N{static{this.cache=new Map}static init(){N.PE_PCSINFO_OPTION_NONE=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,N.PE_PCSINFO_OPTION_DOMAIN=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,N.PE_POLE_OUTSIDE_BOUNDARY=s.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,N.PE_POLE_POINT=s.PePCSInfo.prototype.PE_POLE_POINT}static generate(e,t=N.PE_PCSINFO_OPTION_DOMAIN){let r=null,o=null;return N.cache.has(e)&&(o=N.cache.get(e),o[t]&&(r=o[t])),r||(r=s.PePCSInfo.prototype.generate(e,t),o||(o=[],N.cache.set(e,o)),o[t]=r),r}}const k={versionString:()=>s.PeVersion.prototype.version_string()};function C(e){function t(e,t,r){e[t]=r(e[t])}s=e,u.init(),S.init(),U.init(),G.init(),N.init(),c=class extends s.PeDouble{constructor(e=NaN){super(e)}destroy(){s.destroy(this)}[Symbol.dispose](){this.destroy()}},g=class extends s.PeGCSExtent{destroy(){s.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[s.PeAngunit,s.PeDatum,s.PeGeogcs,s.PeGeogtran,s.PeObject,s.PeParameter,s.PePrimem,s.PeProjcs,s.PeSpheroid,s.PeUnit];for(const e of r)t(e.prototype,"getName",e=>function(){return e.call(this,new Array(u.PE_NAME_MAX))});for(const e of[s.PeGeogtran,s.PeProjcs])t(e.prototype,"getParameters",e=>function(){const t=new Array(u.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const o=s.getValue(r,"*");t[e]=o?s.wrapPointer(o,s.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t});t(s.PeHorizon.prototype,"getCoord",e=>function(t=!1){const r=this.getSize();if(!r)return null;const o=[];return b(o,r,e.call(this),t),o}),t(s.PeGTlistExtendedEntry.prototype,"getEntries",e=>{const t=s._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const o=e.call(this);if(!s.compare(o,s.NULL)){r=[o];const e=this.getSteps();if(e>1){const n=s.getPointer(o);for(let o=1;o<e;o++)r.push(s.wrapPointer(n+t*o,s.PeGTlistExtendedGTs))}}return r}});const o=s._pe_getPeHorizonSize(),n=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const n=e.call(this);if(!s.compare(n,s.NULL)){r=[n];const e=n.getNump();if(e>1){const t=s.getPointer(n);for(let n=1;n<e;n++)r.push(s.wrapPointer(t+o*n,s.PeHorizon))}}return t.set(e,r),r};t(s.PeProjcs.prototype,"horizonGcsGenerate",n),t(s.PeProjcs.prototype,"horizonPcsGenerate",n),s.PeObject.prototype.toString=function(e=u.PE_STR_OPTS_NONE){s.ensureCache.prepare();const t=s.getPointer(this),r=s.ensureInt8(new Array(u.PE_BUFFER_MAX));return s.UTF8ToString(s._pe_object_to_string_ext(t,e,r))},s.PeGeogcs.prototype.destroy=function(){this.Delete(),w(this),this.ptr=0},s.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},s.PeProjcs.prototype.destroy=function(){this.Delete(),w(this),this.ptr=0},s.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function w(e){if(!e)return;const t=s.getClass(e);if(!t)return;const r=s.getCache(t);if(!r)return;const o=s.getPointer(e);o&&delete r[o]}function D(e,t){const r=[],o=new Array(t);for(let t=0;t<e;t++)r.push(s.ensureInt8(o));return r}function I(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function b(e,t,r,o=!1){if(o)for(let o=0;o<2*t;o++)e[o]=s.getValue(r+o*Float64Array.BYTES_PER_ELEMENT,"double");else{const o=0===e.length;for(let n=0;n<t;n++)o&&(e[n]=new Array(2)),e[n][0]=s.getValue(r,"double"),e[n][1]=s.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}const B=Object.freeze(Object.defineProperty({__proto__:null,PeCSTransformations:_,PeDefs:u,get PeDouble(){return c},PeFactory:p,get PeGCSExtent(){return g},PeGTTransformations:h,PeGTlistExtended:S,PeGTlistExtendedEntry:T,PeLineType:y,PeMath:M,PeNotationDms:A,PeNotationMgrs:U,PeNotationUsng:R,PeNotationUtm:G,PePCSInfo:N,PeVersion:k,_init:C,get _pe(){return s},isLoaded:a,isSupported:function(){return!!(0,n.A)("esri-wasm")},load:f},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4996],{16930:(e,t,r)=>{r.d(t,{A:()=>d});var o,n=r(31635),i=r(65008),s=r(25482),a=r(4718),f=r(83047),_=r(56507),u=r(10107),c=r(40608),l=r(43937),P=r(21325);let d=class extends s.o{static{o=this}static{this.GCS_NAD_1927=null}static{this.WGS84=null}static{this.WebMercator=null}static{this.PlateCarree=null}static fromJSON(e){if(!e)return null;if(102100===e?.wkid)return o.WebMercator;if(4326===e?.wkid)return o.WGS84;const t=new o;return t.read(e),t}constructor(e){super(e),this.latestWkid=null,this.wkid=null,this.wkt=null,this.wkt2=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(e){if(e&&"object"==typeof e)return e;const t="string"==typeof e?"wkt":"wkid";return{[t]:e}}get isWGS84(){return(0,P.oT)(this)}get isWebMercator(){return(0,P.K8)(this)}get isGeographic(){return(0,P.EA)(this)}get isWrappable(){return(0,P.d9)(this)}get metersPerUnit(){return(0,f.GA)(this)}get unit(){return(0,f.Ij)(this)||(this.isGeographic?"degrees":null)}writeWkt(e,t){this.wkid||(t.wkt=e)}clone(){if(this===o.WGS84)return new o(P.KK);if(this===o.WebMercator)return new o(P.ch);const e=new o;return null!=this.wkid?(e.wkid=this.wkid,null!=this.latestWkid&&(e.latestWkid=this.latestWkid),null!=this.vcsWkid&&(e.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(e.latestVcsWkid=this.latestVcsWkid)):(null!=this.wkt&&(e.wkt=this.wkt),null!=this.wkt2&&(e.wkt2=this.wkt2)),this.imageCoordinateSystem&&(e.imageCoordinateSystem=(0,a.o8)(this.imageCoordinateSystem)),e}equals(e){if(null==e)return!1;if(this.imageCoordinateSystem||e.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==e.imageCoordinateSystem)return!1;const{id:t,referenceServiceName:r}=e.imageCoordinateSystem,{geodataXform:o}=e.imageCoordinateSystem,n=this.imageCoordinateSystem;return null==t||o?JSON.stringify(n)===JSON.stringify(e.imageCoordinateSystem):r?n.id===t&&n.referenceServiceName===r:n.id===t}return(0,P.aI)(this,e)}toJSON(e){return this.write(void 0,e)}};(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWGS84",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWebMercator",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isGeographic",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"isWrappable",null),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"latestWkid",void 0),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"metersPerUnit",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],d.prototype,"unit",null),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkt}}}}}}})],d.prototype,"wkid",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkid}}}}}}})],d.prototype,"wkt",void 0),(0,n.Cg)([(0,l.K)("wkt"),(0,l.K)("web-scene","wkt")],d.prototype,"writeWkt",null),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!1}})],d.prototype,"wkt2",void 0),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"vcsWkid",void 0),(0,n.Cg)([(0,u.MZ)({type:_.jz,json:{write:!0}})],d.prototype,"latestVcsWkid",void 0),(0,n.Cg)([(0,u.MZ)()],d.prototype,"imageCoordinateSystem",void 0),d=o=(0,n.Cg)([(0,c.$)("esri.geometry.SpatialReference")],d),d.prototype.toJSON.isDefaultToJSON=!0,d.GCS_NAD_1927=i.A.freeze(new d({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'})),d.WGS84=i.A.freeze(new d(P.KK)),d.WebMercator=i.A.freeze(new d(P.ch)),d.PlateCarree=i.A.freeze(new d(P.tQ))},21325:(e,t,r)=>{r.d(t,{B3:()=>p,EA:()=>d,K8:()=>T,KK:()=>R,KQ:()=>O,Mc:()=>a,Vp:()=>l,YX:()=>P,ZL:()=>m,aI:()=>c,ch:()=>G,d9:()=>A,fn:()=>U,jp:()=>g,oT:()=>E,q8:()=>M,r1:()=>h,tQ:()=>N,tl:()=>y,x1:()=>S});var o=r(799),n=(r(83290),r(22530));const i=[102100,102113,3857,3785,900913],s=[4326,...i,104905,104971],a=[-20037508.342788905,20037508.342788905],f=[-20037508.342787,20037508.342787],_={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},u={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},102100:_,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:a,origin:f,dx:1e-5},3857:_,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:_};function c(e,t){if(e===t)return!0;if(null==e||null==t)return!1;const r=e.wkid,o=t.wkid;if(null!=r||null!=o){if(r===o)return!0;if(T(e)&&T(t))return!0;const n=e.latestWkid;if(null!=n&&o===n)return!0;const i=t.latestWkid;return null!=i&&r===i}let n,i;return e.wkt2&&t.wkt2?(n=e.wkt2,i=t.wkt2):e.wkt&&t.wkt&&(n=e.wkt,i=t.wkt),!(!n||!i)&&n.toUpperCase()===i.toUpperCase()}function l(e){const t=e?.wkid;return null!=t&&t>=2e3&&u[t]||null}function P(e){if(!e)return;const{wkid:t,vcsWkid:r}=e;if(t)return r?JSON.stringify({wkid:t,vcsWkid:r}):String(t);const o=e.wkt||e.wkt2;return JSON.stringify(o?r?{wkt:o,vcsWkid:r}:{wkt:o}:{})}function d(e){if(!U(e))return!1;const{wkid:t}=e;if(t)return null==n.A[t];const r=e.wkt2||e.wkt;return!!r&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(r)}function p(e){return!(M(e)||O(e))}function E(e){return 4326===e?.wkid}function g(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function S(e){return 4490===e?.wkid}function T(e){const t=e?.wkid;return null!=t&&t>=2e3&&i.includes(t)}function h(e){return 32662===e?.wkid}function y(e){return 104971===e||104905===e}function M(e){return y(e?.wkid)}function m(e){return 104903===e}function O(e){return m(e?.wkid)}function A(e){const t=e?.wkid;return null!=t&&t>=2e3&&s.includes(t)}function U(e){if(null==e)return!1;const t=e.wkid;return null!=t&&t>=2e3||null!=e.wkt2||null!=e.wkt}const R={wkid:4326,wkt:(0,o.HC)(u[4326].wkTemplate,{Central_Meridian:"0.0"})},G={wkid:102100,latestWkid:3857},N={wkid:32662}},22530:(e,t,r)=>{let o;r.d(t,{A:()=>n});const n={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,10477:0,10481:2,10516:2,10592:0,10594:0,10596:0,10598:0,10601:0,10603:0,10626:0,10632:0,10641:0,10665:0,10674:0,10744:0,10745:0,10759:0,10773:0,10802:0,10820:0,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,65061:2,65062:2,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1,103978:2,103979:0,103980:2,103981:0};for(o=2e3;o<=2045;o++)n[o]=0;for(o=2056;o<=2065;o++)n[o]=0;for(o=2067;o<=2135;o++)n[o]=0;for(o=2137;o<=2154;o++)n[o]=0;for(o=2161;o<=2170;o++)n[o]=0;for(o=2172;o<=2193;o++)n[o]=0;for(o=2195;o<=2198;o++)n[o]=0;for(o=2200;o<=2203;o++)n[o]=0;for(o=2205;o<=2217;o++)n[o]=0;for(o=2222;o<=2224;o++)n[o]=1;for(o=2225;o<=2250;o++)n[o]=2;for(o=2251;o<=2253;o++)n[o]=1;for(o=2257;o<=2264;o++)n[o]=2;for(o=2274;o<=2279;o++)n[o]=2;for(o=2280;o<=2282;o++)n[o]=1;for(o=2283;o<=2289;o++)n[o]=2;for(o=2290;o<=2292;o++)n[o]=0;for(o=2308;o<=2313;o++)n[o]=0;for(o=2315;o<=2491;o++)n[o]=0;for(o=2494;o<=2866;o++)n[o]=0;for(o=2867;o<=2869;o++)n[o]=1;for(o=2870;o<=2888;o++)n[o]=2;for(o=2891;o<=2895;o++)n[o]=2;for(o=2896;o<=2898;o++)n[o]=1;for(o=2902;o<=2908;o++)n[o]=2;for(o=2915;o<=2920;o++)n[o]=2;for(o=2921;o<=2923;o++)n[o]=1;for(o=2924;o<=2930;o++)n[o]=2;for(o=2931;o<=2962;o++)n[o]=0;for(o=2964;o<=2968;o++)n[o]=2;for(o=2969;o<=2973;o++)n[o]=0;for(o=2975;o<=2991;o++)n[o]=0;for(o=2995;o<=3051;o++)n[o]=0;for(o=3054;o<=3079;o++)n[o]=0;for(o=3081;o<=3088;o++)n[o]=0;for(o=3092;o<=3101;o++)n[o]=0;for(o=3106;o<=3138;o++)n[o]=0;for(o=3146;o<=3151;o++)n[o]=0;for(o=3153;o<=3166;o++)n[o]=0;for(o=3168;o<=3172;o++)n[o]=0;for(o=3174;o<=3203;o++)n[o]=0;for(o=3294;o<=3358;o++)n[o]=0;for(o=3367;o<=3403;o++)n[o]=0;for(o=3408;o<=3416;o++)n[o]=0;for(o=3417;o<=3438;o++)n[o]=2;for(o=3441;o<=3446;o++)n[o]=2;for(o=3447;o<=3450;o++)n[o]=0;for(o=3451;o<=3459;o++)n[o]=2;for(o=3460;o<=3478;o++)n[o]=0;for(o=3554;o<=3559;o++)n[o]=0;for(o=3560;o<=3570;o++)n[o]=2;for(o=3571;o<=3581;o++)n[o]=0;for(o=3594;o<=3597;o++)n[o]=0;for(o=3601;o<=3604;o++)n[o]=0;for(o=3637;o<=3639;o++)n[o]=0;for(o=3665;o<=3667;o++)n[o]=0;for(o=3693;o<=3695;o++)n[o]=0;for(o=3701;o<=3727;o++)n[o]=0;for(o=3728;o<=3739;o++)n[o]=2;for(o=3740;o<=3751;o++)n[o]=0;for(o=3753;o<=3760;o++)n[o]=2;for(o=3761;o<=3773;o++)n[o]=0;for(o=3775;o<=3777;o++)n[o]=0;for(o=3779;o<=3781;o++)n[o]=0;for(o=3783;o<=3785;o++)n[o]=0;for(o=3788;o<=3791;o++)n[o]=0;for(o=3797;o<=3802;o++)n[o]=0;for(o=3814;o<=3816;o++)n[o]=0;for(o=3825;o<=3829;o++)n[o]=0;for(o=3832;o<=3841;o++)n[o]=0;for(o=3844;o<=3852;o++)n[o]=0;for(o=3873;o<=3885;o++)n[o]=0;for(o=3890;o<=3893;o++)n[o]=0;for(o=3907;o<=3912;o++)n[o]=0;for(o=3942;o<=3950;o++)n[o]=0;for(o=3968;o<=3970;o++)n[o]=0;for(o=3973;o<=3976;o++)n[o]=0;for(o=3986;o<=3989;o++)n[o]=0;for(o=3994;o<=3997;o++)n[o]=0;for(o=4048;o<=4051;o++)n[o]=0;for(o=4056;o<=4063;o++)n[o]=0;for(o=4093;o<=4096;o++)n[o]=0;for(o=4390;o<=4398;o++)n[o]=0;for(o=4399;o<=4413;o++)n[o]=2;for(o=4418;o<=4433;o++)n[o]=2;for(o=4455;o<=4457;o++)n[o]=2;for(o=4484;o<=4489;o++)n[o]=0;for(o=4491;o<=4554;o++)n[o]=0;for(o=4568;o<=4589;o++)n[o]=0;for(o=4652;o<=4656;o++)n[o]=0;for(o=4766;o<=4800;o++)n[o]=0;for(o=5014;o<=5016;o++)n[o]=0;for(o=5069;o<=5072;o++)n[o]=0;for(o=5105;o<=5130;o++)n[o]=0;for(o=5167;o<=5188;o++)n[o]=0;for(o=5253;o<=5259;o++)n[o]=0;for(o=5269;o<=5275;o++)n[o]=0;for(o=5292;o<=5311;o++)n[o]=0;for(o=5329;o<=5331;o++)n[o]=0;for(o=5343;o<=5349;o++)n[o]=0;for(o=5355;o<=5357;o++)n[o]=0;for(o=5387;o<=5389;o++)n[o]=0;for(o=5459;o<=5463;o++)n[o]=0;for(o=5479;o<=5482;o++)n[o]=0;for(o=5518;o<=5520;o++)n[o]=0;for(o=5530;o<=5539;o++)n[o]=0;for(o=5550;o<=5552;o++)n[o]=0;for(o=5562;o<=5583;o++)n[o]=0;for(o=5623;o<=5625;o++)n[o]=2;for(o=5631;o<=5639;o++)n[o]=0;for(o=5649;o<=5653;o++)n[o]=0;for(o=5663;o<=5680;o++)n[o]=0;for(o=5682;o<=5685;o++)n[o]=0;for(o=5875;o<=5877;o++)n[o]=0;for(o=5896;o<=5899;o++)n[o]=0;for(o=5921;o<=5940;o++)n[o]=0;for(o=6050;o<=6125;o++)n[o]=0;for(o=6244;o<=6275;o++)n[o]=0;for(o=6328;o<=6348;o++)n[o]=0;for(o=6350;o<=6356;o++)n[o]=0;for(o=6366;o<=6372;o++)n[o]=0;for(o=6381;o<=6387;o++)n[o]=0;for(o=6393;o<=6404;o++)n[o]=0;for(o=6480;o<=6483;o++)n[o]=0;for(o=6511;o<=6514;o++)n[o]=0;for(o=6579;o<=6581;o++)n[o]=0;for(o=6619;o<=6624;o++)n[o]=0;for(o=6625;o<=6627;o++)n[o]=2;for(o=6628;o<=6632;o++)n[o]=0;for(o=6634;o<=6637;o++)n[o]=0;for(o=6669;o<=6692;o++)n[o]=0;for(o=6707;o<=6709;o++)n[o]=0;for(o=6720;o<=6723;o++)n[o]=0;for(o=6732;o<=6738;o++)n[o]=0;for(o=6931;o<=6933;o++)n[o]=0;for(o=6956;o<=6959;o++)n[o]=0;for(o=7005;o<=7007;o++)n[o]=0;for(o=7057;o<=7070;o++)n[o]=2;for(o=7074;o<=7082;o++)n[o]=0;for(o=7109;o<=7118;o++)n[o]=0;for(o=7119;o<=7127;o++)n[o]=1;for(o=7374;o<=7376;o++)n[o]=0;for(o=7528;o<=7586;o++)n[o]=0;for(o=7587;o<=7645;o++)n[o]=2;for(o=7692;o<=7696;o++)n[o]=0;for(o=7755;o<=7787;o++)n[o]=0;for(o=7791;o<=7795;o++)n[o]=0;for(o=7799;o<=7801;o++)n[o]=0;for(o=7803;o<=7805;o++)n[o]=0;for(o=7825;o<=7831;o++)n[o]=0;for(o=7845;o<=7859;o++)n[o]=0;for(o=8013;o<=8032;o++)n[o]=0;for(o=8065;o<=8068;o++)n[o]=1;for(o=8518;o<=8529;o++)n[o]=2;for(o=8533;o<=8536;o++)n[o]=2;for(o=8538;o<=8540;o++)n[o]=2;for(o=8677;o<=8679;o++)n[o]=0;for(o=8836;o<=8840;o++)n[o]=0;for(o=8857;o<=8859;o++)n[o]=0;for(o=8908;o<=8910;o++)n[o]=0;for(o=9154;o<=9159;o++)n[o]=0;for(o=9205;o<=9218;o++)n[o]=0;for(o=9271;o<=9273;o++)n[o]=0;for(o=9295;o<=9297;o++)n[o]=0;for(o=9356;o<=9360;o++)n[o]=0;for(o=9404;o<=9407;o++)n[o]=0;for(o=9476;o<=9482;o++)n[o]=0;for(o=9487;o<=9494;o++)n[o]=0;for(o=9697;o<=9699;o++)n[o]=0;for(o=9821;o<=9865;o++)n[o]=0;for(o=10285;o<=10291;o++)n[o]=0;for(o=10314;o<=10317;o++)n[o]=0;for(o=10448;o<=10465;o++)n[o]=0;for(o=10726;o<=10729;o++)n[o]=0;for(o=10731;o<=10733;o++)n[o]=0;for(o=11114;o<=11118;o++)n[o]=0;for(o=20004;o<=20032;o++)n[o]=0;for(o=20047;o<=20049;o++)n[o]=0;for(o=20062;o<=20092;o++)n[o]=0;for(o=20135;o<=20138;o++)n[o]=0;for(o=20248;o<=20258;o++)n[o]=0;for(o=20348;o<=20358;o++)n[o]=0;for(o=20436;o<=20440;o++)n[o]=0;for(o=20822;o<=20824;o++)n[o]=0;for(o=20904;o<=20932;o++)n[o]=0;for(o=20934;o<=20936;o++)n[o]=0;for(o=21004;o<=21032;o++)n[o]=0;for(o=21035;o<=21037;o++)n[o]=0;for(o=21095;o<=21097;o++)n[o]=0;for(o=21148;o<=21150;o++)n[o]=0;for(o=21207;o<=21264;o++)n[o]=0;for(o=21307;o<=21364;o++)n[o]=0;for(o=21413;o<=21423;o++)n[o]=0;for(o=21453;o<=21463;o++)n[o]=0;for(o=21473;o<=21483;o++)n[o]=0;for(o=21780;o<=21782;o++)n[o]=0;for(o=21891;o<=21894;o++)n[o]=0;for(o=21896;o<=21899;o++)n[o]=0;for(o=22171;o<=22177;o++)n[o]=0;for(o=22181;o<=22187;o++)n[o]=0;for(o=22191;o<=22197;o++)n[o]=0;for(o=22207;o<=22222;o++)n[o]=0;for(o=22229;o<=22232;o++)n[o]=0;for(o=22234;o<=22236;o++)n[o]=0;for(o=22243;o<=22250;o++)n[o]=0;for(o=22262;o<=22265;o++)n[o]=0;for(o=22307;o<=22322;o++)n[o]=0;for(o=22348;o<=22357;o++)n[o]=0;for(o=22407;o<=22422;o++)n[o]=0;for(o=22462;o<=22465;o++)n[o]=0;for(o=22521;o<=22525;o++)n[o]=0;for(o=22607;o<=22622;o++)n[o]=0;for(o=22641;o<=22646;o++)n[o]=0;for(o=22648;o<=22657;o++)n[o]=0;for(o=22707;o<=22722;o++)n[o]=0;for(o=22762;o<=22765;o++)n[o]=0;for(o=22807;o<=22822;o++)n[o]=0;for(o=22991;o<=22994;o++)n[o]=0;for(o=23028;o<=23038;o++)n[o]=0;for(o=23301;o<=23333;o++)n[o]=2;for(o=23830;o<=23853;o++)n[o]=0;for(o=23866;o<=23872;o++)n[o]=0;for(o=23877;o<=23884;o++)n[o]=0;for(o=23886;o<=23894;o++)n[o]=0;for(o=23946;o<=23948;o++)n[o]=0;for(o=24311;o<=24313;o++)n[o]=0;for(o=24342;o<=24347;o++)n[o]=0;for(o=24370;o<=24374;o++)n[o]=10;for(o=24375;o<=24381;o++)n[o]=0;for(o=24718;o<=24721;o++)n[o]=0;for(o=24817;o<=24821;o++)n[o]=0;for(o=24877;o<=24882;o++)n[o]=0;for(o=24891;o<=24893;o++)n[o]=0;for(o=25391;o<=25395;o++)n[o]=0;for(o=25828;o<=25838;o++)n[o]=0;for(o=26191;o<=26195;o++)n[o]=0;for(o=26391;o<=26393;o++)n[o]=0;for(o=26701;o<=26722;o++)n[o]=0;for(o=26729;o<=26799;o++)n[o]=2;for(o=26801;o<=26803;o++)n[o]=2;for(o=26811;o<=26813;o++)n[o]=2;for(o=26847;o<=26870;o++)n[o]=2;for(o=26891;o<=26899;o++)n[o]=0;for(o=26901;o<=26923;o++)n[o]=0;for(o=26929;o<=26946;o++)n[o]=0;for(o=26948;o<=26998;o++)n[o]=0;for(o=27037;o<=27040;o++)n[o]=0;for(o=27205;o<=27232;o++)n[o]=0;for(o=27258;o<=27260;o++)n[o]=0;for(o=27391;o<=27398;o++)n[o]=0;for(o=27561;o<=27564;o++)n[o]=0;for(o=27571;o<=27574;o++)n[o]=0;for(o=27581;o<=27584;o++)n[o]=0;for(o=27591;o<=27594;o++)n[o]=0;for(o=27700;o<=27707;o++)n[o]=0;for(o=28191;o<=28193;o++)n[o]=0;for(o=28348;o<=28358;o++)n[o]=0;for(o=28402;o<=28432;o++)n[o]=0;for(o=28462;o<=28492;o++)n[o]=0;for(o=29118;o<=29122;o++)n[o]=0;for(o=29168;o<=29172;o++)n[o]=0;for(o=29177;o<=29185;o++)n[o]=0;for(o=29187;o<=29195;o++)n[o]=0;for(o=29900;o<=29903;o++)n[o]=0;for(o=30161;o<=30179;o++)n[o]=0;for(o=30491;o<=30494;o++)n[o]=0;for(o=30729;o<=30732;o++)n[o]=0;for(o=31251;o<=31259;o++)n[o]=0;for(o=31265;o<=31268;o++)n[o]=0;for(o=31275;o<=31279;o++)n[o]=0;for(o=31281;o<=31297;o++)n[o]=0;for(o=31461;o<=31469;o++)n[o]=0;for(o=31491;o<=31495;o++)n[o]=0;for(o=31917;o<=31922;o++)n[o]=0;for(o=31965;o<=32e3;o++)n[o]=0;for(o=32001;o<=32003;o++)n[o]=2;for(o=32005;o<=32031;o++)n[o]=2;for(o=32033;o<=32060;o++)n[o]=2;for(o=32064;o<=32067;o++)n[o]=2;for(o=32074;o<=32077;o++)n[o]=2;for(o=32081;o<=32086;o++)n[o]=0;for(o=32107;o<=32130;o++)n[o]=0;for(o=32133;o<=32159;o++)n[o]=0;for(o=32164;o<=32167;o++)n[o]=2;for(o=32180;o<=32199;o++)n[o]=0;for(o=32201;o<=32260;o++)n[o]=0;for(o=32301;o<=32360;o++)n[o]=0;for(o=32401;o<=32460;o++)n[o]=0;for(o=32501;o<=32560;o++)n[o]=0;for(o=32601;o<=32662;o++)n[o]=0;for(o=32664;o<=32667;o++)n[o]=2;for(o=32701;o<=32761;o++)n[o]=0;for(o=53001;o<=53004;o++)n[o]=0;for(o=53008;o<=53019;o++)n[o]=0;for(o=53021;o<=53032;o++)n[o]=0;for(o=53034;o<=53037;o++)n[o]=0;for(o=53042;o<=53046;o++)n[o]=0;for(o=53074;o<=53080;o++)n[o]=0;for(o=54001;o<=54004;o++)n[o]=0;for(o=54008;o<=54019;o++)n[o]=0;for(o=54021;o<=54032;o++)n[o]=0;for(o=54034;o<=54037;o++)n[o]=0;for(o=54042;o<=54046;o++)n[o]=0;for(o=54048;o<=54053;o++)n[o]=0;for(o=54074;o<=54080;o++)n[o]=0;for(o=54090;o<=54096;o++)n[o]=0;for(o=54098;o<=54101;o++)n[o]=0;for(o=65161;o<=65163;o++)n[o]=0;for(o=102001;o<=102040;o++)n[o]=0;for(o=102042;o<=102063;o++)n[o]=0;for(o=102065;o<=102067;o++)n[o]=0;for(o=102070;o<=102117;o++)n[o]=0;for(o=102122;o<=102216;o++)n[o]=0;for(o=102221;o<=102377;o++)n[o]=0;for(o=102382;o<=102388;o++)n[o]=0;for(o=102389;o<=102398;o++)n[o]=2;for(o=102399;o<=102444;o++)n[o]=0;for(o=102445;o<=102447;o++)n[o]=2;for(o=102448;o<=102458;o++)n[o]=0;for(o=102459;o<=102468;o++)n[o]=2;for(o=102469;o<=102499;o++)n[o]=0;for(o=102500;o<=102519;o++)n[o]=1;for(o=102520;o<=102524;o++)n[o]=0;for(o=102525;o<=102529;o++)n[o]=2;for(o=102530;o<=102588;o++)n[o]=0;for(o=102590;o<=102598;o++)n[o]=0;for(o=102601;o<=102603;o++)n[o]=0;for(o=102605;o<=102628;o++)n[o]=0;for(o=102629;o<=102646;o++)n[o]=2;for(o=102648;o<=102700;o++)n[o]=2;for(o=102701;o<=102703;o++)n[o]=0;for(o=102707;o<=102730;o++)n[o]=2;for(o=102733;o<=102758;o++)n[o]=2;for(o=102767;o<=102900;o++)n[o]=0;for(o=102901;o<=102933;o++)n[o]=2;for(o=102934;o<=102950;o++)n[o]=13;for(o=102951;o<=102963;o++)n[o]=0;for(o=102965;o<=102969;o++)n[o]=0;for(o=102971;o<=102973;o++)n[o]=0;for(o=102975;o<=102989;o++)n[o]=0;for(o=102990;o<=102992;o++)n[o]=1;for(o=102997;o<=103002;o++)n[o]=0;for(o=103003;o<=103008;o++)n[o]=2;for(o=103009;o<=103011;o++)n[o]=0;for(o=103012;o<=103014;o++)n[o]=2;for(o=103019;o<=103021;o++)n[o]=0;for(o=103022;o<=103024;o++)n[o]=2;for(o=103029;o<=103031;o++)n[o]=0;for(o=103032;o<=103034;o++)n[o]=2;for(o=103065;o<=103068;o++)n[o]=0;for(o=103074;o<=103076;o++)n[o]=0;for(o=103077;o<=103079;o++)n[o]=1;for(o=103080;o<=103082;o++)n[o]=0;for(o=103083;o<=103085;o++)n[o]=2;for(o=103090;o<=103093;o++)n[o]=0;for(o=103097;o<=103099;o++)n[o]=0;for(o=103100;o<=103102;o++)n[o]=2;for(o=103107;o<=103109;o++)n[o]=0;for(o=103110;o<=103112;o++)n[o]=2;for(o=103113;o<=103116;o++)n[o]=0;for(o=103117;o<=103120;o++)n[o]=2;for(o=103153;o<=103157;o++)n[o]=0;for(o=103158;o<=103162;o++)n[o]=2;for(o=103163;o<=103165;o++)n[o]=0;for(o=103166;o<=103168;o++)n[o]=1;for(o=103169;o<=103171;o++)n[o]=2;for(o=103186;o<=103188;o++)n[o]=0;for(o=103189;o<=103191;o++)n[o]=2;for(o=103192;o<=103195;o++)n[o]=0;for(o=103196;o<=103199;o++)n[o]=2;for(o=103200;o<=103224;o++)n[o]=0;for(o=103225;o<=103227;o++)n[o]=1;for(o=103232;o<=103237;o++)n[o]=0;for(o=103238;o<=103243;o++)n[o]=2;for(o=103244;o<=103246;o++)n[o]=0;for(o=103247;o<=103249;o++)n[o]=2;for(o=103254;o<=103256;o++)n[o]=0;for(o=103257;o<=103259;o++)n[o]=2;for(o=103264;o<=103266;o++)n[o]=0;for(o=103267;o<=103269;o++)n[o]=2;for(o=103300;o<=103375;o++)n[o]=0;for(o=103381;o<=103383;o++)n[o]=0;for(o=103384;o<=103386;o++)n[o]=1;for(o=103387;o<=103389;o++)n[o]=0;for(o=103390;o<=103392;o++)n[o]=2;for(o=103397;o<=103399;o++)n[o]=0;for(o=103400;o<=103471;o++)n[o]=2;for(o=103476;o<=103478;o++)n[o]=0;for(o=103479;o<=103481;o++)n[o]=2;for(o=103486;o<=103488;o++)n[o]=0;for(o=103489;o<=103491;o++)n[o]=2;for(o=103492;o<=103495;o++)n[o]=0;for(o=103496;o<=103499;o++)n[o]=2;for(o=103528;o<=103543;o++)n[o]=0;for(o=103544;o<=103548;o++)n[o]=2;for(o=103549;o<=103551;o++)n[o]=0;for(o=103552;o<=103554;o++)n[o]=1;for(o=103555;o<=103557;o++)n[o]=2;for(o=103558;o<=103560;o++)n[o]=0;for(o=103571;o<=103573;o++)n[o]=0;for(o=103574;o<=103576;o++)n[o]=2;for(o=103577;o<=103580;o++)n[o]=0;for(o=103581;o<=103583;o++)n[o]=2;for(o=103595;o<=103694;o++)n[o]=0;for(o=103696;o<=103699;o++)n[o]=0;for(o=103700;o<=103793;o++)n[o]=2;for(o=103794;o<=103890;o++)n[o]=0;for(o=103891;o<=103896;o++)n[o]=2;for(o=103900;o<=103971;o++)n[o]=2;for(o=103972;o<=103977;o++)n[o]=0;for(o=112e3;o<=112101;o++)n[o]=0},34727:(e,t,r)=>{r.d(t,{$8:()=>m,Cc:()=>s,Hx:()=>p,Io:()=>y,KJ:()=>_,Sp:()=>l,XM:()=>u,YN:()=>c,ZH:()=>d,b6:()=>M,cU:()=>n,gg:()=>P,hs:()=>a,kU:()=>f,or:()=>A,pF:()=>R,pq:()=>U,qE:()=>i});const o=new Float32Array(1);function n(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function i(e,t,r){return Math.min(Math.max(e,t),r)}function s(e,t,r){return e+(t-e)*r}function a(e,t,r,o,n){return s(o,n,(e-t)/(r-t))}function f(e){return e*Math.PI/180}function _(e){return 180*e/Math.PI}function u(e){return Math.acos(i(e,-1,1))}function c(e){return Math.asin(i(e,-1,1))}function l(e,t,r=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=r}function P(e,t,r=1e-6){return!l(e,t,r)&&e>t}function d(e,t,r=1e-6){return!l(e,t,r)&&e<t}function p(e,t,r=1e-6){return l(e,t,r)||e>t}const E=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(e){return E.setFloat64(0,e),E.getBigInt64(0)}const S=1000000n,T=h(1);function h(e){const t=g(e=Math.abs(e)),r=function(e){return E.setBigInt64(0,e),E.getFloat64(0)}(t<=S?S:t-S);return Math.abs(e-r)}function y(e,t,r=T){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;if(null!=r&&h(Math.min(Math.abs(e),Math.abs(t)))<r)return Math.abs(e-t)<=r;const o=g(e),n=g(t);return o<0==n<0&&!((o<n?n-o:o-n)>S)}function M(e,t,r=1e-6){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;const o=Math.abs(e-t),n=Math.abs(e),i=Math.abs(t);if(0===e||0===t||n<1e-12&&i<1e-12){if(o>.01*r)return!1}else if(o/(n+i)>r)return!1;return!0}function m(e){return O(Math.max(-U,Math.min(e,U)))}function O(e){return o[0]=e,o[0]}function A(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],o=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(l(t,1)&&l(r,1)&&l(o,1))}const U=O(34028234663852886e22);function R(e,t,r){if(void 0===r||0===+r)return Math[e](t);if(t=+t,r=+r,isNaN(t)||"number"!=typeof r||r%1!=0)return NaN;let o=t.toString().split("e");return o=(t=Math[e](+(o[0]+"e"+(o[1]?+o[1]-r:-r)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+r:r))}},43937:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(10107);function n(e,t,r){let n,i;return void 0===t?(i=e,n=[void 0]):"string"!=typeof t?(i=e,n=[void 0],r=t):(i=t,n=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;for(const a of n){const n=(0,o.rM)(e,a,i);n.write&&"object"==typeof n.write||(n.write={}),r&&(n.write.target=r),n.write.writer=s[t]}}}},73941:(e,t,r)=>{r.d(t,{FY:()=>a,LJ:()=>f,Ro:()=>_,fv:()=>s,jA:()=>d,tO:()=>l,xP:()=>p,y7:()=>P});var o=r(79258),n=r(21325);function i(e){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const s=i(o.$O),a=i(o.sH),f=i(o.Sw),_={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${o.$O.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},u=a.wkt.toUpperCase(),c=f.wkt.toUpperCase();function l(e){if(null!=e&&(0,n.fn)(e)){const t=e.wkid,r=e.wkt2??e.wkt;if((0,n.tl)(t))return o.sH;const i=r?.toUpperCase();if(r&&i===u)return o.sH;if((0,n.ZL)(t)||i&&i===c)return o.Sw}return o.$O}function P(e){return(0,n.tl)(e)?o.sH:(0,n.ZL)(e)?o.Sw:o.$O}function d(e){return(0,n.aI)(e,s)}function p(e){return d(e)||(0,n.aI)(e,a)||(0,n.aI)(e,f)}Math.cos(Math.PI/16/16)},79258:(e,t,r)=>{r.d(t,{$O:()=>n,Sw:()=>s,sH:()=>i});class o{constructor(e,t,r,o,n,i){this.semiMajorAxis=e,this.flattening=t,this.outerAtmosphereRimWidth=r,this.atmosphereHeight=o,this.scaleHeight=n;const s=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*s,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=i||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}}const n=new o(6378137,1/298.257223563,3e5,1e5,.085,.006694379990137799),i=new o(3396190,1/169.8944472236118,23e4,6e4,.111),s=new o(1737400,0,0,0,0)},83047:(e,t,r)=>{r.d(t,{Ao:()=>k,B5:()=>b,G9:()=>R,GA:()=>N,Ij:()=>I,KX:()=>C,LA:()=>U,PQ:()=>m,Sk:()=>L,UW:()=>O,b$:()=>Y,dk:()=>x,dy:()=>f,k1:()=>G,oU:()=>M,vl:()=>A,x1:()=>F,yD:()=>P}),r(44208);var o=r(66552),n=r(73941),i=r(79258),s=r(21325),a=r(22530);const f=39.37,_=i.$O.radius*Math.PI/200,u=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,c=a.A,l=/UNIT\[([^\]]+)]/i,P=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),d=(0,o.O)()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),p=e=>e*e,E=e=>e*e*e,g={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:p(.001)},"square-centimeters":{inBaseUnits:p(.01)},"square-decimeters":{inBaseUnits:p(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:p(1e3)},"square-inches":{inBaseUnits:p(.0254)},"square-feet":{inBaseUnits:p(.3048)},"square-yards":{inBaseUnits:p(.9144)},"square-miles":{inBaseUnits:p(1609.344)},"square-nautical-miles":{inBaseUnits:p(1852)},"square-us-feet":{inBaseUnits:p(1200/3937)},acres:{inBaseUnits:.0015625*p(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*E(.001)},"cubic-centimeters":{inBaseUnits:1e3*E(.01)},"cubic-decimeters":{inBaseUnits:1e3*E(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*E(1e3)},"cubic-inches":{inBaseUnits:1e3*E(.0254)},"cubic-feet":{inBaseUnits:1e3*E(.3048)},"cubic-yards":{inBaseUnits:1e3*E(.9144)},"cubic-miles":{inBaseUnits:1e3*E(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},S=(()=>{const e={};for(const t in g)for(const r in g[t].units)e[r]=t;return e})(),T=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function h(e){const t=S[e];if(!t)throw new Error("unknown type");return t}function y(e,t=null){return t=t||h(e),g[t].baseUnit===e}function M(e,t,r){if(t===r)return e;const o=h(t);if(o!==h(r))throw new Error("incompatible units");const n=y(t,o)?e:function(e,t,r){return e*g[r].units[t].inBaseUnits}(e,t,o);return y(r,o)?n:function(e,t,r){return e/g[r].units[t].inBaseUnits}(n,r,o)}function m(e,t,r,o=!1){if(!o&&(0,s.EA)(t))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=I(t);return n!==r&&(e=n?M(e,n,r):M(e*=N(t),"meters",r)),e}function O(e,t,r,o=!1){if(!o&&(0,s.EA)(r))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=I(r);return t!==n&&(e=n?M(e,t,n):M(e,t,"meters")/N(r)),e}function A(e,t,r){return M(e,t,"meters")/(r*Math.PI/180)}function U(e){return d.fromJSON(e.toLowerCase())||null}function R(e){if(null!=e&&!(0,s.B3)(e))return 1;const t=N(e);return t>1e5?1:t}function G(e){return N(e)>=(0,n.tO)(e).metersPerDegree?"meters":I(e)}function N(e,t=i.$O.metersPerDegree){return k(e,!0)??t}function k(e,t=!1){const r=e?.wkid??null,o=e?.wkt2??e?.wkt??null;let n=null;if(r){if((0,s.tl)(r))return i.sH.metersPerDegree;if((0,s.ZL)(r))return i.Sw.metersPerDegree;n=c.values[c[r]],!n&&t&&P.has(r)&&(n=_)}else o&&(F(o)?n=w(u.exec(o),n):B(o)&&(n=w(l.exec(o),n)));return n}function C(e){return(0,s.EA)(e)?1:N(e)}function w(e,t){return e?.[1]?D(e[1]):t}function D(e){return parseFloat(e.split(",")[1])}function I(e){const t=e?.wkid??null,r=e?.wkt2??e?.wkt??null;let o=null;if(t)o=c.units[c[t]];else if(r){const e=F(r)?u:B(r)?l:null;if(e){const t=e.exec(r);t?.[1]&&(o=function(e){const t=/[\\"']([^\\"']+)/.exec(e);let r=t?.[1];if(!r||!U(r)){const t=D(e);r=null;const o=c.values;for(let e=0;e<o.length;++e)if(Math.abs(t-o[e])<W){r=c.units[e];break}}return r}(t[1]))}}return null!=o?U(o):null}function b(e){const t=I(e);return null==t?null:T.get(t)}function B(e){return/^GEOCCS/i.test(e)}function F(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const W=1e-7,x=(0,o.O)()({esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"}),L=(0,o.O)()({esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"}),Y=(0,o.O)()({esriDUDecimalDegrees:"degrees",esriDURadians:"radians"})},83290:(e,t,r)=>{r.d(t,{P:()=>p,a:()=>u,g:()=>N,h:()=>_,i:()=>a,j:()=>h,l:()=>f,p:()=>B});var o=r(2741),n=r(44208);let i,s=null;function a(){return!!s}function f(){return i||(i=r.e(6187).then(r.bind(r,46187)).then(({default:e})=>e({locateFile:e=>(0,o.s)(`esri/geometry/support/${e}`)})).then(e=>{C(e)}),i)}const _={geogToProj(e,t,r){s.ensureCache.prepare();const o=I(r),n=r===o,i=s.ensureFloat64(o),a=s._pe_geog_to_proj(s.getPointer(e),t,i);return a&&b(r,t,i,n),a},projGeog(e,t,r,o){switch(o){case u.PE_TRANSFORM_P_TO_G:return _.projToGeog(e,t,r);case u.PE_TRANSFORM_G_TO_P:return _.geogToProj(e,t,r)}return 0},projToGeog:(e,t,r)=>_.projToGeogCenter(e,t,r,0),projToGeogCenter(e,t,r,o){s.ensureCache.prepare();const n=I(r),i=r===n,a=s.ensureFloat64(n),f=s._pe_proj_to_geog_center(s.getPointer(e),t,a,o);return f&&b(r,t,a,i),f}};class u{static init(){u.PE_BUFFER_MAX=s.PeDefs.prototype.PE_BUFFER_MAX,u.PE_NAME_MAX=s.PeDefs.prototype.PE_NAME_MAX,u.PE_MGRS_MAX=s.PeDefs.prototype.PE_MGRS_MAX,u.PE_USNG_MAX=s.PeDefs.prototype.PE_USNG_MAX,u.PE_DD_MAX=s.PeDefs.prototype.PE_DD_MAX,u.PE_DDM_MAX=s.PeDefs.prototype.PE_DDM_MAX,u.PE_DMS_MAX=s.PeDefs.prototype.PE_DMS_MAX,u.PE_UTM_MAX=s.PeDefs.prototype.PE_UTM_MAX,u.PE_PARM_MAX=s.PeDefs.prototype.PE_PARM_MAX,u.PE_TYPE_NONE=s.PeDefs.prototype.PE_TYPE_NONE,u.PE_TYPE_GEOGCS=s.PeDefs.prototype.PE_TYPE_GEOGCS,u.PE_TYPE_PROJCS=s.PeDefs.prototype.PE_TYPE_PROJCS,u.PE_TYPE_GEOGTRAN=s.PeDefs.prototype.PE_TYPE_GEOGTRAN,u.PE_TYPE_COORDSYS=s.PeDefs.prototype.PE_TYPE_COORDSYS,u.PE_TYPE_UNIT=s.PeDefs.prototype.PE_TYPE_UNIT,u.PE_TYPE_LINUNIT=s.PeDefs.prototype.PE_TYPE_LINUNIT,u.PE_STR_OPTS_NONE=s.PeDefs.prototype.PE_STR_OPTS_NONE,u.PE_STR_AUTH_NONE=s.PeDefs.prototype.PE_STR_AUTH_NONE,u.PE_STR_AUTH_TOP=s.PeDefs.prototype.PE_STR_AUTH_TOP,u.PE_STR_NAME_CANON=s.PeDefs.prototype.PE_STR_NAME_CANON,u.PE_STR_FMT_WKT=s.PeDefs.prototype.PE_STR_FMT_WKT,u.PE_STR_FMT_WKT2=s.PeDefs.prototype.PE_STR_FMT_WKT2,u.PE_PARM_X0=s.PeDefs.prototype.PE_PARM_X0,u.PE_PARM_ND=s.PeDefs.prototype.PE_PARM_ND,u.PE_TRANSFORM_1_TO_2=s.PeDefs.prototype.PE_TRANSFORM_1_TO_2,u.PE_TRANSFORM_2_TO_1=s.PeDefs.prototype.PE_TRANSFORM_2_TO_1,u.PE_TRANSFORM_P_TO_G=s.PeDefs.prototype.PE_TRANSFORM_P_TO_G,u.PE_TRANSFORM_G_TO_P=s.PeDefs.prototype.PE_TRANSFORM_G_TO_P,u.PE_HORIZON_RECT=s.PeDefs.prototype.PE_HORIZON_RECT,u.PE_HORIZON_POLY=s.PeDefs.prototype.PE_HORIZON_POLY,u.PE_HORIZON_LINE=s.PeDefs.prototype.PE_HORIZON_LINE,u.PE_HORIZON_DELTA=s.PeDefs.prototype.PE_HORIZON_DELTA}}let c=null;const l={},P={},d=e=>{const t=e.getType();switch(t){case u.PE_TYPE_GEOGCS:e=s.castObject(e,s.PeGeogcs);break;case u.PE_TYPE_PROJCS:e=s.castObject(e,s.PeProjcs);break;case u.PE_TYPE_GEOGTRAN:e=s.castObject(e,s.PeGeogtran);break;default:t&u.PE_TYPE_UNIT&&(e=s.castObject(e,s.PeUnit))}return e},p={initialize(){s.PeFactory.prototype.initialize(null)},coordsys:e=>p.factoryByType(u.PE_TYPE_COORDSYS,e),factoryByType(e,t){let r=null,o=l[e];if(o||(o={},l[e]=o),o.hasOwnProperty(String(t))&&(r=o[t],s.compare(r,s.NULL)&&(r=null)),!r){const n=s.PeFactory.prototype.factoryByType(e,t);s.compare(n,s.NULL)||(r=d(n),o[t]=r)}return r},fromString(e,t){let r=null,o=P[e];if(o||(o={},P[e]=o),o.hasOwnProperty(t)&&(r=o[t],s.compare(r,s.NULL)&&(r=null)),!r){const n=s.PeFactory.prototype.fromString(e,t);s.compare(n,s.NULL)||(r=d(n),o[t]=r)}return r},geogcs:e=>p.factoryByType(u.PE_TYPE_GEOGCS,e),geogtran:e=>p.factoryByType(u.PE_TYPE_GEOGTRAN,e),getCode:e=>s.PeFactory.prototype.getCode(e),projcs:e=>p.factoryByType(u.PE_TYPE_PROJCS,e),unit:e=>p.factoryByType(u.PE_TYPE_UNIT,e)};let E,g=null;const S={PE_GTLIST_OPTS_COMMON:0,init(){S.PE_GTLIST_OPTS_COMMON=s.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,E=s._pe_getPeGTlistExtendedEntrySize()},getGTlist(e,t,r,o,n,i){let a=null;const f=new s.PeInteger(i);try{const _=s.PeGTlistExtended.prototype.getGTlist(e,t,r,o,n,f);if((i=f.val)&&(a=[_],i>1)){const e=s.getPointer(_);for(let t=1;t<i;t++)a.push(s.wrapPointer(e+E*t,s.PeGTlistExtendedEntry))}}finally{s.destroy(f)}return a}},T={destroy(e){if(e?.length){for(const t of e)w(t),t.getEntries().forEach(e=>{w(e);const t=e.getGeogtran();w(t),t.getParameters().forEach(w),[t.getGeogcs1(),t.getGeogcs2()].forEach(e=>{w(e);const t=e.getDatum();w(t),w(t.getSpheroid()),w(e.getPrimem()),w(e.getUnit())})});s.PeGTlistExtendedEntry.prototype.Delete(e[0])}}},h={geogToGeog(e,t,r,o,n){s.ensureCache.prepare();const i=I(r),a=r===i,f=s.ensureFloat64(i);let _=0;o&&(_=s.ensureFloat64(o));const u=s._pe_geog_to_geog(s.getPointer(e),t,f,_,n);return u&&b(r,t,f,a),u}},y={geodesicCoordinate(e,t,r,o,n,i,a,f){s.PeLineType.prototype.geodesic_coordinate(e,t,r,o,n,i,a,f)},geodeticCoordinate(e,t,r,o,n,i,a,f,_){s.PeLineType.prototype.geodetic_coordinate(e,t,r,o,n,i,a,f,_)},geodeticDistance(e,t,r,o,n,i,a,f,_,u){s.PeLineType.prototype.geodetic_distance(e,t,r,o,n,i,a,f,_,u)},greatEllipticDistance(e,t,r,o,n,i,a,f,_){s.PeLineType.prototype.great_elliptic_distance(e,t,r,o,n,i,a,f,_)}},M={phiToEta:(e,t)=>s.PeMath.prototype.phi_to_eta(e,t),etaToPhi:(e,t)=>s.PeMath.prototype.eta_to_phi(e,t),phiToPhig:(e,t)=>s.PeMath.prototype.phi_to_phig(e,t),q:(e,t,r)=>s.PeMath.prototype.q(e,t,r),q90:(e,t)=>s.PeMath.prototype.q90(e,t)},m=(e,t,r,o,n,i)=>{let a,f;switch(s.ensureCache.prepare(),e){case"dd":a=s._pe_geog_to_dd,f=u.PE_DD_MAX;break;case"ddm":a=s._pe_geog_to_ddm,f=u.PE_DDM_MAX;break;case"dms":a=s._pe_geog_to_dms,f=u.PE_DMS_MAX}let _=0;t&&(_=s.getPointer(t));const c=I(o),l=s.ensureFloat64(c),P=D(r,f),d=a(_,r,l,n,s.ensureInt32(P));if(d)for(let e=0;e<r;e++)i[e]=s.UTF8ToString(P[e]);return d},O=(e,t,r,o,n)=>{let i;switch(s.ensureCache.prepare(),e){case"dd":i=s._pe_dd_to_geog;break;case"ddm":i=s._pe_ddm_to_geog;break;case"dms":i=s._pe_dms_to_geog}let a=0;t&&(a=s.getPointer(t));const f=o.map(e=>s.ensureString(e)),_=s.ensureInt32(f),u=s.ensureFloat64(new Array(2*r)),c=i(a,r,_,u);return c&&b(n,r,u),c},A={geogToDms:(e,t,r,o,n)=>m("dms",e,t,r,o,n),dmsToGeog:(e,t,r,o)=>O("dms",e,t,r,o),geogToDdm:(e,t,r,o,n)=>m("ddm",e,t,r,o,n),ddmToGeog:(e,t,r,o)=>O("ddm",e,t,r,o),geogToDd:(e,t,r,o,n)=>m("dd",e,t,r,o,n),ddToGeog:(e,t,r,o)=>O("dd",e,t,r,o)};class U{static init(){U.PE_MGRS_STYLE_NEW=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,U.PE_MGRS_STYLE_OLD=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,U.PE_MGRS_STYLE_AUTO=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,U.PE_MGRS_180_ZONE_1_PLUS=s.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,U.PE_MGRS_ADD_SPACES=s.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}static geogToMgrsExtended(e,t,r,o,n,i,a){s.ensureCache.prepare();let f=0;e&&(f=s.getPointer(e));const _=I(r),c=s.ensureFloat64(_),l=D(t,u.PE_MGRS_MAX),P=s.ensureInt32(l),d=s._pe_geog_to_mgrs_extended(f,t,c,o,n,i,P);if(d)for(let e=0;e<t;e++)a[e]=s.UTF8ToString(l[e]);return d}static mgrsToGeogExtended(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=r.map(e=>s.ensureString(e)),f=s.ensureInt32(a),_=s.ensureFloat64(new Array(2*t)),u=s._pe_mgrs_to_geog_extended(i,t,f,o,_);return u&&b(n,t,_),u}}const R={geogToUsng(e,t,r,o,n,i,a){s.ensureCache.prepare();let f=0;e&&(f=s.getPointer(e));const _=I(r),c=s.ensureFloat64(_),l=D(t,u.PE_MGRS_MAX),P=s.ensureInt32(l),d=s._pe_geog_to_usng(f,t,c,o,n,i,P);if(d)for(let e=0;e<t;e++)a[e]=s.UTF8ToString(l[e]);return d},usngToGeog(e,t,r,o){s.ensureCache.prepare();let n=0;e&&(n=s.getPointer(e));const i=r.map(e=>s.ensureString(e)),a=s.ensureInt32(i),f=s.ensureFloat64(new Array(2*t)),_=s._pe_usng_to_geog(n,t,a,f);return _&&b(o,t,f),_}};class G{static init(){G.PE_UTM_OPTS_NONE=s.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,G.PE_UTM_OPTS_ADD_SPACES=s.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,G.PE_UTM_OPTS_NS=s.PeNotationUtm.prototype.PE_UTM_OPTS_NS}static geogToUtm(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=I(r),f=s.ensureFloat64(a),_=D(t,u.PE_UTM_MAX),c=s.ensureInt32(_),l=s._pe_geog_to_utm(i,t,f,o,c);if(l)for(let e=0;e<t;e++)n[e]=s.UTF8ToString(_[e]);return l}static utmToGeog(e,t,r,o,n){s.ensureCache.prepare();let i=0;e&&(i=s.getPointer(e));const a=r.map(e=>s.ensureString(e)),f=s.ensureInt32(a),_=s.ensureFloat64(new Array(2*t)),u=s._pe_utm_to_geog(i,t,f,o,_);return u&&b(n,t,_),u}}class N{static{this.cache=new Map}static init(){N.PE_PCSINFO_OPTION_NONE=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,N.PE_PCSINFO_OPTION_DOMAIN=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,N.PE_POLE_OUTSIDE_BOUNDARY=s.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,N.PE_POLE_POINT=s.PePCSInfo.prototype.PE_POLE_POINT}static generate(e,t=N.PE_PCSINFO_OPTION_DOMAIN){let r=null,o=null;return N.cache.has(e)&&(o=N.cache.get(e),o[t]&&(r=o[t])),r||(r=s.PePCSInfo.prototype.generate(e,t),o||(o=[],N.cache.set(e,o)),o[t]=r),r}}const k={versionString:()=>s.PeVersion.prototype.version_string()};function C(e){function t(e,t,r){e[t]=r(e[t])}s=e,u.init(),S.init(),U.init(),G.init(),N.init(),c=class extends s.PeDouble{constructor(e=NaN){super(e)}destroy(){s.destroy(this)}[Symbol.dispose](){this.destroy()}},g=class extends s.PeGCSExtent{destroy(){s.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[s.PeAngunit,s.PeDatum,s.PeGeogcs,s.PeGeogtran,s.PeObject,s.PeParameter,s.PePrimem,s.PeProjcs,s.PeSpheroid,s.PeUnit];for(const e of r)t(e.prototype,"getName",e=>function(){return e.call(this,new Array(u.PE_NAME_MAX))});for(const e of[s.PeGeogtran,s.PeProjcs])t(e.prototype,"getParameters",e=>function(){const t=new Array(u.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const o=s.getValue(r,"*");t[e]=o?s.wrapPointer(o,s.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t});t(s.PeHorizon.prototype,"getCoord",e=>function(t=!1){const r=this.getSize();if(!r)return null;const o=[];return b(o,r,e.call(this),t),o}),t(s.PeGTlistExtendedEntry.prototype,"getEntries",e=>{const t=s._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const o=e.call(this);if(!s.compare(o,s.NULL)){r=[o];const e=this.getSteps();if(e>1){const n=s.getPointer(o);for(let o=1;o<e;o++)r.push(s.wrapPointer(n+t*o,s.PeGTlistExtendedGTs))}}return r}});const o=s._pe_getPeHorizonSize(),n=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const n=e.call(this);if(!s.compare(n,s.NULL)){r=[n];const e=n.getNump();if(e>1){const t=s.getPointer(n);for(let n=1;n<e;n++)r.push(s.wrapPointer(t+o*n,s.PeHorizon))}}return t.set(e,r),r};t(s.PeProjcs.prototype,"horizonGcsGenerate",n),t(s.PeProjcs.prototype,"horizonPcsGenerate",n),s.PeObject.prototype.toString=function(e=u.PE_STR_OPTS_NONE){s.ensureCache.prepare();const t=s.getPointer(this),r=s.ensureInt8(new Array(u.PE_BUFFER_MAX));return s.UTF8ToString(s._pe_object_to_string_ext(t,e,r))},s.PeGeogcs.prototype.destroy=function(){this.Delete(),w(this),this.ptr=0},s.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},s.PeProjcs.prototype.destroy=function(){this.Delete(),w(this),this.ptr=0},s.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function w(e){if(!e)return;const t=s.getClass(e);if(!t)return;const r=s.getCache(t);if(!r)return;const o=s.getPointer(e);o&&delete r[o]}function D(e,t){const r=[],o=new Array(t);for(let t=0;t<e;t++)r.push(s.ensureInt8(o));return r}function I(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function b(e,t,r,o=!1){if(o)for(let o=0;o<2*t;o++)e[o]=s.getValue(r+o*Float64Array.BYTES_PER_ELEMENT,"double");else{const o=0===e.length;for(let n=0;n<t;n++)o&&(e[n]=new Array(2)),e[n][0]=s.getValue(r,"double"),e[n][1]=s.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}const B=Object.freeze(Object.defineProperty({__proto__:null,PeCSTransformations:_,PeDefs:u,get PeDouble(){return c},PeFactory:p,get PeGCSExtent(){return g},PeGTTransformations:h,PeGTlistExtended:S,PeGTlistExtendedEntry:T,PeLineType:y,PeMath:M,PeNotationDms:A,PeNotationMgrs:U,PeNotationUsng:R,PeNotationUtm:G,PePCSInfo:N,PeVersion:k,_init:C,get _pe(){return s},isLoaded:a,isSupported:function(){return!!(0,n.A)("esri-wasm")},load:f},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4841],{6557:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var i=s(31635),r=s(21818),n=s(49186),o=s(97768),a=s(563),u=s(16930),h=s(70328),l=s(56390),c=s(8384),d=s(95466),f=s(30524),m=s(70581),_=s(30661),y=s(28923),g=s(44320),p=s(35258),z=s(16630);const x=new _.Z,w=8e3;class b{constructor(){this._files=[],this._queue=new a.QueueProcessor({concurrency:1,process:(e,t)=>this._executeQuery(e,t)})}async load(e){this.setCustomParameters(e.customParameters),this._files=await Promise.all(e.urls.map(t=>(0,m.DV)(t,{geometryInfo:e.geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters}))),this._metadata=p.i.createFeature(e.metadata),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:e.geometryInfo?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:u.A.fromJSON(e.geometryInfo?.spatialReference),aggregateAdapter:null,timeInfo:null,definitionExpression:null};const t=this._files[0];if(!t)return{extent:null};const{fields:s,timeZoneByFieldName:r}=e.metadata.fieldsIndex,n=s.map(e=>({...e,column:t.columnForFieldName(e.name)})),o=d.A.fromJSON({fields:n,timeZoneByFieldName:r});if(this._fieldsIndex=o,e.metadata.spatialReference&&(this._fullExtent=function(e,t){const s=(0,h.hZ)((0,h.vt)(),h.qv);for(const t of e){const e=(0,m.hD)(t);if(!e)return null;const i=e.columns[e.primary_column];if(!i.bbox)return null;const r=S(i.bbox);(0,h.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:t}}(this._files,e.metadata.spatialReference)),null==this._fullExtent&&"location"===e.geometryInfo?.encoding.type){const{latitudeFieldName:t,longitudeFieldName:s}=e.geometryInfo.encoding,r=this._fieldsIndex.get(t)?.column,n=this._fieldsIndex.get(s)?.column,o=(0,h.hZ)((0,h.vt)(),h.qv);for(const e of this._files)for(const t of e.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const s=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),a=(0,i.mS)(e,t.columnDescriptorForAttribute(n),!1),u=[a.minValue(),s.minValue(),a.maxValue(),s.maxValue()];(0,h.DC)(o,u),t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}this._fullExtent={xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:e.metadata.spatialReference}}return{extent:this._fullExtent}}destroy(){for(const e of this._files)e.free();this._queue.destroy()}setCustomParameters(e){this._customParameters=e}async queryFeatures(e,t){return this._validateQuery(e),e.objectIds?.length||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0),(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){return this._validateQuery(e),R(e)?(e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.resultOffset=e.resultOffset??0,delete e.outFields,delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(e,t){return this._validateQuery(e),R(e)?(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0,delete e.returnGeometry,delete e.outFields,(await this._enqueueQuery(e,t)).items.map(e=>e.getObjectId())):Array.from({length:this._getFeatureCount()},(e,t)=>t)}async queryExtent(e,t){if(this._validateQuery(e),this._fullExtent&&!R(e))return{count:this._getFeatureCount(),extent:this._fullExtent};const s=(0,r.zI)(this._metadata.spatialReference);e.resultOffset=e.resultOffset??0,e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.returnGeometry=!0,delete e.outFields;const i=(0,h.hZ)((0,h.vt)(),h.qv),n=(0,h.vt)(),o=await this._enqueueQuery(e,t);let a=0;for(const e of o.items)e.getBounds(n)&&((0,h.RF)(i,n),a+=1);return{count:a,extent:(0,l.Wc)(i,s,e.outSR?(0,r.zI)(e.outSR):s,s,!1)}}_getFeatureCount(){return this._files.reduce((e,t)=>e+t.numRows(),0)}_validateQuery(e){if(e.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:e});if(e.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:e})}async*_fetchChunks(e,t){const s=this._files[0].numRows(),i=Math.ceil(s/w);for(let s=0;s<i;s++){const i=s*w,r=await this._files[0].readChunk(i,w,e.fields,e.returnGeometry,t);for(const e of r){const t=new z.s(this._metadata,this._fieldsIndex,e,0),s=new y.j(t,null,0,!1),i=I(this._metadata,[s],this._queryEngineParams);yield i}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const s=await this._getReadParams(e);if(e.objectIds?.length){const i=[],r=(await this._files[0].readChunksByRowId(new Uint32Array(e.objectIds),s.fields,s.returnGeometry,t)).map((e,t)=>new z.s(this._metadata,this._fieldsIndex,e,t)).map((e,t)=>new y.j(e,null,t,!1)),n=I(this._metadata,r,this._queryEngineParams),o=await n.executeQueryForOpaqueFeatures(e,t);for(const e of o)i.push(e);return new c.G(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:x})}let i=e.resultRecordCount,r=e.resultOffset;(0,o.Lw)(i),(0,o.Lw)(r),delete e.resultRecordCount,delete e.resultOffset;const n=[];for await(const o of this._fetchChunks(s,t)){const s=await o.executeQueryForOpaqueFeatures(e,t);if(s.length>r){const t=s.slice(r,Math.min(r+i,s.length));for(const e of t)n.push(e);if(r=0,i-=t.length,0===i)return new c.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:x})}else r-=s.length}return new c.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:x})}async _getReadParams(e){const t=new Set;if(e.where&&await(0,f.hz)(t,this._fieldsIndex,e.where),e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);if(e.outFields)for(const s of e.outFields)t.add(s);return{fields:this._getAttributeIds(Array.from(t)),returnGeometry:!!e.returnGeometry||!!e.geometry}}_getAttributeIds(e){if(null==e)return new Uint32Array;if(e.includes("*"))return new Uint32Array(this._fieldsIndex.fields.map(e=>e.column).filter(e=>null!=e));const t=[];for(const s of e){const e=this._fieldsIndex.get(s);if(null==e)throw new n.A("unknown-field",`Field ${s} does not exist`);null==e.column||t.push(e.column)}return new Uint32Array(t)}}function R(e){return Object.keys(e).some(e=>function(e){switch(e){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"where":case"objectIds":case"historicMoment":return!0;default:return!1}}(e))}function I(e,t,s){const i=new g.I(e);for(const e of t)i.insert(e);return new l.do({...s,featureStore:i})}function S(e){switch(e.length){case 4:return(0,h.Jt)((0,h.vt)(),e);case 6:return e;default:throw new n.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const u=1+Math.max(o,-4)- -3;this._db.set(t,new n(s,r,u)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t,s,i){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;i>this._maxSize;){const e=this._notifyRemove(t,s,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}r.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(o)[0])?.removeFunc,n=r?.(t,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class n{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,s)=>{s.d(t,{OU:()=>l,Pw:()=>c});var i=s(31635),r=s(65008),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),u=s(40608);const h=Symbol("ClonableMixin"),l=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},u=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||7!==a&&0!==a&&5!==a&&4!==a)continue;const l=this[t];let c=null;if("function"==typeof h)c=h(l,e);else if("reference"===h)c=l;else if(c=(0,n.TU)(l,e),null!=l&&null==c)continue;0===a?u.set(t,c):r[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(r);if(u.size){const e=(0,a.oY)(h)?.store;if(e)for(const[t,s]of u)e.set(t,s,0)}return h}};return r=(0,i.Cg)([(0,u.$)("esri.core.Clonable")],r),r},c=l(r.A)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4841],{6557:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var i=s(31635),r=s(21818),n=s(49186),o=s(97768),a=s(563),u=s(16930),h=s(70328),l=s(56390),c=s(8384),d=s(95466),f=s(30524),m=s(70581),_=s(30661),y=s(28923),g=s(44320),p=s(35258),z=s(16630);const w=new _.Z,x=8e3;class b{constructor(){this._files=[],this._queue=new a.QueueProcessor({concurrency:1,process:(e,t)=>this._executeQuery(e,t)})}async load(e){this.setCustomParameters(e.customParameters),this._files=await Promise.all(e.urls.map(t=>(0,m.DV)(t,{geometryInfo:e.geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters}))),this._metadata=p.i.createFeature(e.metadata),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:e.geometryInfo?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:u.A.fromJSON(e.geometryInfo?.spatialReference),aggregateAdapter:null,timeInfo:null,definitionExpression:null};const t=this._files[0];if(!t)return{extent:null};const{fields:s,timeZoneByFieldName:r}=e.metadata.fieldsIndex,n=s.map(e=>({...e,column:t.columnForFieldName(e.name)})),o=d.A.fromJSON({fields:n,timeZoneByFieldName:r});if(this._fieldsIndex=o,e.metadata.spatialReference&&(this._fullExtent=function(e,t){const s=(0,h.hZ)((0,h.vt)(),h.qv);for(const t of e){const e=(0,m.hD)(t);if(!e)return null;const i=e.columns[e.primary_column];if(!i.bbox)return null;const r=S(i.bbox);(0,h.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:t}}(this._files,e.metadata.spatialReference)),null==this._fullExtent&&"location"===e.geometryInfo?.encoding.type){const{latitudeFieldName:t,longitudeFieldName:s}=e.geometryInfo.encoding,r=this._fieldsIndex.get(t)?.column,n=this._fieldsIndex.get(s)?.column,o=(0,h.hZ)((0,h.vt)(),h.qv);for(const e of this._files)for(const t of e.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const s=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),a=(0,i.mS)(e,t.columnDescriptorForAttribute(n),!1),u=[a.minValue(),s.minValue(),a.maxValue(),s.maxValue()];(0,h.DC)(o,u),t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}this._fullExtent={xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:e.metadata.spatialReference}}return{extent:this._fullExtent}}destroy(){for(const e of this._files)e.free();this._queue.destroy()}setCustomParameters(e){this._customParameters=e}async queryFeatures(e,t){return this._validateQuery(e),e.objectIds?.length||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0),(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){return this._validateQuery(e),R(e)?(e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.resultOffset=e.resultOffset??0,delete e.outFields,delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(e,t){return this._validateQuery(e),R(e)?(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0,delete e.returnGeometry,delete e.outFields,(await this._enqueueQuery(e,t)).items.map(e=>e.getObjectId())):Array.from({length:this._getFeatureCount()},(e,t)=>t)}async queryExtent(e,t){if(this._validateQuery(e),this._fullExtent&&!R(e))return{count:this._getFeatureCount(),extent:this._fullExtent};const s=(0,r.zI)(this._metadata.spatialReference);e.resultOffset=e.resultOffset??0,e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.returnGeometry=!0,delete e.outFields;const i=(0,h.hZ)((0,h.vt)(),h.qv),n=(0,h.vt)(),o=await this._enqueueQuery(e,t);let a=0;for(const e of o.items)e.getBounds(n)&&((0,h.RF)(i,n),a+=1);return{count:a,extent:(0,l.Wc)(i,s,e.outSR?(0,r.zI)(e.outSR):s,s,!1)}}_getFeatureCount(){return this._files.reduce((e,t)=>e+t.numRows(),0)}_validateQuery(e){if(e.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:e});if(e.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:e})}async*_fetchChunks(e,t){const s=this._files[0].numRows(),i=Math.ceil(s/x);for(let s=0;s<i;s++){const i=s*x,r=await this._files[0].readChunk(i,x,e.fields,e.returnGeometry,t);for(const e of r){const t=new z.s(this._metadata,this._fieldsIndex,e,0),s=new y.j(t,null,0,!1),i=I(this._metadata,[s],this._queryEngineParams);yield i}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const s=await this._getReadParams(e);if(e.objectIds?.length){const i=[],r=(await this._files[0].readChunksByRowId(new Uint32Array(e.objectIds),s.fields,s.returnGeometry,t)).map((e,t)=>new z.s(this._metadata,this._fieldsIndex,e,t)).map((e,t)=>new y.j(e,null,t,!1)),n=I(this._metadata,r,this._queryEngineParams),o=await n.executeQueryForOpaqueFeatures(e,t);for(const e of o)i.push(e);return new c.G(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:w})}let i=e.resultRecordCount,r=e.resultOffset;(0,o.Lw)(i),(0,o.Lw)(r),delete e.resultRecordCount,delete e.resultOffset;const n=[];for await(const o of this._fetchChunks(s,t)){const s=await o.executeQueryForOpaqueFeatures(e,t);if(s.length>r){const t=s.slice(r,Math.min(r+i,s.length));for(const e of t)n.push(e);if(r=0,i-=t.length,0===i)return new c.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:w})}else r-=s.length}return new c.G(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:w})}async _getReadParams(e){const t=new Set;if(e.where&&await(0,f.hz)(t,this._fieldsIndex,e.where),e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);if(e.outFields)for(const s of e.outFields)t.add(s);return{fields:this._getAttributeIds(Array.from(t)),returnGeometry:!!e.returnGeometry||!!e.geometry}}_getAttributeIds(e){if(null==e)return new Uint32Array;if(e.includes("*"))return new Uint32Array(this._fieldsIndex.fields.map(e=>e.column).filter(e=>null!=e));const t=[];for(const s of e){const e=this._fieldsIndex.get(s);if(null==e)throw new n.A("unknown-field",`Field ${s} does not exist`);null==e.column||t.push(e.column)}return new Uint32Array(t)}}function R(e){return Object.keys(e).some(e=>function(e){switch(e){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"where":case"objectIds":case"historicMoment":return!0;default:return!1}}(e))}function I(e,t,s){const i=new g.I(e);for(const e of t)i.insert(e);return new l.do({...s,featureStore:i})}function S(e){switch(e.length){case 4:return(0,h.Jt)((0,h.vt)(),e);case 6:return e;default:throw new n.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const u=1+Math.max(o,-4)- -3;this._db.set(t,new n(s,r,u)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(o)[0])?.removeFunc,n=r?.(t,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,s)=>{s.d(t,{OU:()=>l,Pw:()=>c});var i=s(31635),r=s(65008),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),u=s(40608);const h=Symbol("ClonableMixin"),l=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},u=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||7!==a&&0!==a&&5!==a&&4!==a)continue;const l=this[t];let c=null;if("function"==typeof h)c=h(l,e);else if("reference"===h)c=l;else if(c=(0,n.TU)(l,e),null!=l&&null==c)continue;0===a?u.set(t,c):r[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(r);if(u.size){const e=(0,a.oY)(h)?.store;if(e)for(const[t,s]of u)e.set(t,s,0)}return h}};return r=(0,i.Cg)([(0,u.$)("esri.core.Clonable")],r),r},c=l(r.A)}}]);