@arcgis/core 6.0.0-next.35 → 6.0.0-next.37

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 (188) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0202eb8c2b2865f99981.js → 00311d1b18d5952a014b.js} +1 -1
  3. package/assets/esri/core/workers/chunks/0b21d0e2e5a91c34a108.js +1 -0
  4. package/assets/esri/core/workers/chunks/{f717005e14a7e9141df7.js → 2050c844b5a29b1df28a.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2c3612379111457c3221.js +1 -0
  6. package/assets/esri/core/workers/chunks/2f9072563194026e320e.js +1 -0
  7. package/assets/esri/core/workers/chunks/{d9a240a3c6bf85124474.js → 342a97974a78007b25e0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/34467f7d84baffd772a3.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4d18b48d4a282a0f341c.js → 427d929dc7f89b0a1ea9.js} +1 -1
  10. package/assets/esri/core/workers/chunks/432728c557be5dfa26b5.js +1 -0
  11. package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +1 -0
  12. package/assets/esri/core/workers/chunks/592b5db1459c02cf6a0c.js +1 -0
  13. package/assets/esri/core/workers/chunks/6a21dc13a465757ba007.js +1 -0
  14. package/assets/esri/core/workers/chunks/{379db67f78161ebd5468.js → 7023651ed6398dcf8efb.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{90360c0bd053d3e3fd77.js → 7027a0e7bfabb3bb7fc2.js} +1 -1
  16. package/assets/esri/core/workers/chunks/78818c2a898444f7e890.js +1 -0
  17. package/assets/esri/core/workers/chunks/{40c2674dae73f0942751.js → 7d497df6e13162156342.js} +1 -1
  18. package/assets/esri/core/workers/chunks/8a3dfe997712dc2ddead.js +1 -0
  19. package/assets/esri/core/workers/chunks/{81bcc495e6eaf2cf7474.js → 8f82a0a6747f673a2a7e.js} +1 -1
  20. package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +1 -0
  21. package/assets/esri/core/workers/chunks/{d3369ffed19f4c264dcd.js → 9ab0735e86cf8932bf9d.js} +1 -1
  22. package/assets/esri/core/workers/chunks/ab0ea4042f4e13874aed.js +1 -0
  23. package/assets/esri/core/workers/chunks/ab98ade3257360015d6c.js +1 -0
  24. package/assets/esri/core/workers/chunks/{796c6195b6bf59dcc9bd.js → b25a05c58b0fd0f6ac60.js} +1 -1
  25. package/assets/esri/core/workers/chunks/b90271ce38522bcf813b.js +1 -0
  26. package/assets/esri/core/workers/chunks/ba91df9835cdea7698a9.js +1 -0
  27. package/assets/esri/core/workers/chunks/bfe13ac9fa1aafb190a1.js +1 -0
  28. package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +1 -0
  29. package/assets/esri/core/workers/chunks/cf2e5f827cea7d7319ce.js +1 -0
  30. package/assets/esri/core/workers/chunks/dae2036faa28dade2119.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e8fb2ba7b7a4f0916325.js → eed4b90494a54f8b337b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +1 -0
  33. package/chunks/Clouds.glsl.js +7 -11
  34. package/chunks/RibbonLine.glsl.js +158 -84
  35. package/config.js +1 -1
  36. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  37. package/kernel.js +1 -1
  38. package/layers/BaseElevationLayer.js +1 -1
  39. package/layers/ElevationLayer.js +1 -1
  40. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  41. package/layers/IntegratedMeshLayer.d.ts +2 -0
  42. package/layers/IntegratedMeshLayer.js +1 -1
  43. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  44. package/layers/support/ElevationQuery.js +1 -1
  45. package/layers/video/VideoController.js +3 -3
  46. package/layers/video/types.d.ts +12 -0
  47. package/package.json +3 -3
  48. package/support/timeUtils.js +1 -1
  49. package/views/2d/engine/Bitmap.js +1 -1
  50. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  51. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  52. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  53. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  54. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  55. package/views/2d/engine/webgl/Overlay.js +1 -1
  56. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  57. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  58. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  59. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  60. package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
  61. package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
  62. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  63. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  64. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  65. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  66. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  67. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  68. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  69. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  70. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  71. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  72. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  73. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTexture.js +1 -1
  74. package/views/2d/engine/webgl/textureUtils.js +1 -1
  75. package/views/2d/layers/LayerView2D.js +1 -1
  76. package/views/2d/webglDeps.js +1 -1
  77. package/views/3d/GroundView3D.js +1 -1
  78. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  79. package/views/3d/analysis/LineOfSight/placementUtils.js +1 -1
  80. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  81. package/views/3d/input/SceneInputManager.js +1 -1
  82. package/views/3d/interactive/Manipulator3D.js +1 -1
  83. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  84. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  85. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  86. package/views/3d/layers/I3SMeshView3D.js +1 -1
  87. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  88. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  89. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  90. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  91. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  92. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  93. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  94. package/views/3d/support/engineContent/line.js +1 -1
  95. package/views/3d/support/engineContent/marker.js +1 -1
  96. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  97. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  98. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  99. package/views/3d/support/flow/geometryUtils.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  101. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  102. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  103. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  104. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  105. package/views/3d/support/gaussianSplatting/GaussianTileBuilder.js +2 -0
  106. package/views/3d/support/gaussianSplatting/formatConstants.js +2 -0
  107. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  108. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  109. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  110. package/views/3d/terrain/OverlayRenderer.js +1 -1
  111. package/views/3d/terrain/TerrainRenderer.js +1 -1
  112. package/views/3d/terrain/TerrainSurface.js +1 -1
  113. package/views/3d/terrain/TileCompositor.js +1 -1
  114. package/views/3d/terrain/TileRenderer.js +1 -1
  115. package/views/3d/webgl/RenderNode.d.ts +1 -1
  116. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  117. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  118. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  119. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  120. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +15 -11
  121. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  122. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  123. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  124. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  125. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  126. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  127. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  128. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  129. package/views/3d/webgl-engine/lib/AttributeView.js +1 -1
  130. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  131. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  132. package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
  133. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  134. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  135. package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
  136. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  137. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  138. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  139. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  140. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
  141. package/views/3d/webgl-engine/lib/VerticesView.js +2 -0
  142. package/views/3d/webgl-engine/lib/attributeViewUtils.js +1 -1
  143. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  144. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  145. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  146. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  147. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  148. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  149. package/views/3d/webgl-engine/materials/internal/lineMarkerBufferUtils.js +2 -0
  150. package/views/3d/webgl-engine/materials/internal/ribbonLineBufferUtils.js +2 -0
  151. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  152. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  153. package/views/draw/DrawTool.js +1 -1
  154. package/views/draw/support/ManagedTooltipField.js +1 -1
  155. package/views/support/TextureCompressionHelper.js +1 -1
  156. package/views/support/imageReprojection.js +1 -1
  157. package/views/webgl/FramebufferObject.js +1 -1
  158. package/views/webgl/RenderingContext.js +1 -1
  159. package/views/webgl/Texture.js +1 -1
  160. package/views/webgl/rasterUtils.js +1 -1
  161. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  162. package/views/webgl/textureUtils.js +1 -1
  163. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  164. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  165. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  166. package/widgets/OrientedImageryViewer.js +2 -2
  167. package/widgets/ScaleRangeSlider/types.d.ts +3 -3
  168. package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +0 -1
  169. package/assets/esri/core/workers/chunks/08140725277de5d2e41a.js +0 -1
  170. package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +0 -1
  171. package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +0 -1
  172. package/assets/esri/core/workers/chunks/3223f9fbc76ba9ef8d13.js +0 -1
  173. package/assets/esri/core/workers/chunks/3fdcc383bbd9cf0d274c.js +0 -1
  174. package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +0 -1
  175. package/assets/esri/core/workers/chunks/48b8b57f559a53c6c513.js +0 -1
  176. package/assets/esri/core/workers/chunks/4a979fce1c971b614a18.js +0 -1
  177. package/assets/esri/core/workers/chunks/5bd1414220e42cb8ebcf.js +0 -1
  178. package/assets/esri/core/workers/chunks/5d781c2c6204cffffd0d.js +0 -1
  179. package/assets/esri/core/workers/chunks/723df53cfa0189837d01.js +0 -1
  180. package/assets/esri/core/workers/chunks/7400b8c454b47ee4fb3c.js +0 -1
  181. package/assets/esri/core/workers/chunks/7af4edc6e87d27b9d467.js +0 -1
  182. package/assets/esri/core/workers/chunks/990e96139b5a1dccb061.js +0 -1
  183. package/assets/esri/core/workers/chunks/a607541959169741a943.js +0 -1
  184. package/assets/esri/core/workers/chunks/aa779896fd9e5c341349.js +0 -1
  185. package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +0 -1
  186. package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +0 -1
  187. package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +0 -1
  188. package/views/3d/webgl-engine/lib/GaussianSplatPrepassDepthRenderer.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6553,8241],{56512(e,t,i){function r(e){let t,i,r=[],o=!1;return function(...n){return o&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(n,r)||(i=e.apply(this,n),t=this,r=n,o=!0),i}}i.d(t,{B:()=>r})},76553(e,t,i){function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},65806(e,t,i){i.d(t,{g:()=>s});var r=i(51850),o=i(99917),n=i(9762);function s(e,t,i,r){if((0,o.canProjectWithoutEngine)(e.spatialReference,i))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,n.projectBuffer)(a,e.spatialReference,0,t,i,0);let s=(0,o.tryProject)(e,i,r);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,r.vt)()},27993(e,t,i){i.d(t,{F:()=>a});var r=i(99917),o=i(16930),n=i(9762),s=i(65806);function a(e,t,i,o){return!(null==t||null==o||e.length<2)&&((0,r.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,i,o,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,s.g)(l,i,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>l});var r=i(82799),o=i(16930),n=i(60408),s=i(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i)if((0,s.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t}else if((0,s.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t}else if((0,s.n1)(e)){let[i,r,o]=e.b;i[0]+=t,r[0]+=t,o[0]+=t}else e[0]+=t;for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,a])},61528(e,t,i){i.r(t);var r=i(32198),o=i(56507),n=i(69540),s=i(49186),a=i(44208),l=i(53966),u=i(25728),p=i(17676),h=i(36708),c=i(91429),d=i(87024),f=i(5443),y=i(16930),g=i(4146),m=i(52136),v=i(18768),_=i(69208),S=i(34287),A=i(8303),M=i(25036),C=i(10873),w=i(10292),R=i(58325),x=i(88546),E=i(20655),b=i(24212),T=i(80215),k=i(97159),G=i(16215),Z=i(72772),I=i(98697),L=i(36005);let P=class extends((0,v.b)((0,S.q)((0,A.A)((0,M.j)((0,u.M)((0,_.d)((0,m.p)((0,n.OU)(g.A))))))))){readModifications(e,t,i){this._modificationsSource={url:(0,k.f)(e,i),context:i}}initialize(){this.addHandles([(0,h.on)(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},h.OH),(0,h.wB)(()=>this.modifications,()=>this._modificationsGeneration++)])}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=x.Zx,this.fullExtent=x.zq,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._modificationsGeneration=0,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[y.A.WGS84,this.esriCrsSpatialReference]:[y.A.WGS84]}get fullExtents(){let e=this.fullExtent??x.zq;return this.initialized&&this.esriCrsFullExtent?[e,this.esriCrsFullExtent]:[e]}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){let t=[e];for(;t?.length>0;){let e=t.pop();if(!e)return;for(let[i,r]of Object.entries(e)){if("uri"===i)try{let e=new URL("https://tmp"+r).searchParams.get("session");if(e)return e}catch{}"object"==typeof r&&r&&t.push(r)}}return null}async requestRootAndSession(e){let t=(e,t)=>new s.A("3dtiles-init:"+e,t);return this._rootRequestPromise||=new Promise((i,r)=>{this.url||r(t("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null,new Promise((e,i)=>{if(this.replacesTerrain&&!this._key){let r=this.portalItem?.portal||this.parent?.portalItem?.portal||E.A.getDefault();r.signIn().then(()=>{r.g3dTilesEnabled?(0,o.A)(r.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>i(t("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):i(t("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+r.url))},()=>i(t("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{(0,o.A)(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(e){return void r(t("root-parse-failed","Error parsing root tile, details: "+e))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=(0,x.uB)(this._rootTilesetJSON),(0,x._8)(this._rootTilesetJSON)&&(this.esriCrsFullExtent=(0,x.uB)(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),i(),this._rootRequestPromise=null):r(t("root-is-null","Root tile is null."))},e=>{(0,p.QP)(e),r(t("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,l.A.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>r(e))}),this._rootRequestPromise}_haveWGS84ZModifications(e){for(let t of e)if(!t.geometry?.spatialReference||115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0;return!1}async _doLoad(e){let t=null==e?null:e.signal;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(e){(0,p.QP)(e)}if(null!=this._modificationsSource){let t=await R.A.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await(0,Z.initialize)();try{let e=(0,I.Ir)(null,t.toArray(),y.A.WGS84),i=(0,Z.switchMeshModificationPolygonVCSSync)({modifications:e,inVCS:115700});i.success&&i.modifications&&(0,I.H1)(i.modifications,t)}catch(e){l.A.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",e)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){let{modifications:e}=this;e&&e.length>0&&await(0,Z.initialize)()}else await this.load().then(()=>{},()=>{})}async queryElevationForGround(e,t){let i=w.q.fromGeometry(e),r=t.signal;if(this.queryElevationCallback&&((0,a.A)("enable-feature:im-as-ground")?this.isUsedAsGroundLayer:this.replacesTerrain)){let o=12.9*(t.minDemResolution||0)+.71,n=await(await this.queryElevationCallback(i,{signal:r,maxGeometricError:o})).project(e.spatialReference,r);if(n){if(void 0!==t.noDataValue&&t.noDataValue!==Number.MAX_VALUE)for(let e of n.coordinates)e.z===Number.MAX_VALUE&&(e.z=t.noDataValue);let e=t.noDataValue??Number.MAX_VALUE,i=n.coordinates.map(t=>({demResolution:t.z===e?-1:1,source:this}));return{geometry:n.export(),noDataValue:e,sampleInfo:i}}}return{geometry:i.export(),noDataValue:Number.MAX_VALUE,sampleInfo:i.coordinates.map(()=>({demResolution:-1,source:this}))}}get memoizedElevationQueryDependencies(){return[this.loadStatus,null!=this.queryElevationCallback,(0,b.M7)(this.elevationInfo),this._modificationsGeneration]}get hasAttributionData(){return!1}_validateElevationInfo(e){let t="Integrated mesh 3d tiles layers";(0,b.XF)(l.A.getLogger(this),(0,b.B)(t,"absolute-height",e)),(0,b.XF)(l.A.getLogger(this),(0,b.tW)(t,e))}get replacesTerrain(){return this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return(0,a.A)("enable-feature:im-as-ground")?(0,G.S)(this.parent)||(0,T.Q)(this.parent):(0,G.S)(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};(0,r.Cg)([(0,c.MZ)({type:["IntegratedMesh3DTilesLayer"]})],P.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)({type:R.A,clonable:e=>e?.clone()??null}),(0,d.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],P.prototype,"modifications",void 0),(0,r.Cg)([(0,c.MZ)({clonable:e=>e?{...e}:null})],P.prototype,"_modificationsSource",void 0),(0,r.Cg)([(0,L.w)(["web-scene","portal-item"],"modifications")],P.prototype,"readModifications",null),(0,r.Cg)([(0,c.MZ)({type:y.A})],P.prototype,"spatialReference",void 0),(0,r.Cg)([(0,c.MZ)({type:f.A})],P.prototype,"fullExtent",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"supportedSpatialReferences",null),(0,r.Cg)([(0,c.MZ)({type:[f.A]})],P.prototype,"fullExtents",null),(0,r.Cg)([(0,c.MZ)(C.Yj)],P.prototype,"elevationInfo",null),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],P.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)(C.OZ)],P.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],P.prototype,"path",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],P.prototype,"minScale",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],P.prototype,"maxScale",void 0),(0,r.Cg)([(0,c.MZ)()],P.prototype,"queryElevationCallback",void 0),(0,r.Cg)([(0,c.MZ)()],P.prototype,"_modificationsGeneration",void 0),(0,r.Cg)([(0,c.MZ)()],P.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"hasAttributionData",null),(0,r.Cg)([(0,c.MZ)()],P.prototype,"replacesTerrain",null),(0,r.Cg)([(0,c.MZ)()],P.prototype,"isUsedAsGroundLayer",null),(0,r.Cg)([(0,c.MZ)()],P.prototype,"hasGoogleUrl",null),(0,r.Cg)([(0,c.MZ)()],P.prototype,"_simulateGoogleUrl",void 0),P=(0,r.Cg)([(0,c.$K)("esri.layers.IntegratedMesh3DTilesLayer")],P);const D=P;i.d(t,["default",0,D])},52136(e,t,i){var r=i(32198),o=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,o.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},24212(e,t,i){i.d(t,{$7:()=>l,B:()=>a,M7:()=>h,XF:()=>p,tW:()=>u,w7:()=>s});var r=i(56512),o=i(86211),n=i(16271);function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:d}(e).mode}(null==e||(e.hasZ??!1),t)}function a(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function l(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function p(e,t){t&&e.warn(".elevationInfo=",t)}function h(e){return(e?.offset??0)*(0,n.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",n=(0,o.mq)(i);return n?(0,o.oU)(e,r,n):0});const c={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2772,9940],{80200(e,t,i){i.d(t,{d:()=>u});const n={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){let i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function r(e,t,i,n,r,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(n,o)),r),i)}function o(e,t,i,n,s,o,l){return r(t&i|~t&n,e,t,s,o,l)}function l(e,t,i,n,s,o,l){return r(t&n|i&~n,e,t,s,o,l)}function a(e,t,i,n,s,o,l){return r(t^i^n,e,t,s,o,l)}function h(e,t,i,n,s,o,l){return r(i^(t|~n),e,t,s,o,l)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,n=-271733879,r=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){let u=i,p=n,f=r,m=c;i=o(i,n,r,c,e[t],7,-680876936),c=o(c,i,n,r,e[t+1],12,-389564586),r=o(r,c,i,n,e[t+2],17,606105819),n=o(n,r,c,i,e[t+3],22,-1044525330),i=o(i,n,r,c,e[t+4],7,-176418897),c=o(c,i,n,r,e[t+5],12,1200080426),r=o(r,c,i,n,e[t+6],17,-1473231341),n=o(n,r,c,i,e[t+7],22,-45705983),i=o(i,n,r,c,e[t+8],7,1770035416),c=o(c,i,n,r,e[t+9],12,-1958414417),r=o(r,c,i,n,e[t+10],17,-42063),n=o(n,r,c,i,e[t+11],22,-1990404162),i=o(i,n,r,c,e[t+12],7,1804603682),c=o(c,i,n,r,e[t+13],12,-40341101),r=o(r,c,i,n,e[t+14],17,-1502002290),n=o(n,r,c,i,e[t+15],22,1236535329),i=l(i,n,r,c,e[t+1],5,-165796510),c=l(c,i,n,r,e[t+6],9,-1069501632),r=l(r,c,i,n,e[t+11],14,643717713),n=l(n,r,c,i,e[t],20,-373897302),i=l(i,n,r,c,e[t+5],5,-701558691),c=l(c,i,n,r,e[t+10],9,38016083),r=l(r,c,i,n,e[t+15],14,-660478335),n=l(n,r,c,i,e[t+4],20,-405537848),i=l(i,n,r,c,e[t+9],5,568446438),c=l(c,i,n,r,e[t+14],9,-1019803690),r=l(r,c,i,n,e[t+3],14,-187363961),n=l(n,r,c,i,e[t+8],20,1163531501),i=l(i,n,r,c,e[t+13],5,-1444681467),c=l(c,i,n,r,e[t+2],9,-51403784),r=l(r,c,i,n,e[t+7],14,1735328473),n=l(n,r,c,i,e[t+12],20,-1926607734),i=a(i,n,r,c,e[t+5],4,-378558),c=a(c,i,n,r,e[t+8],11,-2022574463),r=a(r,c,i,n,e[t+11],16,1839030562),n=a(n,r,c,i,e[t+14],23,-35309556),i=a(i,n,r,c,e[t+1],4,-1530992060),c=a(c,i,n,r,e[t+4],11,1272893353),r=a(r,c,i,n,e[t+7],16,-155497632),n=a(n,r,c,i,e[t+10],23,-1094730640),i=a(i,n,r,c,e[t+13],4,681279174),c=a(c,i,n,r,e[t],11,-358537222),r=a(r,c,i,n,e[t+3],16,-722521979),n=a(n,r,c,i,e[t+6],23,76029189),i=a(i,n,r,c,e[t+9],4,-640364487),c=a(c,i,n,r,e[t+12],11,-421815835),r=a(r,c,i,n,e[t+15],16,530742520),n=a(n,r,c,i,e[t+2],23,-995338651),i=h(i,n,r,c,e[t],6,-198630844),c=h(c,i,n,r,e[t+7],10,1126891415),r=h(r,c,i,n,e[t+14],15,-1416354905),n=h(n,r,c,i,e[t+5],21,-57434055),i=h(i,n,r,c,e[t+12],6,1700485571),c=h(c,i,n,r,e[t+3],10,-1894986606),r=h(r,c,i,n,e[t+10],15,-1051523),n=h(n,r,c,i,e[t+1],21,-2054922799),i=h(i,n,r,c,e[t+8],6,1873313359),c=h(c,i,n,r,e[t+15],10,-30611744),r=h(r,c,i,n,e[t+6],15,-1560198380),n=h(n,r,c,i,e[t+13],21,1309151649),i=h(i,n,r,c,e[t+4],6,-145523070),c=h(c,i,n,r,e[t+11],10,-1120210379),r=h(r,c,i,n,e[t+2],15,718787259),n=h(n,r,c,i,e[t+9],21,-343485551),i=s(i,u),n=s(n,p),r=s(r,f),c=s(c,m)}return[i,n,r,c]}function u(e,t=n.Hex){let i=t||n.Base64,s=c(function(e){let t=[];for(let i=0,n=8*e.length;i<n;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case n.Raw:return s;case n.Hex:return function(e){let t="0123456789abcdef",i=[];for(let n=0,s=4*e.length;n<s;n++)i.push(t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15));return i.join("")}(s);case n.String:return function(e){let t=[];for(let i=0,n=32*e.length;i<n;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case n.Base64:return function(e){let t=[];for(let i=0,n=4*e.length;i<n;i+=3){let n=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-s)&63))}return t.join("")}(s)}}i.d(t,["T",0,n])},87024(e,t,i){i.d(t,{P:()=>f});var n=i(49186),s=i(80200),r=i(76553),o=i(84952),l=i(13069),a=i(96156),h=i(35666),c=i(10107),u=i(85648),p=i(97159);function f(e){let t=e?.origins??[void 0];return(i,n)=>{let s=function(e,t,i){if("resource"===e?.type)return function(e,t,i){let n=(0,a.z4)(t,i);return{type:String,read:(e,t,i)=>{let s=(0,p.r)(e,t,i);return n.type===String?s:"function"==typeof n.type?new n.type({url:s}):void 0},write:{isRequired:n.json?.write?.isRequired,writer(t,s,l,a){if(!a?.resources)return"string"==typeof t?void(s[l]=(0,p.t)(t,a)):void(s[l]=t.write({},a));let c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,p.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),g=n.type!==String&&(!(0,r.H)(this)||a?.origin&&this.originIdOf(i)>(0,h.aB)(a.origin)),_={object:this,propertyName:i,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:a,params:e};a?.portalItem&&f&&!(0,o.oP)(f)?g&&e?.contentAddressed?m(_):g?function(e){let{context:t,targetUrl:i,params:n,value:s,dest:r,targetPropertyName:l}=e;if(!t.portalItem)return;let a=t.portalItem.resourceFromPath(i),h=y(s,i,t),c=(0,u.n)(h),p=(0,o.Zo)(a.path),f=n?.compress??!1;c===p?(t.resources&&d({...e,resource:a,content:h,compress:f,updates:t.resources.toUpdate}),r[l]=i):m(e)}(_):function({context:e,targetUrl:t,dest:i,targetPropertyName:n}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),i[n]=t)}(_):a?.portalItem&&(null==f||null!=(0,p.i)(f)||(0,o.w8)(f)||g)?m(_):s[l]=f}}}}(e,t,i);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,i,n);for(let e of t){let t=(0,c.rM)(i,e,n);for(let e in s)t[e]=s[e]}}}function m(e){let{targetUrl:t,params:i,value:r,context:a,dest:h,targetPropertyName:c}=e;if(!a.portalItem)return;let f=(0,p.p)(t),m=y(r,t,a);if(i?.contentAddressed&&"json"!==m.type)return void a.messages?.push(new n.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${m.type} with content addressing. Content addressing is only supported for json resources.`,{content:m}));let g=i?.contentAddressed&&"json"===m.type?(0,s.d)(m.jsonString):f?.filename??(0,l.lk)(),_=i?.prefix??f?.prefix,x=(0,o.fj)(_,g),w=`${x}.${(0,u.n)(m)}`;if(i?.contentAddressed&&a.resources&&"json"===m.type){let e=a.resources.toKeep.find(({resource:e})=>e.path===w)??a.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(h[c]=e.resource.itemRelativeUrl)}let v=a.portalItem.resourceFromPath(w);(0,o.w8)(t)&&a.resources&&a.resources.pendingOperations.push((0,o.tk)(t).then(e=>{v.path=`${x}.${(0,u.n)({type:"blob",blob:e})}`,h[c]=v.itemRelativeUrl}).catch(()=>{}));let C=i?.compress??!1;a.resources&&d({...e,resource:v,content:m,compress:C,updates:a.resources.toAdd}),h[c]=v.itemRelativeUrl}function d({object:e,propertyName:t,updates:i,resource:n,content:s,compress:r}){i.push({resource:n,content:s,compress:r,finish:i=>{!function(e,t,i){"string"==typeof e[t]?e[t]=i.url:e[t].url=i.url}(e,t,i)}})}function y(e,t,i){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(i))}}},83027(e,t,i){const n=i(29953).ho;i.d(t,["h",0,n])},35982(e,t,i){i.d(t,{B:()=>c});var n=i(4576),s=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),h=i(83027);class c{constructor(e,t,i,n,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){return this._invokeMethod(e,[t],i,n)}invokeMethodWithArgs(e,t,i,n){return this._invokeMethod(e,t,i,n)}_invokeMethod(e,t,i,n){if(this._thread){let s=this._transferLists[e],r=s?s(...t):[];return this._thread.apply(e,t,{transferList:r,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this._invokeMethod(e,t,i,n))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},89056(e,t,i){i.d(t,{b3:()=>u,jZ:()=>c});var n=i(12195),s=i(19419),r=i(537),o=i(95108),l=i(60408),a=i(80754),h=i(21325);function c(e){return p(e,!0)}function u(e){return p(e,!1)}function p(e,t){if(null==e)return null;let i=e.spatialReference,s=(0,h.Vp)(i),o=(0,n.W)(e)?e.toJSON():e;if(!s)return o;let c=(0,h.K8)(i)?102100:4326,u=a.j7[c].maxX,p=a.j7[c].minX;if((0,l.fT)(o))return m(o,u,p);if((0,l.U9)(o))return o.points=o.points.map(e=>m(e,u,p)),o;if((0,l.ZC)(o))return f(o,s);if((0,l.Bi)(o)||(0,l.Rg)(o)){let e=(0,r.Rg)(w,o),i={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},n=(0,a.kd)(i.xmin,p),s=2*u*n,l=0===s?o:(0,a.kS)(o,s);return i.xmin+=s,i.xmax+=s,i.xmax>u?_(l,u,t):i.xmin<p?_(l,p,t):l}return o}function f(e,t){if(!t)return e;let i=function(e,t){let i=[],{ymin:n,ymax:s,xmin:r,xmax:o}=e,l=e.xmax-e.xmin,[a,h]=t.valid,{x:c,frameId:u}=d(e.xmin,t),{x:p,frameId:f}=d(e.xmax,t),m=c===p&&l>0;if(l>2*h){let e={xmin:r<o?c:p,ymin:n,xmax:h,ymax:s},t={xmin:a,ymin:n,xmax:r<o?p:c,ymax:s},l={xmin:0,ymin:n,xmax:h,ymax:s},m={xmin:a,ymin:n,xmax:0,ymax:s},d=[],g=[];y(e,l)&&d.push(u),y(e,m)&&g.push(u),y(t,l)&&d.push(f),y(t,m)&&g.push(f);for(let e=u+1;e<f;e++)d.push(e),g.push(e);i.push(new x(e,[u]),new x(t,[f]),new x(l,d),new x(m,g))}else c>p||m?i.push(new x({xmin:c,ymin:n,xmax:h,ymax:s},[u]),new x({xmin:a,ymin:n,xmax:p,ymax:s},[f])):i.push(new x({xmin:c,ymin:n,xmax:p,ymax:s},[u]));return i}(e,t).map(e=>e.extent);return i.length<2?i[0]||e:i.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:i.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,i){if(Array.isArray(e)){let n=e[0];if(n>t){let i=(0,a.kd)(n,t);e[0]=n+-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e[0]=n+-2*i*t}}else{let n=e.x;if(n>t){let i=(0,a.kd)(n,t);e.x+=-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e.x+=-2*i*t}}return e}function d(e,t){let i,[n,s]=t.valid,r=2*s,o=0;return e>s?(i=Math.ceil(Math.abs(e-s)/r),e-=i*r,o=i):e<n&&(i=Math.ceil(Math.abs(e-n)/r),e+=i*r,o=-i),{x:e,frameId:o}}function y(e,t){let{xmin:i,ymin:n,xmax:s,ymax:r}=t;return g(e,i,n)&&g(e,i,r)&&g(e,s,r)&&g(e,s,n)}function g(e,t,i){return t>=e.xmin&&t<=e.xmax&&i>=e.ymin&&i<=e.ymax}function _(e,t,i=!0){let n=!(0,l.Rg)(e);if(n&&(0,o.m3)(e),i)return(new v).cut(e,t);let s=n?e.rings:e.paths,r=n?4:2,a=s.length,h=-2*t;for(let e=0;e<a;e++){let t=s[e];if(t&&t.length>=r){let e=[];for(let[i,...n]of t)e.push([i+h,...n]);s.push(e)}}return n?e.rings=s:e.paths=s,e}class x{constructor(e,t){this.extent=e,this.frameIds=t}}const w=(0,s.vt)();class v{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let i;if(this._xCut=t,e.rings)this._closed=!0,i=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,i=e.paths,this._minPts=2}for(let e of i){if(!e||e.length<this._minPts)continue;let t=!0;for(let i of e)t?(this.moveTo(i),t=!1):this.lineTo(i);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),i=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&i.push(e);let n=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=n;i.push(e)}return this._closed?e.rings=i:e.paths=i,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let i=this._intersect(this._prevPt,e);this._lineTo(i,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(C(e,t<=0?e[0]:this._xCut)),this._lineOut.push(C(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(S(this._lineIn,e,t<=0?e[0]:this._xCut),S(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let i=(this._xCut-e[0])/(t[0]-e[0]),n=[this._xCut,e[1]+i*(t[1]-e[1])],s=Math.min(e.length,t.length);for(let r=2;r<s;r++)n.push(e[r]+i*(t[r]-e[r]));return n}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function C(e,t){let i=e.slice();return i[0]=t,i}function S(e,t,i){let n=e.length;n>1&&e[n-1][0]===i&&e[n-2][0]===i?e[n-1]=C(t,i):e.push(C(t,i))}},10292(e,t,i){i.d(t,{q:()=>l});var n=i(48526),s=i(86738),r=i(82799),o=i(99917);class l{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){let t=new l(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,o.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});let i=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),s=(0,o.project)(i,e);if(!s)return null;let r=this.coordinates.map((e,t)=>{let i=e.clone(),n=s.points[t];return i.x=n[0],i.y=n[1],i}),l=this.clone(r);return l.spatialReference=e,l}projectSync(e){if(this.spatialReference.equals(e))return this.clone();let t=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,o.project)(t,e);if(!i)return null;let s=this.coordinates.map((e,t)=>{let n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),r=this.clone(s);return r.spatialReference=e,r}static fromGeometry(e){let t=new l(e);if(e instanceof l)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{let n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{let i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new a(i.x,i.y,i.z,i.m)]:n?[new a(i.x,i.y,i.z)]:r?[new a(i.x,i.y,null,i.m)]:[new a(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new s.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new s.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{let i=e,{hasZ:s,hasM:r}=i;return t.coordinates=s&&r?i.points.map(e=>new a(e[0],e[1],e[2],e[3])):s?i.points.map(e=>new a(e[0],e[1],e[2])):r?i.points.map(e=>new a(e[0],e[1],null,e[2])):i.points.map(e=>new a(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new n.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new n.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{let i=e,n=[],s=[],{hasZ:o,hasM:l}=e,h=0;for(let e of i.paths)if(s.push([h,h+e.length]),h+=e.length,o&&l)for(let t of e)n.push(new a(t[0],t[1],t[2],t[3]));else if(o)for(let t of e)n.push(new a(t[0],t[1],t[2]));else if(l)for(let t of e)n.push(new a(t[0],t[1],null,t[2]));else for(let t of e)n.push(new a(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{let n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),o=s.map(e=>n.slice(e[0],e[1]));return new r.A({paths:o,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class a{constructor(e,t,i=null,n=null,s=null,r=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=s,this.elevationTile=r}clone(){return new a(this.x,this.y,this.z,this.m)}}},58325(e,t,i){i.d(t,{A:()=>S});var n,s=i(32198),r=i(56507),o=i(7762),l=i(25482),a=i(84952),h=i(91429),c=i(4718),u=i(67076),p=i(87024),f=i(39829),m=i(99917),d=i(16930),y=i(21325),g=i(88546),_=i(72772),x=i(98697),w=i(43937);let v=n=class extends l.o{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,i,n){if(this._needWGS84Conversion(n))this._doWGS84Conversion(t,i,n);else if(n.layer?.spatialReference&&!n.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,m.canProjectWithoutEngine)(e.spatialReference,n.layer.spatialReference))return void(n?.messages&&n.messages.push(new u.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:n.layer.spatialReference,context:n})));let s=new f.A;(0,m.projectPolygon)(e,s,n.layer.spatialReference),t[i]=s.toJSON(n)}else t[i]=e.toJSON(n)}_needWGS84Conversion(e){if("integrated-mesh-3dtiles"===e.layer?.type){let t=e.layer;return!t.esriCrsSpatialReference||!(0,y.aI)(t.esriCrsSpatialReference,this.geometry.spatialReference)}return!1}_doWGS84Conversion(e,t,i){let n=!0;if((0,_.isInitialized)()){let s=[this],r=(0,x.Ir)(null,s,d.A.WGS84);if(r.length>1){let s=(0,_.switchMeshModificationPolygonVCSSync)({modifications:r,inVCS:5773});if(s.success&&s.modifications){let r=[this.clone()];(0,x.H1)(s.modifications,r),1===r.length&&r[0].geometry&&(r[0].geometry.spatialReference=g.Zx,e[t]=r[0].geometry.toJSON(i),n=!1)}}}n&&i?.messages&&i.messages.push(new u.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:this.geometry.spatialReference,context:i}))}clone(){return new n({geometry:(0,c.o8)(this.geometry),type:this.type})}};var C;(0,s.Cg)([(0,h.MZ)({type:f.A}),(0,p.P)()],v.prototype,"geometry",void 0),(0,s.Cg)([(0,w.K)(["web-scene","portal-item"],"geometry")],v.prototype,"writeGeometry",null),(0,s.Cg)([(0,h.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,p.P)()],v.prototype,"type",void 0),v=n=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModification")],v);let S=C=class extends((0,l.T)(o.A.ofType(v))){constructor(e){super(e),this.url=null}clone(){return new C({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){let i=new C;for(let n of e)i.add(v.fromJSON(n,t));return i}static async fromUrl(e,t,i,n=!1){let s={url:(0,a.An)(e),origin:"service"},o=await(0,r.A)(e,{responseType:"json",signal:i?.signal}),l=t.toJSON(),h=[];for(let e of o.data){let t=l;n&&e.geometry.spatialReference&&(t=e.geometry.spatialReference),h.push(v.fromJSON({...e,geometry:{spatialReference:t,...e.geometry}},s))}return new C({url:e,items:h})}};(0,s.Cg)([(0,h.MZ)({type:String})],S.prototype,"url",void 0),S=C=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModifications")],S)},85648(e,t,i){i.d(t,{n:()=>s});var n=i(84952);function s(e){return r[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,n.Zo)(e);return a[t]||o}(e.url)}(e)]||l}const r={},o="text/plain",l=r[o],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in a)r[a[e]]=e},80215(e,t,i){i.d(t,{Q:()=>s});const n=Symbol("GroundInstance");function s(e){return"object"==typeof e&&!!e&&n in e}},72772(e,t,i){i.r(t),i.d(t,{addSpatialReferenceInfo:()=>a,destroyWasm:()=>c,initialize:()=>u,isInitialized:()=>p,process:()=>l,switchMeshModificationPolygonVCSSync:()=>h});var n=i(2741);function s(e){return(0,n.s)(`esri/libs/lyr3d/${e}`)}i(49186),new Map;let r,o=null;async function l(e){await u();let t={status:1,error:"",jobDescJson:"",data:new Uint8Array,missingInputs:[]};if(e.inputs.length<1)return{result:t,transferList:[]};let i={ptrs:[],sizes:[]};for(let t of e.inputs){let e=o._malloc(t.byteLength);new Uint8Array(o.HEAPU8.buffer,e,t.byteLength).set(new Uint8Array(t)),i.ptrs.push(e),i.sizes.push(t.byteLength)}let n=o.process(e.jobDescJson,e.id,i,e.isMissingResourceCase);t.status=n.status,t.missingInputs=n.missingInputs.slice();let s=0===n.status&&n.data,r=2===t.status&&t.missingInputs.length>0;t.jobDescJson=n.jobDescJson.slice(),t.error=n.error.slice(),s?t.data=n.data.slice():r&&(t.originalInputs=e.inputs.slice());for(let e=0;e<i.ptrs.length;++e)o._free(i.ptrs[e]);let l=[];if(s)l.push(t.data.buffer);else if(r)for(let t of e.inputs)l.push(t);return{result:t,transferList:l}}async function a(e){await u(),o.add_spatial_reference_info(e.sr,e.isGCS,e.toMetersXY,e.toMetersZ)}function h(e){if(!o)return{success:!1,modifications:null};let t=o._malloc(8*e.modifications.length),i=new Float64Array(o.HEAPF64.buffer,t,e.modifications.length);i.set(e.modifications);let n=o.switch_mesh_modification_polygon_vcs(t,e.modifications.length,e.inVCS),s=null;return n&&(s=i.slice()),o._free(t),{success:n,modifications:s}}function c(){o&&=(o.uninitialize_lyr3d_worker_wasm(),null)}function u(){return p()?Promise.resolve():(r||=async function(){let{default:e}=await i.e(2343).then(()=>i(2343));return async function(e,t){return t({locateFile:s})}(0,e)}().then(e=>{o=e,o.initialize_lyr3d_worker_wasm(),r=null}),r)}function p(){return null!==o}},98697(e,t,i){i.d(t,{Cm:()=>f,H1:()=>x,Ir:()=>y,_b:()=>u,sQ:()=>p});var n=i(53966),s=i(15142),r=i(51850),o=i(35982),l=i(39829),a=i(99917),h=i(27993),c=i(89056);class u{constructor(e,t,i,n,s,r){this.layout=e,this.interleavedVertexData=t,this.indices=i,this.hasColors=n,this.hasModifications=s,this.positionData=r}}class p{constructor(e,t,i,n,s,r,o,l,a){this.componentOffsets=e,this.featureIds=t,this.anchorIds=i,this.anchors=n,this.transformedGeometry=s,this.globalTrafo=r,this.obb=o,this.geometryMinElevation=l,this.geometryMaxElevation=a}}class f extends o.B{constructor(e){super("SceneLayerWorker","process",{process:e=>[e.geometryBuffer],project:e=>[e.positions.buffer],transformNormals:e=>[e.normals.buffer]},e,{hasInitialize:!0}),this._schemasByContext=new Map,this._modificationsByContext=new Map}_onClientConnected(e){for(let[t,i]of this._schemasByContext)e.invoke("setLegacySchema",{context:t,jsonSchema:i}).catch(()=>{});for(let t of this._modificationsByContext.values())e.invoke("setModifications",t).catch(()=>{})}setModifications(e,t,i){let n={context:e,modifications:t,isGeodetic:i};return this._modificationsByContext.set(e,n),this.broadcast(n,"setModifications")}setLegacySchema(e,t){let i=JSON.stringify(t);return this._schemasByContext.set(e,i),this.broadcast({context:e,jsonSchema:i},"setLegacySchema")}destroyContext(e){return this._schemasByContext.delete(e),this._modificationsByContext.delete(e),this.broadcast(e,"destroyContext")}async destroyContextAndSelf(e){await this.destroyContext(e),this.destroy()}project(e,t){return this.invokeMethod("project",e,t)}transformNormals(e,t){return this.invokeMethod("transformNormals",e,t)}}const m=new s.A({deallocator:null}),d=(0,r.vt)();function y(e,t,i,s=!1){m.clear();let r=1/0,o=1/0,h=-1/0,u=-1/0,p=!1;for(let e of t){let t="clip"===e.type?2:+("mask"===e.type),f=e.geometry,d=f.spatialReference??i;if(d!==i&&!(0,a.canProjectWithoutEngine)(d,i)){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}let y=f.rings;if(d!==i){let e=g(f.rings,d,i);if(null==e){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}y=e}let x=y;if(s){let e=(0,c.jZ)(new l.A({rings:y,spatialReference:i}));null!=e&&(y=e.rings)}let w=1===x.length&&y.length>1?[...y.map(e=>[e]),x]:[y];if(w.some(e=>0===e.length||e.some(e=>e.length<3||e.some(e=>!_(e)))))n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (empty ring, fewer than 3 vertices, or non-finite coordinates).",{polygon:f});else{p||=1===t;for(let e of w){m.push(t),m.push(e.length);for(let t of e){m.push(t.length);for(let e of t){let t=e[2]??0;m.push(e[0]),m.push(e[1]),m.push(t),r=Math.min(r,e[0]),o=Math.min(o,e[1]),h=Math.max(h,e[0]),u=Math.max(u,e[1])}}}}}if(null!=e)if(p){let t=1e-4;m.push(2),m.push(2),m.push(4),m.push(r-t),m.push(o-t),m.push(0),m.push(h+t),m.push(o-t),m.push(0),m.push(h+t),m.push(u+t),m.push(0),m.push(r-t),m.push(u+t),m.push(0),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0)}else m.push(1),m.push(1),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0);m.push(3);let f=new Float64Array(m.length);for(let e=0;e<m.length;++e)f[e]=m.at(e);return f}function g(e,t,i){let n=[];for(let s of e){let e=[];for(let n of s){if(!(0,h.F)(n,t,d,i)||!_(d))return null;e.push([d[0],d[1],d[2]])}n.push(e)}return n}function _(e){return Number.isFinite(e[0])&&Number.isFinite(e[1])&&(null==e[2]||Number.isFinite(e[2]))}function x(e,t){let i=0;for(let n of t){let t=n.geometry,s=t.rings.length,r=t.rings.some(e=>e.length<3);if(0!==s&&!r){i+=1,i+=1;for(let n=0;n<t.rings.length;++n){let s=t.rings[n];i+=1;for(let r=0;r<s.length;++r){let s=[e[i+0],e[i+1],e[i+2]];i+=3,t.setPoint(n,r,s)}}}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1869],{69540(e,t,i){var r=i(32198),s=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;let i=e,s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){let t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");let i=t.metadata,r=t.store,s={},l=new Map;for(let t in i){let o=i[t],a=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;let h=this[t],d=null;if("function"==typeof u)d=u(h,e);else if("reference"===u)d=h;else if(d=(0,n.TU)(h,e),null!=h&&null==d)continue;0===a?l.set(t,d):s[t]=d}let u=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){let e=(0,a.oY)(u)?.store;if(e)for(let[t,i]of l)e.set(t,i,0)}return u}};return s=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],s),s},d=h(s.A);i.d(t,["OU",0,h,"Pw",0,d])},66344(e,t,i){i.d(t,{q:()=>a});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,s,o){t=e.id+t;let a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);let l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let 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={},i=[];this._db.forEach((e,r)=>{let s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{let{id:s,name:n}=i;if(r.startsWith(s)){let i=t[n]||0;t[n]=i+e.size}})});let r={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){let r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let s=this._clients.get(e.split(o)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let r=t?.id,s=!0;for(;s;){s=!1;for(let[n,a]of this._db)if(0===a.lifetime&&(!r||n.startsWith(r))){let r=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(let[s,n]of this._db)if(!r||s.startsWith(r)){let r=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,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(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,QA:()=>p,Tj:()=>h,UT:()=>g,aD:()=>_,jJ:()=>u});var r=i(32198),s=i(69622),n=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function m(e){try{return d(await e)}catch(e){return(0,o.QP)(e),c(e)}}function p(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new y(e,t)}let y=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=d(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,r.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,r.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,r.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,r.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},9093(e,t,i){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>s,vt:()=>r});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:r,fromValues:function(e,t,i,r,s,n,o,a,l,u,h,d,c,f,m,p){return[e,t,i,r,s,n,o,a,l,u,h,d,c,f,m,p]}},Symbol.toStringTag,{value:"Module"})),i.d(t,["zK",0,n])},35522(e,t,i){i.d(t,{$A:()=>S,Bw:()=>n,C:()=>o,Cc:()=>F,DI:()=>w,Io:()=>_,Ln:()=>y,Om:()=>C,Qr:()=>d,Re:()=>u,S8:()=>b,T9:()=>p,WQ:()=>l,Z0:()=>T,_S:()=>f,aI:()=>Z,ei:()=>I,fw:()=>O,gL:()=>A,hG:()=>v,hZ:()=>a,hs:()=>g,jk:()=>m,lw:()=>h,m3:()=>x,oW:()=>R,t2:()=>E,tn:()=>c,ze:()=>M});var r=i(51850),s=i(34304);function n(e){let t=e[0],i=e[1],r=e[2];return Math.sqrt(t*t+i*i+r*r)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,i,r){return e[0]=t,e[1]=i,e[2]=r,e}function l(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function u(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function h(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function d(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function c(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function p(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function g(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function y(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e}function _(e,t){let i=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(i*i+r*r+s*s)}function v(e,t){let i=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return i*i+r*r+s*s}function x(e){let t=e[0],i=e[1],r=e[2];return t*t+i*i+r*r}function M(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function w(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t=e){let i=t[0],r=t[1],s=t[2],n=i*i+r*r+s*s;return n>0&&(n=1/Math.sqrt(n),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n),e}function C(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function S(e,t,i){let r=t[0],s=t[1],n=t[2],o=i[0],a=i[1],l=i[2];return e[0]=s*l-n*a,e[1]=n*o-r*l,e[2]=r*a-s*o,e}function F(e,t,i,r){let s=t[0],n=t[1],o=t[2];return e[0]=s+r*(i[0]-s),e[1]=n+r*(i[1]-n),e[2]=o+r*(i[2]-o),e}function T(e,t,i){let r=t[0],s=t[1],n=t[2];return e[0]=i[0]*r+i[4]*s+i[8]*n+i[12],e[1]=i[1]*r+i[5]*s+i[9]*n+i[13],e[2]=i[2]*r+i[6]*s+i[10]*n+i[14],e}function I(e,t,i){let r=t[0],s=t[1],n=t[2];return e[0]=r*i[0]+s*i[3]+n*i[6],e[1]=r*i[1]+s*i[4]+n*i[7],e[2]=r*i[2]+s*i[5]+n*i[8],e}function A(e,t,i){return O(e,t,i[0],i[1],i[2],i[3])}function O(e,t,i,r,s,n){let o=t[0],a=t[1],l=t[2],u=r*l-s*a,h=s*o-i*l,d=i*a-r*o,c=r*d-s*h,f=s*u-i*d,m=i*h-r*u,p=2*n;return e[0]=o+u*p+2*c,e[1]=a+h*p+2*f,e[2]=l+d*p+2*m,e}const P=(0,r.vt)(),z=(0,r.vt)();function E(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Z(e,t){if(e===t)return!0;let i=e[0],r=e[1],n=e[2],o=t[0],a=t[1],l=t[2],u=(0,s.FD)();return Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))}function R(e,t,i){let r=i[0]-t[0],s=i[1]-t[1],n=i[2]-t[2],o=r*r+s*s+n*n;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=s*o,e[2]=n*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const B=u,N=h,Y=d,L=_,j=v,k=n,V=x;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:l,angle:function(e,t){b(P,e),b(z,t);let i=C(P,z);return i>1?0:i<-1?Math.PI:Math.acos(i)},applyTranslation:function(e,t,i){return e[0]=t[0]+i[12],e[1]=t[1]+i[13],e[2]=t[2]+i[14],e},bezier:function(e,t,i,r,s,n){let o=1-n,a=o*o,l=n*n,u=a*o,h=3*n*a,d=3*l*o,c=l*n;return e[0]=t[0]*u+i[0]*h+r[0]*d+s[0]*c,e[1]=t[1]*u+i[1]*h+r[1]*d+s[1]*c,e[2]=t[2]*u+i[2]*h+r[2]*d+s[2]*c,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,i=1){return e[0]=Math.min(Math.max(e[0],t),i),e[1]=Math.min(Math.max(e[1],t),i),e[2]=Math.min(Math.max(e[2],t),i),e},copy:o,cross:S,crossAndNormalize:function(e,t,i){let r=t[0],s=t[1],n=t[2],o=i[0],a=i[1],l=i[2],u=s*l-n*a,h=n*o-r*l,d=r*a-s*o,c=Math.sqrt(u*u+h*h+d*d);return e[0]=u/c,e[1]=h/c,e[2]=d/c,e},direction:R,dist:L,distance:_,div:Y,divide:d,dot:C,equals:Z,exactEquals:E,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,i,r,s,n){let o=n*n,a=o*(2*n-3)+1,l=o*(n-2)+n,u=o*(n-1),h=o*(3-2*n);return e[0]=t[0]*a+i[0]*l+r[0]*u+s[0]*h,e[1]=t[1]*a+i[1]*l+r[1]*u+s[1]*h,e[2]=t[2]*a+i[2]*l+r[2]*u+s[2]*h,e},inverse:w,len:k,length:n,lerp:F,max:p,min:m,mul:N,multiply:h,negate:M,normalize:b,random:function(e,t=1){let i=s.Ov,r=2*i()*Math.PI,n=2*i()-1,o=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=n*t,e},rotateX:function(e,t,i,r){let s=[],n=[];return s[0]=t[0]-i[0],s[1]=t[1]-i[1],s[2]=t[2]-i[2],n[0]=s[0],n[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),n[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},rotateY:function(e,t,i,r){let s=[],n=[];return s[0]=t[0]-i[0],s[1]=t[1]-i[1],s[2]=t[2]-i[2],n[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),n[1]=s[1],n[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},rotateZ:function(e,t,i,r){let s=[],n=[];return s[0]=t[0]-i[0],s[1]=t[1]-i[1],s[2]=t[2]-i[2],n[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),n[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),n[2]=s[2],e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,scaleTo:function(e,t){return g(e,e,t/k(e))},set:a,sign:f,sqrDist:j,sqrLen:V,squaredDistance:v,squaredLength:x,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:B,subtract:u,transformMat3:I,transformMat4:T,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:A,transformQuatValues:O},Symbol.toStringTag,{value:"Module"})),i.d(t,["Il",0,k,"jb",0,B,"lo",0,j,"uE",0,V])},75503(e,t,i){i.d(t,{wq:()=>a});var r=i(4576),s=i(21818),n=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),w.prune(),b.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data,r=this._toBBox;if(v(e,i))for(M.clear();i;){for(let s=0,n=i.children.length;s<n;s++){let n=i.children[s],o=i.leaf?r(n):n;v(e,o)&&(i.leaf?t(n):_(e,o)?l(n,t):M.push(n))}i=M.pop()}}collides(e){let t=this._data,i=this._toBBox;if(!v(e,t))return!1;for(M.clear();t;){for(let r=0,s=t.children.length;r<s;r++){let s=t.children[r],n=t.leaf?i(s):s;if(v(e,n)){if(t.leaf||_(e,n))return!0;M.push(s)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1,l=this._toBBox(e);for(b.clear(),C.clear();i||b.length>0;){if(i||(i=b.pop(),n=b.data[b.length-1],o=C.pop()??0,a=!0),i.leaf&&(t=(0,r.qh)(i.children,(0,s.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),b.push(i),this._condense(b),this;a||i.leaf||!_(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(b.push(i),C.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,r){let s=i-t+1,n=this._maxEntries;if(s<=n){let r=new T(e.slice(t,i+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(s)/Math.log(n)),n=Math.ceil(s/n**(r-1)));let o=new I([]);o.height=r;let a=Math.ceil(s/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){let t=Math.min(s+l-1,i);x(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){let s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,r-1))}}return u(o,this._toBBox),o}_insert(e,t,i){let r=this._toBBox,s=i?e:r(e);b.clear();let n=function(e,t,i,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==i;){let i,r=1/0,s=1/0;for(let n=0,o=t.children.length;n<o;n++){let o=t.children[n],a=m(o),l=g(e,o)-a;l<s?(s=l,r=a<r?a:r,i=o):l===s&&a<r&&(r=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,b);for(n.children.push(e),d(n,s);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,i){for(let r=i;r>=0;r--)d(t.data[r],e)}(s,b,t)}_split(e,t){let i=e.data[t],r=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,r);let n=this._chooseSplitIndex(i,s,r);if(!n)return;let o=i.children.splice(n,i.children.length-n),a=i.leaf?new T(o):new I(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new I([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let r,s,n;r=s=1/0;for(let o=t;o<=i-t;o++){let t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=y(t,a),u=m(t)+m(a);l<r?(r=l,n=o,s=u<s?u:s):l===r&&u<s&&(s=u,n=o)}return n}_chooseSplitAxis(e,t,i){let r=e.leaf?this._compareMinX:c,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,s)&&e.children.sort(r)}_allDistMargin(e,t,i,r){e.children.sort(r);let s=this._toBBox,n=h(e,0,t,s),o=h(e,i-t,i,s),a=p(n)+p(o);for(let r=t;r<i-t;r++){let t=e.children[r];d(n,e.leaf?s(t):t),a+=p(n)}for(let r=i-t-1;r>=t;r--){let t=e.children[r];d(o,e.leaf?s(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){let i=e.data[t];if(0===i.children.length)if(t>0){let s=e.data[t-1],n=s.children;n.splice((0,r.qh)(n,i,n.length,s.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(w.clear();i;){if(!0===i.leaf)for(let e of i.children)t((0,s.z)(e));else w.pushArray(i.children);i=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,r,s){s||=new T([]),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],d(s,e.leaf?r(n):n);return s}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){let i=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,n-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,r,s){let n=[t,i];for(;n.length;){let t=n.pop(),i=n.pop();if(t-i<=r)continue;let a=i+Math.ceil((t-i)/r/2)*r;(0,o.q)(e,a,i,t,s),n.push(i,a,a,t)}}const M=new n.A,w=new n.A,b=new n.A,C=new n.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class T extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class I extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>c,on:()=>d,wB:()=>l,z7:()=>u});var r=i(37955),s=i(36563),n=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,m)}function h(e,t,i={},r){let s=null,o=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){let t=e();o(t,t)}return s}function d(e,t,i,o={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,n.xt)(h),i(e)}let f=l(e,(e,i)=>{d(),(0,r.wb)(e)&&(a=e,u=(0,r.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,s.hA)(()=>{f.remove(),d()}),h}function c(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());let r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((r,n)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),r(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559),i.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},44794(e,t,i){i.d(t,{v:()=>a});var r=i(4718),s=i(62788),n=i(95488);class o{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,s.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=r.gh){return new o(e,t)}},79897(e,t,i){i.d(t,{U:()=>h});var r=i(32198),s=i(69622),n=i(36563),o=i(36708),a=i(76030),l=i(10107),u=i(64108);let h=class extends s.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,i={}){return this._installWatch(e,t,i,o.wB)}addWhen(e,t,i={}){return this._installWatch(e,t,i,o.z7)}addOnCollectionChange(e,t,{initial:i=!1,final:r=!1}={}){let s=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],s),(0,n.hA)(()=>this.removeHandles(s))}consumePromise(e){this.addPromise(e)?.catch(()=>{})}addPromise(e){if(null==e)return e;let t=++this._handleId;this.addHandles((0,n.hA)(()=>{this._pendingPromises.delete(e)&&0===this._pendingPromises.size&&!this.hasHandles(d)&&this._set("updating",!1)}),t),this._pendingPromises.add(e),this._set("updating",!0);let i=()=>this.removeHandles(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,i={},r){let s=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,s);let o=r(e,t,i);return this.addHandles(o,s),(0,n.hA)(()=>this.removeHandles(s))}_installSyncUpdatingWatch(e,t){let i=this._createSyncUpdatingCallback(),r=(0,o.wB)(e,i,{sync:!0,equals:()=>!1});return this.addHandles(r,t),r}_createSyncUpdatingCallback(){return()=>{this.removeHandles(d),++this._scheduleHandleId;let e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)(()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(d))}),d)}}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,r.Cg)([(0,u.$)("esri.core.support.UpdatingHandles")],h);const d=-42},88930(e,t,i){i.d(t,{S1:()=>a,VW:()=>l,lL:()=>u,rb:()=>h,t:()=>d});var r=i(97770),s=(i(98623),i(34747));const n=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function a(e,t,i,n="system"){if("unknown"===i)return e;let o=new s.oh((0,r.wj)(n)),a=s.c9.fromJSDate(e,{zone:o}),l="decades"===i||"centuries"===i?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(i);return"decades"===i&&(t*=10),"centuries"===i&&(t*=100),a.plus({[l]:t}).toJSDate()}function l(e,t,i="milliseconds"){let r=e.getTime(),s=d(t,i,"milliseconds");return new Date(r+s)}function u(e,t,i="system"){let{unit:n}=t,o=Math.max(1,Math.trunc(t.value)),a=new s.oh((0,r.wj)(i)),l=s.c9.fromJSDate(e,{zone:a}),u=e=>e-e%o;switch(n){case"milliseconds":return l.startOf("second").plus({millisecond:u(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:u(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:u(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:u(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:u(l.day-1)}).toJSDate();case"weeks":{let e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:u(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=l.startOf("year"),t=("decades"===n?10:"centuries"===n?100:1)*o,i=e.year-e.year%t;return e.set({year:i}).toJSDate()}case"unknown":return e}}function h(e){let t=n.exec(e);if(!t)return null;let{hh:i,mm:r,ss:s,ms:a}=t.groups;return Number(i)*o.hours+Number(r)*o.minutes+Number(s||0)*o.seconds+Number(a||0)}function d(e,t,i){return 0===e?0:e*o[t]/o[i]}},13069(e,t,i){i.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const r="randomUUID"in crypto;function s(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},87992(e,t,i){i.d(t,{JR:()=>C,ME:()=>M,MY:()=>F,NO:()=>x,Nh:()=>b,V2:()=>P,_s:()=>z,e6:()=>Z,gh:()=>w,jm:()=>S,tr:()=>B,uX:()=>p});var r=i(32198),s=(i(69397),i(16930)),n=i(19419),o=i(60408),a=i(21325),l=i(513),u=i(50954),h=i(79567),d=i(52006),c=i(49663),f=i(46068),m=i(92722);class p{constructor({type:e,spatialReference:t,vertexCount:i,vertexXY:r,vertexZ:s,vertexM:n,partCount:o,partOffsets:a,partFlags:l,segmentFlags:u,segmentIndices:h,segmentParams:d,segmentCountArc:c,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=i,this.vertexXY=r,this.vertexZ=s,this.vertexM=n,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=u,this.segmentIndices=h,this.segmentParams=d,this.segmentCountArc=c,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:i}=this;return e&&e-t-i}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:i,hasZ:r,hasM:s,segmentCountArc:n,segmentCountBezier:o}=this,a=P(e,t,i,r,s,this.hasCurves(),n,o);a.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:u,vertexM:h}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(u.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,i+1)),a.partOffsets.set(e.subarray(0,i+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:i,segmentParams:r,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(i.subarray(0,t),0),a.segmentParams.set(r.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,a.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let i=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,i)=>Math.abs(e-i)>t||isNaN(e)!==isNaN(i);for(let t=0;t<this.vertexCount;++t)if(i(this.vertexXY[2*t],e.vertexXY[2*t])||i(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(i(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new g(this):[][Symbol.iterator]()}}class g{constructor(e){this.geometry=e,this.value=new y(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(e){this.geometry=e,this.index=-1,this._readVertex=A(e),this._segments=new _(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class _{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=A(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,i=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[i++],r=t[i++],s=t[i++],n=t[i++];return{b:[this.end,[e,r],[s,n]]}}let r=t[i++],s=t[i++],n=t[i++],o=t[i++],a=t[i++],l=t[i++];i++,i++;let u=t[i++],h=t[i++];if(!(4&r)&&1===n)return{c:[this.end,[u,h]]};let d=2&r?0:1,c=1&r?0:1;return{a:[this.end,[a,l],d,c,o,s,n]}}}function x(e,t){let i={stack:[],error:void 0,hasError:!1};try{return t??=(0,n.Ie)(),(0,r.mS)(i,new T(e,["vertexZ","vertexM","spatialReference"]),!1),(0,n.bx)(t,function(e){let t,{vertexCount:i,vertexXY:s,vertexZ:o,vertexM:a}=e,l=I(e);if(e.hasCurves()){let i={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(i,new T(e,["vertexZ","vertexM"]),!1);let s=(0,n.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:i}of t.segments)(0,h.e)(s,e,i),e=(0,d.yP)(i)}let[o,a,u,c]=s;t={xmin:o,ymin:a,xmax:u,ymax:c,spatialReference:l}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}else{let e,r,n,o;e=r=1/0,n=o=-1/0;for(let t=0;t<i;++t){let i=s[2*t],a=s[2*t+1];e=Math.min(e,i),n=Math.max(n,i),r=Math.min(r,a),o=Math.max(o,a)}t={xmin:e,ymin:r,xmax:n,ymax:o,spatialReference:l}}if(o){let e=1/0,i=-1/0;for(let t of o)e=Math.min(e,t),i=Math.max(i,t);t.zmin=e,t.zmax=i}if(a){let e=1/0,i=-1/0;for(let t of a)e=Math.min(e,t),i=Math.max(i,t);t.mmin=e,t.mmax=i}return t}(e)),t}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function M(e){let t,i,r;if((0,o.fT)(e)){r="point";let{x:s,y:n,z:o,m:a}=e,l=[s,n];null!=o&&l.push(o),null!=a&&l.push(a),i=[[l]],t=1}else(0,o.U9)(e)?(r="multipoint",i=[e.points],t=e.points.length):(0,o.Rg)(e)?(r="polyline",i=e.curvePaths??e.paths,t=i.reduce((e,t)=>e+t.length,0)):(r="polygon",i=e.curveRings??e.rings,t=i.reduce((e,t)=>(0===t.length||(e+=t.length,O(t[0],(0,d.yP)(t.at(-1)))&&--e),e),0));let s=P(r,t,r.includes("point")?0:i.length,(0,o.Pv)(e),(0,o.W0)(e),(0,d.Ed)(e)),{hasZ:n,hasM:a,vertexXY:l,vertexZ:u,vertexM:h}=s;function c(e){l[2*m]=e[0],l[2*m+1]=e[1],n&&(u[m]=e[2]),a&&(h[m]=e[f]),++m}s.spatialReference=e.spatialReference??void 0;let f=s.hasZ?3:2,m=0;if(!s.isMultipart()){if(!n&&!a){for(let[e,t]of i[0])l[2*m]=e,l[2*m+1]=t,++m;return s}for(let e of i[0])c(e);return s}let p="polygon"===r,{partOffsets:g}=s,y=0;if(!(0,d.Ed)(e)){for(let e of i){if(g[y++]=m,0===e.length)continue;let t=e.length;if(p&&O(e[0],e.at(-1))&&--t,n||a)for(let i=0;i<t;++i)c(e[i]);else for(let i=0;i<t;++i){let[t,r]=e[i];l[2*m]=t,l[2*m+1]=r,++m}}return g[y]=m,s}function _(e){let t=v+e;if(t<=(s.segmentParams?.length??0))return;let i=t*N;i=20*Math.ceil(i/20);let r=s.segmentParams;s.segmentParams=new Float64Array(i),null!=r&&s.segmentParams.set(r)}let v=0;for(let e of i){if(s.partOffsets[y++]=m,0===e.length)continue;let t=e[0],i=t;for(let t=1;t<e.length;++t){let r=e[t];c(i);let n=m-1;(0,d.wY)(r)?(_(10),++s.segmentCountArc,v=z(i,r,s,n,v),i=r.a[0]):(0,d.DA)(r)?(_(10),++s.segmentCountArc,v=E(i,r,s,n,v),i=r.a[0]):(0,d.aO)(r)?(_(10),++s.segmentCountArc,v=Z(i,r,s,n,v),i=r.c[0]):(0,d.n1)(r)?(_(4),++s.segmentCountBezier,v=B(0,r,s,n,v),i=r.b[0]):i=r}p&&O(t,i)||c(i)}return s.partOffsets[y]=m,s}function w(e){let t=A(e),{vertexCount:i,partCount:r,hasZ:s,hasM:n}=e,o=I(e),a=0;if(!e.isMultipart()){if("point"===e.type){let[t,i]=e.vertexXY;return{x:t,y:i,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:o}}let r=[];for(;a<i;)r.push(t(a++));return{points:r,spatialReference:o,hasZ:s,hasM:n}}if(!e.hasCurves()){let i=[];for(let s=0;s<r;++s){let r=!!(1&e.partFlags[s]),n=e.partOffsets[s+1],o=[];for(;a<n;)o.push(t(a++));r&&o.length>0&&o.push([...o[0]]),i.push(o)}return"polygon"===e.type?{rings:i,hasZ:s,hasM:n,spatialReference:o}:{paths:i,hasZ:s,hasM:n,spatialReference:o}}let l=[];for(let{segments:t,startVertex:i}of e.parts){let e=[i];for(let{curve:i}of t)e.push(i);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:s,hasM:n,spatialReference:o}:{paths:[],curvePaths:l,hasZ:s,hasM:n,spatialReference:o}}function b(e,{lengths:t,coords:i,hasZ:r,hasM:s},n){let o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);r??=!1,s??=!1;let u=P(e,l,o,r,s,!1,0,0);if(u.spatialReference=n??void 0,!u.isMultipart()){for(let e=0,t=0;e<l;++e)u.vertexXY[2*e]=i[t++],u.vertexXY[2*e+1]=i[t++],r&&(u.vertexZ[e]=i[t++]),s&&(u.vertexM[e]=i[t++]);return u}let h=2+Number(r)+Number(s),d=0,c=0;u.partOffsets[0]=0;for(let e of t){let t=u.partOffsets[c],n=t+e-Number(a);u.partOffsets[++c]=n;for(let e=t;e<n;++e)u.vertexXY[2*e]=i[d++],u.vertexXY[2*e+1]=i[d++],r&&(u.vertexZ[e]=i[d++]),s&&(u.vertexM[e]=i[d++]);a&&(d+=h)}return u}function C({type:e,vertexCount:t,vertexXY:i,vertexZ:r,vertexM:s,partCount:n,partOffsets:o,partFlags:a,hasZ:l,hasM:u}){let h=new m.A([],[],l,u);n=Math.max(n,1);let d=0;for(let e=0;e<n;++e){let n=o?.[e+1]??t,c=h.coords.length;for(let e=d;e<n;++e)h.coords.push(i[2*e],i[2*e+1]),l&&h.coords.push(r[e]),u&&h.coords.push(s[e]);if(a&&1&a[e]){let e=d;h.coords.push(i[2*e],i[2*e+1]),l&&h.coords.push(r[e]),u&&h.coords.push(s[e])}h.lengths.push((h.coords.length-c)/h.stride),d=n}return"point"===e&&(h.lengths.length=0),h}function S(...e){let t=new Set;for(let i of e){if(!i)continue;let e=[i.vertexXY,i.vertexZ,i.vertexM,i.partOffsets,i.partFlags,i.segmentFlags,i.segmentIndices,i.segmentParams];for(let i of e){let e=i?.buffer;e&&t.add(e)}}return Array.from(t)}function F(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,i=e.isCustomWkid()?0:e.getOldID();if(i<=0)return{wkt:t};let r=e.getLatestID();(r<=0||r===i)&&(r=void 0);let s=e.getVCS();if(null==s)return{wkid:i,latestWkid:r,wkt:t};let n=s.isCustomWkid()?0:s.getOldID();if(n<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===n)&&(o=void 0),{wkid:i,wkt:t,latestWkid:r,vcsWkid:n,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class T{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let i of t)e[i]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function I({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function A({vertexXY:e,vertexZ:t,vertexM:i}){return t?i?r=>[e[2*r],e[2*r+1],t[r],i[r]]:i=>[e[2*i],e[2*i+1],t[i]]:i?t=>[e[2*t],e[2*t+1],i[t]]:t=>[e[2*t],e[2*t+1]]}function O(e,t){return e.every((e,i)=>e===t[i])}function P(e,t,i,r,s,n,o,a){o??=0,a??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:i,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a}),u=2*Float64Array.BYTES_PER_ELEMENT*t;r&&(u+=Float64Array.BYTES_PER_ELEMENT*t),s&&(u+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(u+=(i+1)*Int32Array.BYTES_PER_ELEMENT,u+=(i+1)*Int8Array.BYTES_PER_ELEMENT),n&&(u+=t*Int8Array.BYTES_PER_ELEMENT,u+=t*Int32Array.BYTES_PER_ELEMENT,u+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let h=new ArrayBuffer(u),d=0;return l.vertexXY=new Float64Array(h,d,2*t),d+=l.vertexXY.byteLength,r&&(l.vertexZ=new Float64Array(h,d,t),d+=l.vertexZ.byteLength),s&&(l.vertexM=new Float64Array(h,d,t),d+=l.vertexM.byteLength),n&&(l.segmentParams=new Float64Array(h,d,l.segmentParamCount),d+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,d,t),l.segmentIndices.fill(Y),d+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(h,d,i+1),d+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,d,i+1),d+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,i).fill(1)),n&&(l.segmentFlags=new Int8Array(h,d,t),l.segmentFlags.fill(1),d+=l.segmentFlags.byteLength),l}function z(e,t,{segmentFlags:i,segmentIndices:r,segmentParams:s},n,o){i[n]=4,r[n]=o;let[a,[l,u],h,d,c,m,p]=t.a,g=4;d||(g|=1),h||(g|=2);let y=(0,f.SW)(e,t),[_,v]=(0,f.Uk)(y,.5);return s[o++]=g,s[o++]=m,s[o++]=p,s[o++]=c,s[o++]=l,s[o++]=u,s[o++]=y.u2-y.u1,s[o++]=y.u1,s[o++]=_,s[o++]=v,o}function E(e,t,{segmentFlags:i,segmentIndices:r,segmentParams:s},n,o){i[n]=4,r[n]=o;let a=(0,c.io)(e,t);return R(a,4,...(0,l.mq)(a,.5),s,o)}function Z(e,t,{segmentFlags:i,segmentIndices:r,segmentParams:s},n,o){return i[n]=4,r[n]=o,R((0,u.pM)(e,t),0,...t.c[1],s,o)}function R(e,t,i,r,s,n){let{cx:o,cy:a,thetaStart:l,thetaEnd:u,radius:h}=e;return l>u||(t|=1),Math.abs(u-l)<=Math.PI||(t|=2),s[n++]=t,s[n++]=h,s[n++]=1,s[n++]=0,s[n++]=o,s[n++]=a,s[n++]=u-l,s[n++]=l,s[n++]=i,s[n++]=r,n}function B(e,{b:[t,[i,r],[s,n]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},u,h){return o[u]=2,a[u]=h,l[h++]=i,l[h++]=r,l[h++]=s,l[h++]=n,h}const N=1.61803,Y=-1},48526(e,t,i){i.d(t,{A:()=>g});var r,s=i(32198),n=i(4576),o=i(4718),a=i(91429),l=i(5443),u=i(91075),h=i(86738),d=i(16930),c=i(90634),f=i(47610),m=i(56993),p=i(43937);let g=r=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:i,hasZ:r,spatialReference:s}=e;switch(t??=[],t?.at(0)?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return s??=d.A.WGS84,{...e,hasM:i,hasZ:r,points:t,spatialReference:s}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,c.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:i,hasZ:s}=this;return new r({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:i,hasZ:s})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,i=e.spatialReference;return!(null!=t!=(null!=i)||null!=t&&null!=i&&!t.equals(i))&&(0,n.aI)(this.points,e.points,f.v6)}addPoint(e){return(0,m.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],i={x:t[0],y:t[1],spatialReference:this.spatialReference},r=2;return this.hasZ&&(i.z=t[2],r=3),this.hasM&&(i.m=t[r]),new h.A(i)}removePoint(e){if(!this._validateInputs(e))return null;let t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)&&((0,m.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],g.prototype,"cache",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],g.prototype,"extent",null),(0,s.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],g.prototype,"points",void 0),(0,s.Cg)([(0,p.K)("points")],g.prototype,"writePoints",null),g=r=(0,s.Cg)([(0,a.$K)("esri.geometry.Multipoint")],g),g.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),n=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),h=i(16930),d=i(90634),c=i(56993),f=i(43937);let m=r=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:i,hasZ:r,spatialReference:s}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return s??=h.A.WGS84,{...e,hasM:i,hasZ:r,paths:t,spatialReference:s}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,n.o8)(e)}get extent(){let e=(0,d.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,n.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,i=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let r=[];for(let t=0,i=e.length;t<i;t++)r[t]=e[t].toArray();t[i]=r}else t[i]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new r;return e.spatialReference=this.spatialReference,e.paths=(0,n.o8)(this.paths),e.curvePaths=(0,n.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let i=this.paths[e][t],r=this.hasZ,s=this.hasM;return r&&!s?new u.A(i[0],i[1],i[2],void 0,this.spatialReference):s&&!r?new u.A(i[0],i[1],void 0,i[2],this.spatialReference):r&&s?new u.A(i[0],i[1],i[2],i[3],this.spatialReference):new u.A(i[0],i[1],this.spatialReference)}insertPoint(e,t,i){return this._validateInputs(e,t,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e].splice(t,0,i),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],i=this.spatialReference,r=t.map(e=>new u.A(e,i));return this.notifyChange("paths"),r}removePoint(e,t){if(!this._validateInputs(e,t))return null;let i=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(e,t,i){return this._validateInputs(e,t)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e][t]=i,this.notifyChange("paths")),this}_validateInputs(e,t,i=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let r=this.paths[e];if(i&&(t<0||t>r.length)||!i&&(t<0||t>=r.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],m.prototype,"curvePaths",void 0),(0,s.Cg)([(0,f.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,s.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,s.Cg)([(0,f.K)("paths")],m.prototype,"writePaths",null),m=r=(0,s.Cg)([(0,o.$K)("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0},4197(e,t,i){i.d(t,{Vj:()=>o,cj:()=>n,jh:()=>s});var r=i(9093);function s(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function n(e){return[...e]}function o(e){let t=(0,r.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},70328(e,t,i){i.d(t,{BI:()=>T,C:()=>o,DC:()=>c,Ej:()=>v,Ie:()=>S,Jt:()=>F,Lu:()=>M,Ne:()=>w,RF:()=>d,TF:()=>y,VL:()=>m,aI:()=>A,fA:()=>a,gE:()=>u,gX:()=>_,hZ:()=>C,iT:()=>f,is:()=>I,pg:()=>x,uJ:()=>g,vI:()=>b,vY:()=>l,vt:()=>n,w1:()=>h,yr:()=>p}),i(35522);var r=i(5443),s=(i(19419),i(4197));function n(e=P){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let i=0;i<6;i++)e[i]=t[i];return e}function a(e,t,i,r,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=s,a[5]=o,a}function l(e,t=n()){return function(e,t,i,r=n()){return C(r,O),function(e,t,i=0,r=t.length/3){let s=e[0],n=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)s=Math.min(s,t[i+3*e]),n=Math.min(n,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(r,e,t,i),r}(e,0,e.length/3,t)}function u(e,t=(0,s.jh)(24)){let[i,r,n,o,a,l]=e;return t[0]=i,t[1]=r,t[2]=n,t[3]=i,t[4]=r,t[5]=l,t[6]=i,t[7]=a,t[8]=n,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=r,t[14]=n,t[15]=o,t[16]=r,t[17]=l,t[18]=o,t[19]=a,t[20]=n,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function d(e,t,i=e){i[0]=Math.min(e[0],t[0]),i[1]=Math.min(e[1],t[1]),i[2]=Math.min(e[2],t[2]),i[3]=Math.max(e[3],t[3]),i[4]=Math.max(e[4],t[4]),i[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,i,r]){!function(e,t,i,r){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.min(e[2],r),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],i),e[5]=Math.max(e[5],r)}(e,t,i,r)}function m(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function g(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){let t=m(e),i=g(e),r=p(e);return t*t+i*i+r*r}function _(e,t=[0,0,0]){return t[0]=e[0]+m(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+g(e)/2,t}function v(e,t=[0,0,0]){return t[0]=m(e),t[1]=p(e),t[2]=g(e),t}function x(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function M(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function w(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function b(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function C(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function S(e){return e?C(e,O):n(O)}function F(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function T(e,t,i,r,s){return e[0]=t,e[1]=i,e[2]=-1/0,e[3]=r,e[4]=s,e[5]=1/0,e}function I(e){return 6===e.length}function A(e,t,i){if(null==e||null==t)return e===t;if(!I(e)||!I(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const O=[1/0,1/0,1/0,-1/0,-1/0,-1/0],P=[0,0,0,0,0,0];n(),i.d(t,["qv",0,O,"v_",0,P])},46329(e,t,i){i.d(t,{y:()=>d});var r=i(49186),s=i(4305),n=i(513),o=i(50954),a=i(52006),l=i(49663),u=i(46068),h=i(59803);function d(e,t,i){if((0,a.Xq)(t))return(0,h.T)(e,t,i);if((0,a.n1)(t)){let n=(0,s.m_)(e,t,i)[0];if(null==n)throw new r.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return n}if((0,a.aO)(t)){let r=(0,o.pM)(e,t);return(0,n.fM)(r,i)}if((0,a.DA)(t)){let r=(0,l.io)(e,t);return(0,n.fM)(r,i)}let d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},60408(e,t,i){function r(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":r(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function d(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>s,W0:()=>d,ZC:()=>r,fT:()=>n,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>c});var r=i(5443),s=i(91075),n=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof s.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?r.A.fromJSON(e):null}const d={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function c(e){return e&&d[e]||null}},50498(e,t,i){var r=i(66552),s=i(5443),n=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),c={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},f=new r.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});i.d(t,["Ye",0,d,"gy",0,h,"iI",0,f,"yR",0,c])},97770(e,t,i){i.d(t,{Ey:()=>O,F8:()=>A,J2:()=>S,Yq:()=>T,_m:()=>F,iS:()=>I,wj:()=>P});var r=i(66552),s=i(73444),n=i(98623),o=i(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},f={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},p={...m,second:"numeric"},g={hourCycle:"h23"},y={...m,...g},_={...p,...g},v={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...y},"short-date-long-time":{...h,...p},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...y},"short-date-le-long-time":{...h,...p},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...m},"long-month-day-year-short-time-24":{...d,...y},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,..._},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...m},"day-short-month-year-short-time-24":{...c,...y},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,..._},"long-date":f,"long-date-short-time":{...f,...m},"long-date-short-time-24":{...f,...y},"long-date-long-time":{...f,...p},"long-date-long-time-24":{...f,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":p},x=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),M={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function w(){let e=(0,s.lR)();return(e&&M[e])??(0,s.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(M.bs="sr-Latn-CS");let b=new WeakMap;const C=v["short-date-short-time"];function S(e){return v[e]}function F(e){let{dateStyle:t,timeStyle:i,hour12:r,year:s,month:n}=e,o={};return t?o.dateStyle=t:s&&(o.year=s,o.month=n||void 0),i&&!o.year&&(o.timeStyle=i,o.hour12="auto"===r?void 0:"always"===r),o}function T(e,t=C){return function(e){let t=b.get(e);if(!t){let i=w(),r=P(e.timeZone??"system"),s={...e,timeZone:r};t=new Intl.DateTimeFormat(i,s),b.set(e,t)}return t}(t).format(e)}function I(e,t=C){return T(new Date(e),{...t,...u,...l})}function A(e,t=C){return T(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function O(e,t=C){let i=o.c9.fromISO(e,{setZone:!0});if(!i.isValid)return e;if(t.timeZone)return T(i.toJSDate(),t);let r=0===i.offset?"UTC":t.timeZone,s={...t,timeZone:r};return i.toLocaleString(s,{locale:w()})}function P(e){switch(e){case"system":return n.N;case n.L:return"UTC";default:return e}}(0,s.Ml)(()=>{b=new WeakMap}),i.d(t,["_v",0,x])},73444(e,t,i){i.d(t,{JK:()=>l,Ml:()=>g,QC:()=>d,lR:()=>h,oQ:()=>m});var r=i(36563);let s;i(44208);const n=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){let e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return n??e??t??"en"}function l(){return void 0===s&&(s=a()),s}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=l()){return c(e)?.language}function d(e=l()){let t=c(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function c(e=l()){return u.exec(e)?.groups}const f=[];function m(e){return f.push(e),(0,r.hA)(()=>{f.splice(f.indexOf(e),1)})}new Map;const p=[];function g(e){return p.push(e),(0,r.hA)(()=>p.splice(p.indexOf(e),1))}function y(){let e=a();s!==e&&([...p].forEach(t=>t(e)),s=e,[...f].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",y),o&&new MutationObserver(()=>{y()}).observe(o,{attributeFilter:["lang"]})},6518(e,t,i){i.d(t,{F:()=>a});var r=i(44208),s=i(75503),n=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((i,r)=>{e[t++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,n.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},39357(e,t,i){i.d(t,{A:()=>a});var r,s=i(32198),n=i(25482),o=i(91429);let a=r=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,s.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=r=(0,s.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,i){i.d(t,{A:()=>h});var r,s=i(32198),n=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{r=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){let i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new r({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,s.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,s.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=r=(0,s.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,i){i.d(t,{A:()=>u});var r=i(32198),s=i(66552),n=i(25482),o=i(91429),a=i(93223);const l=new s.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),n=i(66552),o=i(25482),a=i(91429),l=i(78888),u=i(8631),h=i(98453),d=i(36005),c=i(93223);const f=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",marginOfError:"margin-of-error",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let m=class extends o.o{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch{}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch{}return i?f.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,s.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"description",void 0),(0,s.Cg)([(0,d.w)("description")],m.prototype,"readDescription",null),(0,s.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],m.prototype,"domain",void 0),(0,s.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,s.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,s.Cg)([(0,c.e)(h.m)],m.prototype,"type",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,s.Cg)([(0,d.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,s.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.Field")],m)},95466(e,t,i){i.d(t,{A:()=>u});var r=i(49186),s=i(53966),n=i(12195),o=i(30524),a=i(98623),l=i(56400);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],d(e))}static fromLayerJSON(e){return new u(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let i=[];for(let e of this.fields){let t=e?.name,r=(0,o.GZ)(t);if(t&&r){let s=(0,o.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,o.te)(e)&&!(0,o.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)(0,o.te)(e)||(0,o.Xz)(e)||e.nullable||void 0!==(0,o.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,o.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?a.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,n.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){let t=new Map;if(!e.fields)return t;let i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",u=(r?"endField"in r?r.endField:r.endTimeField:"")??"",d=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.ZS)(e.dateFieldsTimeReference):null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??d:s.dateFieldsTimeReference?(0,l.ZS)(s.dateFieldsTimeReference):d??"UTC":null,f=r?function(e){return"timeZone"in e}(r)?r.timeZone??d:r.timeReference?(0,l.ZS)(r.timeReference):d:null,m=new Map([[(0,o.NF)(s?.creationDateField??""),c],[(0,o.NF)(s?.editDateField??""),c],[(0,o.NF)(n),f],[(0,o.NF)(u),f]]);for(let{name:r,type:s}of e.fields)if(h.has(s))t.set(r,a.L);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,a.L);else{let e=m.get((0,o.NF)(r??""))??d;t.set(r,e)}return t}},91806(e,t,i){i.d(t,{A:()=>l});var r,s=i(32198),n=i(25482),o=i(91429),a=i(78888);let l=class extends n.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,s.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=r=(0,s.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},41628(e,t,i){i.d(t,{A:()=>l});var r,s=i(32198),n=i(91429),o=i(76357),a=i(93223);let l=class extends o.A{static{r=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new r({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,s.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,s.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=r=(0,s.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},87045(e,t,i){i.d(t,{A:()=>v});var r,s=i(32198),n=i(66552),o=i(25482),a=i(86211),l=i(91429),u=i(78888),h=i(86738),d=i(16930),c=i(21325),f=i(28735),m=i(91806),p=i(72802),g=i(36005),y=i(43937);const _=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let v=class extends o.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:n=d.A.WebMercator,numLODs:o=24}=e;if(!(0,c.fn)(n)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new m.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new m.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new h.A(0,0,n),size:[s,s],spatialReference:n})}let l=(0,c.Vp)(n),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):l?new h.A({x:l.origin[0],y:l.origin[1],spatialReference:n}):new h.A({x:0,y:0,spatialReference:n}),f=1/(39.37*(0,a.GA)(n)*96),p=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;p.push(new m.A({level:e,scale:t,resolution:r}))}else{let e=(0,c.EA)(n)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(o/t);p.push(new m.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,s=i*f;p.push(new m.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:p,origin:u,size:[s,s],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,c.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){let s,n,o=this.lodAt(e);if(!o)return null;if("number"==typeof t)s=t,n=i;else if((0,c.aI)(t.spatialReference,this.spatialReference))s=t.x,n=t.y,r=i;else{let e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,n=e.y,r=i}let a=o.resolution*this.size[0],l=o.resolution*this.size[1];return r??=new p.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-n)/l+.001),r.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,s=i.resolution*this.size[0]/2**r,n=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+n,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,s=r*this.size[0],n=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+s,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],s=this.lods.length-t;for(let e=0;e<s;e++){let r=e+t,{scale:s,resolution:n}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new m.A({level:e,scale:s,resolution:n}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,s.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,s.Cg)([(0,g.w)("origin")],v.prototype,"readOrigin",null),(0,s.Cg)([(0,l.MZ)({type:[m.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,s.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,s.Cg)([(0,g.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,s.Cg)([(0,y.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],v.prototype,"writeSize",null),(0,s.Cg)([(0,l.MZ)({type:d.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=r=(0,s.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],v)},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},8631(e,t,i){i.d(t,{r:()=>c,g:()=>d});var r,s=i(53177),n=i(76357),o=i(32198),a=i(91429),l=i(93223);let u=class extends n.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=i(41628);const d={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":s.A,inherited:u}};function c(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return s.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,i){const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});i.d(t,["m",0,r])},73133(e,t,i){const r=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});i.d(t,["j",0,r])},31756(e,t,i){var r=i(86211),s=i(79258);const n={unknown:1,inches:(0,r.oU)(1,"meters","inches"),feet:(0,r.oU)(1,"meters","feet"),"us-feet":(0,r.oU)(1,"meters","us-feet"),yards:(0,r.oU)(1,"meters","yards"),miles:(0,r.oU)(1,"meters","miles"),"nautical-miles":(0,r.oU)(1,"meters","nautical-miles"),millimeters:(0,r.oU)(1,"meters","millimeters"),centimeters:(0,r.oU)(1,"meters","centimeters"),decimeters:(0,r.oU)(1,"meters","decimeters"),meters:(0,r.oU)(1,"meters","meters"),kilometers:(0,r.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.vl)(1,"meters",s.$O.radius)};i.d(t,["j",0,n])},63746(e,t,i){function r(e){return class{constructor(){for(let t of e)this[t]=null}}}function s(e,t=1){let{transform:i,hasZ:r,hasM:s}=e;if(null==i)return r&&1!==t?e=>{e[2]*=t}:null;let[n,o]=function(e,t,i,r){let{scale:s,translate:n,originPosition:o}=e;return"upperLeft"===o&&(s=s.map((e,t)=>1===t?-e:e)),t&&(s=s.map((e,t)=>2===t?e*r:e),n=n.map((e,t)=>2===t?e*r:e)),!t&&i&&(s=s.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[s,n]}(i,r,s,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}i.d(t,{M:()=>s,_:()=>r})},2991(e,t,i){i.d(t,{G9:()=>u,RZ:()=>l});var r=i(39516);const s="=",n=">=",o="<=";function a(e,t,i,s){let n=s.get(e)?.type,o=s.getTimeZone(e);return`${(0,r.iA)(e)} ${t} ${(0,r.YG)(i,{type:"date"},{type:n,timeZone:o})}`}function l(e,t,i,l){if(!t||!i)return;let{startField:u,endField:h}=t,{start:d,end:c}=e;if(!d&&!c||!u&&!h)return;let f=u??h,m=h??u;if(f&&m){if(d&&c){if(d.getTime()===c.getTime())return(0,r.mA)(l,a(f,s,d,i));if(!u||!h){let e=a(f,n,d,i),t=a(f,o,c,i);return(0,r.mA)(l,(0,r.mA)(e,t))}let e=a(u,n,d,i),t=a(h,o,c,i);return(0,r.mA)(l,(0,r.mA)(e,t))}if(d)return(0,r.mA)(l,a(f,n,d,i));if(c)return(0,r.mA)(l,a(m,o,c,i))}}function u(e){let{start:t,end:i}=e;if(t||i){if(!t&&i)return`null,${i.getTime()}`;if(!i&&t)return`${t.getTime()},null`;if(i&&t)return t.getTime()===i.getTime()?`${t.getTime()}`:`${t.getTime()},${i.getTime()}`}}},88625(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),n=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(91429),h=i(30524);let d=r=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new r({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],d.prototype,"expression",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],d.prototype,"title",void 0),d=r=(0,s.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],d);const c=d;var f=i(16271),m=i(36005),p=i(43937);const g=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,r){t[i]=e.write({},r),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){let{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,s.Cg)([(0,u.MZ)({type:c,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),(0,s.Cg)([(0,m.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),(0,s.Cg)([(0,p.K)("featureExpressionInfo",{featureExpressionInfo:{type:c},"featureExpression.value":{type:[0]}})],_.prototype,"writeFeatureExpressionInfo",null),(0,s.Cg)([(0,u.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],_.prototype,"mode",null),(0,s.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),(0,s.Cg)([(0,u.MZ)({type:f.KQ,json:{type:String,read:y.read,write:y.write}})],_.prototype,"unit",null),_=(0,s.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],_)},16271(e,t,i){i.d(t,{Ao:()=>n});var r=i(4576),s=i(31756);function n(e){return 1/(s.j[e]||1)}const o=function(){let e=Object.keys(s.j);return(0,r.TF)(e,"decimal-degrees"),e.sort(),e}();i.d(t,["KQ",0,o])},79677(e,t,i){i.d(t,{A:()=>d});var r,s=i(32198),n=i(25482),o=i(88930),a=i(91429),l=(i(98623),i(10184)),u=i(36005),h=i(43937);let d=class extends n.o{static{r=this}static get allTime(){return c}static get empty(){return f}static fromArray(e){return new r({start:null==e[0]?e[0]:new Date(e[0]),end:null==e[1]?e[1]:new Date(e[1])})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null==t.end?null:new Date(t.end)}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null==t.start?null:new Date(t.start)}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;let t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&=(0,o.lL)(i,new l.A({value:1,unit:e}),t);let s=this.end;if(s){let i=(0,o.lL)(s,new l.A({value:1,unit:e}),t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();let t,i,s=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,o=e.start?.getTime()??-1/0,a=e.end?.getTime()??1/0;return o>=s&&o<=n?t=o:s>=o&&s<=a&&(t=s),n>=o&&n<=a?i=n:a>=s&&a<=n&&(i=a),null==t||null==i||isNaN(t)||isNaN(i)?r.empty:new r({start:t===-1/0?null:new Date(t),end:i===1/0?null:new Date(i)})}offset(e,t,i="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();let s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,i)),null!=a&&(s.end=(0,o.S1)(a,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();let t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,u.w)("end")],d.prototype,"readEnd",null),(0,s.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.w)("start")],d.prototype,"readStart",null),(0,s.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=r=(0,s.Cg)([(0,a.$K)("esri.time.TimeExtent")],d);const c=new d,f=new d({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>h});var r=i(32198),s=i(69540),n=i(25482),o=i(88930),a=i(91429),l=i(73133),u=i(93223);let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r.Cg)([(0,u.e)(l.j,{nonNullable:!0})],h.prototype,"unit",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),h=(0,r.Cg)([(0,a.$K)("esri.time.TimeInterval")],h)},20401(e,t,i){i.r(t),i.d(t,{default:()=>Pe});var r=i(32198),s=i(65529),n=i(17676),o=i(36708),a=i(91429),l=i(79897),u=i(16930),h=i(65864),d=i(4576),c=i(49186),f=i(53966),m=i(87992),p=i(70328),g=i(6518),y=i(50498),_=i(69397),v=i(27647);class x{constructor(e=null,t={},i,r,s=0,n=null){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=s,this.distance=n}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}get usedMemory(){return 128+(0,_.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,m.JR)(this.geometry)),this.centroid}}const M={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new x((0,m.Nh)(y.gy.fromJSON(i),t),e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry&&(0,m.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)},w=(0,p.vt)();class b{constructor(e,t,i){this.geometryType=e,this.hasZ=t,this.hasM=i,this._boundsStore=new g.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=M}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=this._featuresById.size,t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,i,r,s]=this.fullBounds;return{xmin:t,ymin:i,xmax:r,ymax:s,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(d.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let i of e){let e=this._boundsStore.get(i.objectId);e&&t((0,p.Jt)(w,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new c.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let i,r=this._featuresById.get(t);r?(e.displayId=r.displayId,i=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0):this.onFeatureAdd?.(e),e.geometry?(this._boundsStore.set(t,(0,m.NO)(e.geometry,i)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new c.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:r,attributes:s}=e;for(let e in s)i.attributes[e]=s[e];return r&&(i.geometry=r,this._boundsStore.set(t,(0,m.NO)(r)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var C=i(75752),S=i(87045),F=i(72802),T=i(97552),I=i(88625),A=i(66344),O=i(91869),P=i(86211),z=i(52006),E=i(16271);function Z(e=!1,t){if(e){let{elevationInfo:e,alignPointsInFeatures:i}=t;return new B(e,i)}return new R}class R{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class B{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new A.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){let r=this._elevationInfo;return null==r||"absolute-height"!==r.mode||r.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){let{offset:r,unit:s}=i;if(null==r)return;let n=(0,P.G9)(t),o=r*((0,E.Ao)(s??"meters")/n);for(let t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,z.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,r),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){let r=new Map;for(let t of e)(0,O.tE)(r,t.objectId,L).push(t);let[s,o,a]=this._prepareQuery(r,t),l=await this._alignPointsInFeatures(s,i);if((0,n.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(s,l,o);let{drapedObjectIds:u,failedObjectIds:h}=l,d=[];for(let t of e){let{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||d.push(t)}return d}_prepareQuery(e,t){let i=[],r=[];for(let[t,s]of e){let e=[];for(let i of s)this._addToQueriesOrCachedResult(t,i.target,e,r),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,r),this._addToQueriesOrCachedResult(t,i.end,e,r));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},r,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,r){let s=Y(e,t),n=this._alignmentsCache.get(s);null==n?i.push(t):r.push(new N(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:r},s){for(let e of s)e.apply();let n=0,o=this._alignmentsCache;for(let{objectId:s,points:a}of e.pointsInFeatures){if(r.has(s)){n+=a.length;continue}let e=!i.has(s);for(let i of a){let r=Y(s,i),a=t[n++];i.z=a,e&&o.put(r,a,1)}}}}class N{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function Y(e,{x:t,y:i,z:r,spatialReference:s}){return`${e}-${t}-${i}-${r??0}}-wkid:${s?.wkid}`}function L(){return[]}class j{filter(e,t){return t}notifyElevationSourceChange(){}}class k{filter(e,t){let{point:i,distance:r}=e,{z:s}=i;if(null==s||0===t.length)return t;let n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(r),o=this._updateCandidatesTo3D(t,i,n).filter(V);return o.sort(J),o}_updateCandidatesTo3D(e,t,i){for(let r of e)switch(r.type){case"edge":q(r,t,i);continue;case"vertex":X(r,t,i);continue}return e}}function V(e){return e.distance<=1}function D(e=!1){return e?new k:new j}function q(e,t,{x:i,y:r,z:s}){let{start:n,end:o,target:a}=e;if(e.curve)throw Error("Curves are not yet supported.");e.draped||function(e,t,i,r){let s=r.x-i.x,n=r.y-i.y,o=r.z-i.z,a=s*s+n*n+o*o,l=(t.x-i.x)*s+(t.y-i.y)*n+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+s*u,d=i.y+n*u,c=i.z+o*u;e.x=h,e.y=d,e.z=c}(a,t,n,o);let l=(t.x-a.x)/i,u=(t.y-a.y)/r,h=(t.z-a.z)/s;e.distance=Math.sqrt(l*l+u*u+h*h)}function X(e,t,{x:i,y:r,z:s}){let{target:n}=e,o=(t.x-n.x)/i,a=(t.y-n.y)/r,l=(t.z-n.z)/s;e.distance=Math.sqrt(o*o+a*a+l*l)}function J(e,t){return e.distance-t.distance}var G=i(4718),U=i(799);function H(e=!1,t){return e?new W(t):new $}class ${async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new A.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];let i=[],r=[],s=this._candidatesCache;for(let t of e){let e=K(t),n=s.get(e);if(n)for(let e of n)r.push((0,G.o8)(e));else i.push(t),s.put(e,[],1)}if(0===i.length)return r;let o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);let u=[],{length:h}=a;for(let e=0;e<h;++e){let t=a[e],r=K(i[l[e]]),n=s.get(r);n.push(t),s.put(r,n,n.length),u.push((0,G.o8)(t))}return r.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function K(e){switch(e.type){case"vertex":{let{objectId:t,target:i}=e,r=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(r).toString()}case"edge":{let{objectId:t,start:i,end:r}=e,s=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${r.x}-${r.y}-${r.z??0}`;return(0,U.Wm)(s).toString()}default:return""}}var Q=i(69622),ee=i(60999),te=i(3483),ie=i(13069),re=i(5443),se=i(19419),ne=i(92722),oe=i(54339);class ae{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new ae;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var le=i(60694),ue=i(62815),he=i(63746);class de{constructor(e){this._options=e,this.featureSet=new ae,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1,this._pointBuffer=null,this._pointBufferOffset=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(let e of this.featureSet.features)e.objectId=(0,oe.W)(e,this._idInfo);let{spatialReference:e,features:t}=this.featureSet;if(e)for(let{geometry:i}of t)i&&(i.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,he._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){let{hasZ:t,hasM:i}=this.featureSet;this.featureSet.features.at(-1).centroid=new ne.A([],e,t,i)}geometry(e,t,i){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:r,hasM:s}=this.featureSet;r??=!1,s??=!1,this._vertex=[0,0],r&&this._vertex.push(0),s&&this._vertex.push(0);let n=y.gy.fromJSON(t);this._isPolygon="polygon"===n;let o=Number(this._isPolygon),a="point"===n?1:i.reduce((e,t)=>e+t-o,0),l="point"===n?0:i.length;if(this._geometry="point"===n?this._allocatePoint():(0,m.V2)(n,a,l,r,s,!1),this._push=r?s?de._pushXYZM:de._pushXYZ:s?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+i[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){let t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,i,r){let{hasZ:s,hasM:n}=this.featureSet;s??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;let o=y.gy.fromJSON(e);this._isPolygon="polygon"===o;let a=Number(!this._isPolygon),l=t.length,u=0,h=0,d=a*l;for(let e=0;e<i.length;++e)switch(d+=r[e],i[e]){case 1:case 3:u+=r[e];continue;case 2:h+=r[e]}this._geometry=(0,m.V2)(o,d,l,s,n,!0,u,h);let{partOffsets:c}=this._geometry;c[0]=0;for(let e=0,i=0;e<l;++e){c[e+1]=c[e]+a;for(let s=0;s<t[e];++s)c[e+1]+=r[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,i,r){this._transform(e,this._vertex),this._push(this),this._transformXY(t,me.b[0]),this._transformXY(i,me.b[1]),this._transformXY(r,me.b[2]),this._i=(0,m.tr)(this._vertex,me,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,ce.c[0]),this._transformXY(i,ce.c[1]),this._i=(0,m.e6)(this._vertex,ce,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,i,r,s,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.a[0]),this._transformXY(i,fe.a[1]),fe.a[2]=r,fe.a[3]=s,fe.a[4]=n,fe.a[5]=o,fe.a[6]=a,this._i=(0,m._s)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}_allocatePoint(){let{hasZ:e,hasM:t}=this.featureSet,i=Float64Array.BYTES_PER_ELEMENT*(2+Number(e)+Number(t));if(this._pointBuffer??=new ArrayBuffer(32*i),this._pointBufferOffset>=this._pointBuffer.byteLength){let e=Math.floor(this._pointBuffer.byteLength/i*1.5);this._pointBuffer=new ArrayBuffer(e*i),this._pointBufferOffset=0}let r=new Float64Array(this._pointBuffer,this._pointBufferOffset,2);this._pointBufferOffset+=r.byteLength;let s=new m.uX({type:"point",vertexCount:1,vertexXY:r,vertexZ:void 0,vertexM:void 0,partCount:0,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:0,segmentCountBezier:0});return e&&(s.vertexZ=new Float64Array(this._pointBuffer,this._pointBufferOffset,1),this._pointBufferOffset+=s.vertexZ.byteLength),t&&(s.vertexM=new Float64Array(this._pointBuffer,this._pointBufferOffset,1),this._pointBufferOffset+=s.vertexM.byteLength),s}static _pushXY(e){let t=e._iVertex++,{vertexXY:i}=e._geometry;[i[2*t],i[2*t+1]]=e._vertex}static _pushXYZ(e){let t=e._iVertex++,{vertexXY:i,vertexZ:r}=e._geometry;[i[2*t],i[2*t+1],r[t]]=e._vertex}static _pushXYM(e){let t=e._iVertex++,{vertexXY:i,vertexM:r}=e._geometry;[i[2*t],i[2*t+1],r[t]]=e._vertex}static _pushXYZM(e){let t=e._iVertex++,{vertexXY:i,vertexM:r,vertexZ:s}=e._geometry;[i[2*t],i[2*t+1],s[t],r[t]]=e._vertex}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:i,transform:r}=this.featureSet,s=i?(0,ue.d)(e,t):1;this._transformInPlace??=(0,he.M)(this.featureSet,s),this._transformInPlaceXY??=(0,he.M)({transform:r})}_transform(e,t){for(let i=0;i<e.length;++i)t[i]=e[i];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const ce={c:[[0,0],[0,0]]},fe={a:[[0,0],[0,0],0,0,0,0,0]},me={b:[[0,0],[0,0],[0,0]]};var pe=i(80893);class ge{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,ee.UT)(async e=>{let i=await(0,ee.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,ee.UT)(async i=>{let r=await(0,ee.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,r.ok?r.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){let e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ye=class extends Q.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){let e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){let t=this._get("outFields"),i=(0,te.KC)(e,this._mandatoryOutFields);(0,te.aI)(i,t)||(this._set("outFields",i),(0,te.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){let t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){let t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){let t=this._get("tileInfo");t!==e&&(null==e||null==t||JSON.stringify(e)!==JSON.stringify(t))&&(this._set("tileInfo",e),this.store.tileInfo=e)}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,d.aI)(e,t,({id:e},{id:t})=>e===t)}),this._updatingHandles.addWhen(()=>!this.suspended,()=>this._process())}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(let e of this._pendingTiles.values())e.reset();let t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,ee.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,le.Wo)(this.url))return;let e=(0,ee.UT)(async e=>{try{let t=await(0,pe.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(let e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;let e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(let{data:t,resolution:i}of e.missingTiles){let e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t of this.tilesOfInterest){let i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(let e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){let e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(let t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<xe}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;let i=this.tileSize*t;return Me/(i*i)*e<we}_ensureFetchAllCounts(e){let t=!0;for(let i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.consumePromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){let e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){let i=new ge(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ve,signal:t})}async _fetchFeatures(e,t,i){let r=0,s=[],n=0,o=t;for(;;){let a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,r,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(r+=a.num),n+=u.length;for(let e of u)s.push(e);if(o=t-n,!l||!h||o<=0)return s}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){let t=this.globalIdField,i=this.objectIdField;if(null==t)throw Error("Expected globalIdField to be defined");let r=null,s=e&&(0,ie.AG)(e);if(this.store.featureStore.forEach(e=>{s===(0,ie.AG)(e.attributes[t])&&(r=e.objectId??e.attributes[i])}),null==r)throw Error(`Expected to find a feature with globalId ${e}`);return r}_queryFeaturesById(e,t){let i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new ae:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){let{sourceSpatialReference:i}=this;return await(0,pe.IJ)(this.url,e,new de({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:ve,signal:t})}async _queryFeaturesJSON(e,t){let{sourceSpatialReference:i}=this;return function({exceededTransferLimit:e,features:t,fields:i,geometryType:r,hasM:s,hasZ:n,spatialReference:o,transform:a},l){let u=new ae;u.exceededTransferLimit=e??!1;for(let e of t??[]){let t,i;r&&(t=e.geometry&&(0,m.ME)(e.geometry),i=e.centroid&&new ne.A([],[e.centroid.x,e.centroid.y]));let s=(0,oe.W)(e,l);u.features.push(new x(t,e.attributes,i,s,void 0,e.distance))}return u.fields=i??u.fields,u.geometryType=r??null,u.hasM=s??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,pe.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:ve,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){let t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){let t=this._createBaseQuery(e),i=null==e?.key?null:this.store.getAttributesForTile(e?.key?.id),r=(0,te.KC)((0,te.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(r),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){let t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,se.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;let{supportsMaxRecordCountFactor:r,supportsCacheHint:s,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=r?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||s)&&n?n:o||_e);return e.start=t,r?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"url",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"currentVersion",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"objectIdField",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"globalIdField",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"capabilities",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"sourceSpatialReference",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"spatialReference",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"store",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],ye.prototype,"_minimumVerticesPerFeature",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"_mandatoryOutFields",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"outFields",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"suspended",void 0),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"_historicMoment",void 0),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"filter",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"customParameters",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],ye.prototype,"_configuration",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"tileInfo",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"tileSize",null),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"tilesOfInterest",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],ye.prototype,"updating",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],ye.prototype,"availability",void 0),(0,r.Cg)([(0,a.MZ)()],ye.prototype,"hasZ",null),ye=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ye);const _e=2e3,ve=6e5,xe=1e6,Me=25,we=1;i(44208);class be{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){let t=this._priorities.get(e);if(null==t)return!0;for(let[e]of this._store){let i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){let{_priorities:t}=this;for(let[i,r]of this._store)if(!t.has(i)&&e(r,i))return!0;for(let[i]of t){let t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Ce=class extends Q.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new g.F,this._tiles=new be,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,se.vt)()}add(e,t){for(let e of t)this._referenceFeature(e.objectId);let i=this.featureStore.upsertMany(t),r=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,te.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),s=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),r),s&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;let{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(let i of e.objectIds)if(1===this._refCounts.get(i)){let e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){let i=this._tiles.get(e);if(i)return!i.objectIds.size||(0,te.Yy)(t,i.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){let r=e.id;this._tiles.set(r,new Se(e,t,i)),this._tileBounds.set(r,e.extent),this._tileFeatureCounts.set(r,t.size)}_remove({id:e}){let t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){let t=[];for(let i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);let i=e.key.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(let t of this._tiles.values()){for(let i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(let t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;let{features:r}=await t(e,i);for(let e of r){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,se.Ie)(this._tmpBoundingRect);let t=(0,m.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{let i=this._tiles.get(t);this.featureStore.add(e);let r=e.objectId;i.objectIds.has(r)||(i.objectIds.add(r),this._referenceFeature(r),this._tileFeatureCounts.set(i.key.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,se.HY)((0,se.VY)(this.extent,this._tmpBoundingRect),e.extent)||this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??"")||this._hasAttributesForTile(e.id,i))return new Te(e);let r=this._createTileTree(e,this.tileInfo);return this._simplify(r,t,null,0,1),this._collectMissingTiles(e,r,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,r){let s=this._tileFeatureCounts.get(e.id);return s??(s=await(0,pe.gW)(t,i,r),this._tileFeatureCounts.set(e.id,s)),s}_createTileTree(e,t){let i=new Fe(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,r=>{let s=this._tiles.get(r)?.key;s&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;let i=e.level<t.level,r=i?e:t,s=i?t:e,n=1<<s.level-r.level;return Math.floor(s.row/n)===r.row&&Math.floor(s.col/n)===r.col}(e,s)&&this._populateChildren(i,s,t,this._tileFeatureCounts.get(s.id)||0)}),i}_populateChildren(e,t,i,r){let s=t.level-e.level-1;if(s<0)return void(e.isLeaf=!0);let n=t.row>>s,o=t.col>>s,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,r);else{let s=new Fe(e.level+1,n,o);i.updateTileInfo(s,1),e.children[l]=s,this._populateChildren(s,t,i,r)}}_simplify(e,t,i,r,s){let n=s*s;if(e.isLeaf)return t(this.getFeatureCount(e),s)?0:(this._remove(e),null!=i&&(i.children[r]=null),n);let o=s/2,a=o*o,l=0;for(let i=0;i<e.children.length;i++){let r=e.children[i];l+=null==r?a:this._simplify(r,t,e,i,o)}return 0===l?this._mergeChildren(e):1-l/n<Ae&&(this._purge(e),null!=i&&(i.children[r]=null),l=n),l}_mergeChildren(e){let t,i=new Set;this._forEachLeaf(e,e=>{let r=this._tiles.get(e.id);if(r){t=t?(0,te.E$)(t,r.attributeKeys):new Set(r.attributeKeys);for(let e of r.objectIds)i.has(e)||(i.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,i,t??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,i.size)}_forEachLeaf(e,t){for(let i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){let i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,r){let s=new Ie(i,e,this.extent);return this._collectMissingTilesRecurse(t,s,1,r),s.info}_collectMissingTilesRecurse(e,t,i,r){let s=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,r);if(s&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(s||t.addMissing(e.level,e.row,e.col,i));let n=i/2;for(let i=0;i<e.children.length;i++){let s=e.children[i];null==s?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),n):this._collectMissingTilesRecurse(s,t,n,r)}}_referenceFeature(e){let t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){let t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],Ce.prototype,"featureStore",void 0),(0,r.Cg)([(0,a.MZ)()],Ce.prototype,"tileInfo",void 0),(0,r.Cg)([(0,a.MZ)()],Ce.prototype,"extent",void 0),(0,r.Cg)([(0,a.MZ)()],Ce.prototype,"maximumByteSize",void 0),Ce=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Ce);class Se{constructor(e,t,i){this.key=e,this.objectIds=t,this.attributeKeys=i}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,se.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Ie{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=i&&(this._extent=(0,se.VY)(i))}addMissing(e,t,i,r){let s=new F.U(e,t,i);this._tileInfo.updateTileInfo(s,1)&&(null==this._extent||(0,se.HY)(this._extent,s.extent))&&(this.info.missingTiles.push({data:s,resolution:r}),this.info.coveredArea-=(0,se.Wc)(s.extent))}}const Ae=.18751;let Oe=class extends s.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=Z(),this._elevationFilter=D(),this._symbologyCandidatesFetcher=H(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{let i={query:e},r=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,n.Te)(t),r},this._getSymbologyCandidates=async(e,t)=>{let i={candidates:e,spatialReference:this._spatialReference.toJSON()},r=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,n.Te)(t),r}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};let{geometryType:t,objectIdField:i,timeInfo:r,fieldsIndex:s}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new b(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new C.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:s,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:r}),this._featureFetcher=new ye({store:new Ce({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});let l="3d"===e.configuration.viewType;return this._elevationAligner=Z(l,{elevationInfo:null==e.elevationInfo?null:I.A.fromJSON(e.elevationInfo),alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=D(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),ze}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,ze}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),ze}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);let i=function(e,t){let i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};let{distance:r,units:s,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:r,units:s,spatialRel:n,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),r=t?.signal,s=await this._queryEngine.executeQueryForSnapping(i,r);(0,n.Te)(r);let o=await this._elevationAligner.alignCandidates(s.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,r);(0,n.Te)(r);let a=await this._symbologyCandidatesFetcher.fetch(o,r);(0,n.Te)(r);let l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null==e.tileInfo?null:S.A.fromJSON(e.tileInfo),ze}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),ze}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),ze}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),ze}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),ze}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),ze}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),ze}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=H(e,this._getSymbologyCandidates),ze}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null==e.filter?null:T.A.fromJSON(e.filter),this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,r.Cg)([(0,a.MZ)({readOnly:!0})],Oe.prototype,"updating",null),(0,r.Cg)([(0,a.MZ)()],Oe.prototype,"_isInitializing",void 0),Oe=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Oe);const Pe=Oe,ze={result:{}}}}]);