@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
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9177],{60999(t,e,r){r.d(e,{DZ:()=>p,Ke:()=>f,QA:()=>g,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var n=r(32198),a=r(69622),i=r(97768),s=r(17676),o=r(10107),l=r(64108);function u(t,e,r){return(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))}async function h(t,e,r){return(await(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))).map(t=>t.value)}function c(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:Error("no promise provided")};try{return c(await t)}catch(t){return d(t)}}async function p(t){try{return c(await t)}catch(t){return(0,s.QP)(t),d(t)}}function g(t){if(!0===t.ok)return t.value;throw t.error}function m(t,e){return new M(t,e)}let M=class extends a.A{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=t(r),this.promise.then(t=>{this._result=c(t),this._cleanup()},t=>{this._result=d(t),this._cleanup()}),this._abortHandle=(0,s.u7)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,o.MZ)()],M.prototype,"value",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"error",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"finished",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"promise",void 0),(0,n.Cg)([(0,o.MZ)()],M.prototype,"_result",void 0),M=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],M);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let t;this._sequence=new Promise(e=>{t=this._sequence.then(()=>e,()=>e)});let e=await t;return{[Symbol.dispose]:e}}async run(t){let e={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(e,await this.acquire(),!1),await t()}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}}},9093(t,e,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>a,vt:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:n,fromValues:function(t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g){return[t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["zK",0,i])},58083(t,e,r){r.d(e,{$0:()=>M,$h:()=>I,B8:()=>h,C:()=>i,D_:()=>o,N9:()=>b,O7:()=>x,Qw:()=>u,Tl:()=>d,X_:()=>_,e$:()=>p,eL:()=>g,hM:()=>y,hZ:()=>s,hs:()=>f,kN:()=>m,l:()=>A,lw:()=>c,mg:()=>l,o1:()=>R,sC:()=>S,t2:()=>P,t5:()=>C,tZ:()=>L,ut:()=>U});var n=r(51850),a=r(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function s(t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g,m){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t[4]=i,t[5]=s,t[6]=o,t[7]=l,t[8]=u,t[9]=h,t[10]=c,t[11]=d,t[12]=f,t[13]=p,t[14]=g,t[15]=m,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function l(t,e){if(t===e){let r=e[1],n=e[2],a=e[3],i=e[6],s=e[7],o=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=a,t[13]=s,t[14]=o}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){return h(t,e)||o(t),t}function h(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],M=e[15],y=r*o-n*s,b=r*l-a*s,v=r*u-i*s,w=n*l-a*o,S=n*u-i*o,_=a*u-i*l,A=h*g-c*p,R=h*m-d*p,x=h*M-f*p,I=c*m-d*g,C=c*M-f*g,E=d*M-f*m,P=y*E-b*C+v*I+w*x-S*R+_*A;return P?(P=1/P,t[0]=(o*E-l*C+u*I)*P,t[1]=(a*C-n*E-i*I)*P,t[2]=(g*_-m*S+M*w)*P,t[3]=(d*S-c*_-f*w)*P,t[4]=(l*x-s*E-u*R)*P,t[5]=(r*E-a*x+i*R)*P,t[6]=(m*v-p*_-M*b)*P,t[7]=(h*_-d*v+f*b)*P,t[8]=(s*C-o*x+u*A)*P,t[9]=(n*x-r*C-i*A)*P,t[10]=(p*S-g*v+M*y)*P,t[11]=(c*v-h*S-f*y)*P,t[12]=(o*R-s*I-l*A)*P,t[13]=(r*I-n*R+a*A)*P,t[14]=(g*b-p*w-m*y)*P,t[15]=(h*w-c*b+d*y)*P,t):null}function c(t,e,r){let n=e[0],a=e[1],i=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],M=e[14],y=e[15],b=r[0],v=r[1],w=r[2],S=r[3];return t[0]=b*n+v*o+w*c+S*g,t[1]=b*a+v*l+w*d+S*m,t[2]=b*i+v*u+w*f+S*M,t[3]=b*s+v*h+w*p+S*y,b=r[4],v=r[5],w=r[6],S=r[7],t[4]=b*n+v*o+w*c+S*g,t[5]=b*a+v*l+w*d+S*m,t[6]=b*i+v*u+w*f+S*M,t[7]=b*s+v*h+w*p+S*y,b=r[8],v=r[9],w=r[10],S=r[11],t[8]=b*n+v*o+w*c+S*g,t[9]=b*a+v*l+w*d+S*m,t[10]=b*i+v*u+w*f+S*M,t[11]=b*s+v*h+w*p+S*y,b=r[12],v=r[13],w=r[14],S=r[15],t[12]=b*n+v*o+w*c+S*g,t[13]=b*a+v*l+w*d+S*m,t[14]=b*i+v*u+w*f+S*M,t[15]=b*s+v*h+w*p+S*y,t}function d(t,e,r){let n=r[0],a=r[1],i=r[2];if(e===t)t[12]=e[0]*n+e[4]*a+e[8]*i+e[12],t[13]=e[1]*n+e[5]*a+e[9]*i+e[13],t[14]=e[2]*n+e[6]*a+e[10]*i+e[14],t[15]=e[3]*n+e[7]*a+e[11]*i+e[15];else{let r=e[0],s=e[1],o=e[2],l=e[3],u=e[4],h=e[5],c=e[6],d=e[7],f=e[8],p=e[9],g=e[10],m=e[11];t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=u,t[5]=h,t[6]=c,t[7]=d,t[8]=f,t[9]=p,t[10]=g,t[11]=m,t[12]=r*n+u*a+f*i+e[12],t[13]=s*n+h*a+p*i+e[13],t[14]=o*n+c*a+g*i+e[14],t[15]=l*n+d*a+m*i+e[15]}return t}function f(t,e,r){let n=r[0],a=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*a,t[5]=e[5]*a,t[6]=e[6]*a,t[7]=e[7]*a,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function p(t,e,r,n){let s=n[0],o=n[1],l=n[2],u=Math.sqrt(s*s+o*o+l*l);if(u<=(0,a.FD)())return void i(t,e);u=1/u,s*=u,o*=u,l*=u;let h=Math.sin(r),c=Math.cos(r),d=1-c,f=e[0],p=e[1],g=e[2],m=e[3],M=e[4],y=e[5],b=e[6],v=e[7],w=e[8],S=e[9],_=e[10],A=e[11],R=s*s*d+c,x=o*s*d+l*h,I=l*s*d-o*h,C=s*o*d-l*h,E=o*o*d+c,P=l*o*d+s*h,U=s*l*d+o*h,L=o*l*d-s*h,T=l*l*d+c;t[0]=f*R+M*x+w*I,t[1]=p*R+y*x+S*I,t[2]=g*R+b*x+_*I,t[3]=m*R+v*x+A*I,t[4]=f*C+M*E+w*P,t[5]=p*C+y*E+S*P,t[6]=g*C+b*E+_*P,t[7]=m*C+v*E+A*P,t[8]=f*U+M*L+w*T,t[9]=p*U+y*L+S*T,t[10]=g*U+b*L+_*T,t[11]=m*U+v*L+A*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function g(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[4],s=e[5],o=e[6],l=e[7],u=e[8],h=e[9],c=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*a+u*n,t[5]=s*a+h*n,t[6]=o*a+c*n,t[7]=l*a+d*n,t[8]=u*a-i*n,t[9]=h*a-s*n,t[10]=c*a-o*n,t[11]=d*a-l*n,t}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function M(t,e,r){if(0===e)return o(t);let n=r[0],i=r[1],s=r[2],l=Math.sqrt(n*n+i*i+s*s);if(l<=(0,a.FD)())return null;l=1/l,n*=l,i*=l,s*=l;let u=Math.sin(e),h=Math.cos(e),c=1-h;return t[0]=n*n*c+h,t[1]=i*n*c+s*u,t[2]=s*n*c-i*u,t[3]=0,t[4]=n*i*c-s*u,t[5]=i*i*c+h,t[6]=s*i*c+n*u,t[7]=0,t[8]=n*s*c+i*u,t[9]=i*s*c-n*u,t[10]=s*s*c+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,r){let n=e[0],a=e[1],i=e[2],s=e[3],o=n+n,l=a+a,u=i+i,h=n*o,c=n*l,d=n*u,f=a*l,p=a*u,g=i*u,m=s*o,M=s*l,y=s*u;return t[0]=1-(f+g),t[1]=c+y,t[2]=d-M,t[3]=0,t[4]=c-y,t[5]=1-(h+g),t[6]=p+m,t[7]=0,t[8]=d+M,t[9]=p-m,t[10]=1-(h+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}const w=(0,n.vt)();function S(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _(t,e){let r=e[0],n=e[1],a=e[2],i=e[4],s=e[5],o=e[6],l=e[8],u=e[9],h=e[10];return t[0]=Math.sqrt(r*r+n*n+a*a),t[1]=Math.sqrt(i*i+s*s+o*o),t[2]=Math.sqrt(l*l+u*u+h*h),t}function A(t,e){let r=e[0]+e[5]+e[10],n=0;return r>0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t}function R(t,e,r,n){let a=e[0],i=e[1],s=e[2],o=e[3],l=a+a,u=i+i,h=s+s,c=a*l,d=a*u,f=a*h,p=i*u,g=i*h,m=s*h,M=o*l,y=o*u,b=o*h,v=n[0],w=n[1],S=n[2];return t[0]=(1-(p+m))*v,t[1]=(d+b)*v,t[2]=(f-y)*v,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(c+m))*w,t[6]=(g+M)*w,t[7]=0,t[8]=(f+y)*S,t[9]=(g-M)*S,t[10]=(1-(c+p))*S,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function x(t,e,r,n,a){let i=e[0],s=e[1],o=e[2],l=e[3],u=i+i,h=s+s,c=o+o,d=i*u,f=i*h,p=i*c,g=s*h,m=s*c,M=o*c,y=l*u,b=l*h,v=l*c,w=n[0],S=n[1],_=n[2],A=a[0],R=a[1],x=a[2],I=(1-(g+M))*w,C=(f+v)*w,E=(p-b)*w,P=(f-v)*S,U=(1-(d+M))*S,L=(m+y)*S,T=(p+b)*_,k=(m-y)*_,q=(1-(d+g))*_;return t[0]=I,t[1]=C,t[2]=E,t[3]=0,t[4]=P,t[5]=U,t[6]=L,t[7]=0,t[8]=T,t[9]=k,t[10]=q,t[11]=0,t[12]=r[0]+A-(I*A+P*R+T*x),t[13]=r[1]+R-(C*A+U*R+k*x),t[14]=r[2]+x-(E*A+L*R+q*x),t[15]=1,t}function I(t,e,r,n,a,i,s){let o=1/(r-e),l=1/(a-n),u=1/(i-s);return t[0]=2*i*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*l,t[6]=0,t[7]=0,t[8]=(r+e)*o,t[9]=(a+n)*l,t[10]=(s+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*i*2*u,t[15]=0,t}function C(t,e,r,n){let i=e[0],s=e[1],l=e[2],u=i-r[0],h=s-r[1],c=l-r[2],d=(0,a.FD)();if(Math.abs(u)<d&&Math.abs(h)<d&&Math.abs(c)<d)return void o(t);let f=1/Math.sqrt(u*u+h*h+c*c);u*=f,h*=f,c*=f;let p=n[0],g=n[1],m=n[2],M=g*c-m*h,y=m*u-p*c,b=p*h-g*u;f=Math.sqrt(M*M+y*y+b*b),f?(f=1/f,M*=f,y*=f,b*=f):(M=0,y=0,b=0);let v=h*b-c*y,w=c*M-u*b,S=u*y-h*M;f=Math.sqrt(v*v+w*w+S*S),f?(f=1/f,v*=f,w*=f,S*=f):(v=0,w=0,S=0),t[0]=M,t[1]=v,t[2]=u,t[3]=0,t[4]=y,t[5]=w,t[6]=h,t[7]=0,t[8]=b,t[9]=S,t[10]=c,t[11]=0,t[12]=-(M*i+y*s+b*l),t[13]=-(v*i+w*s+S*l),t[14]=-(u*i+h*s+c*l),t[15]=1}function E(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function P(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function U(t){let e=(0,a.FD)(),r=t[0],n=t[1],i=t[2],s=t[4],o=t[5],l=t[6],u=t[8],h=t[9],c=t[10];return Math.abs(1-(r*r+s*s+u*u))<=e&&Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+l*l+c*c))<=e}function L(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=c,k=E;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t},adjoint:function(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],M=e[15];return t[0]=o*(d*M-f*m)-c*(l*M-u*m)+g*(l*f-u*d),t[1]=-(n*(d*M-f*m)-c*(a*M-i*m)+g*(a*f-i*d)),t[2]=n*(l*M-u*m)-o*(a*M-i*m)+g*(a*u-i*l),t[3]=-(n*(l*f-u*d)-o*(a*f-i*d)+c*(a*u-i*l)),t[4]=-(s*(d*M-f*m)-h*(l*M-u*m)+p*(l*f-u*d)),t[5]=r*(d*M-f*m)-h*(a*M-i*m)+p*(a*f-i*d),t[6]=-(r*(l*M-u*m)-s*(a*M-i*m)+p*(a*u-i*l)),t[7]=r*(l*f-u*d)-s*(a*f-i*d)+h*(a*u-i*l),t[8]=s*(c*M-f*g)-h*(o*M-u*g)+p*(o*f-u*c),t[9]=-(r*(c*M-f*g)-h*(n*M-i*g)+p*(n*f-i*c)),t[10]=r*(o*M-u*g)-s*(n*M-i*g)+p*(n*u-i*o),t[11]=-(r*(o*f-u*c)-s*(n*f-i*c)+h*(n*u-i*o)),t[12]=-(s*(c*m-d*g)-h*(o*m-l*g)+p*(o*d-l*c)),t[13]=r*(c*m-d*g)-h*(n*m-a*g)+p*(n*d-a*c),t[14]=-(r*(o*m-l*g)-s*(n*m-a*g)+p*(n*l-a*o)),t[15]=r*(o*d-l*c)-s*(n*d-a*c)+h*(n*l-a*o),t},copy:i,determinant:function(t){let e=t[0],r=t[1],n=t[2],a=t[3],i=t[4],s=t[5],o=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*s-r*i)*(c*m-d*g)-(e*o-n*i)*(h*m-d*p)+(e*l-a*i)*(h*g-c*p)+(r*o-n*s)*(u*m-d*f)-(r*l-a*s)*(u*g-c*f)+(n*l-a*o)*(u*p-h*f)},equals:function(t,e){if(t===e)return!0;let r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=t[8],d=t[9],f=t[10],p=t[11],g=t[12],m=t[13],M=t[14],y=t[15],b=e[0],v=e[1],w=e[2],S=e[3],_=e[4],A=e[5],R=e[6],x=e[7],I=e[8],C=e[9],E=e[10],P=e[11],U=e[12],L=e[13],T=e[14],k=e[15],q=(0,a.FD)();return Math.abs(r-b)<=q*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(n-v)<=q*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(i-w)<=q*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(s-S)<=q*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(o-_)<=q*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(l-A)<=q*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-R)<=q*Math.max(1,Math.abs(u),Math.abs(R))&&Math.abs(h-x)<=q*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(c-I)<=q*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(d-C)<=q*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(f-E)<=q*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(p-P)<=q*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(g-U)<=q*Math.max(1,Math.abs(g),Math.abs(U))&&Math.abs(m-L)<=q*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(M-T)<=q*Math.max(1,Math.abs(M),Math.abs(T))&&Math.abs(y-k)<=q*Math.max(1,Math.abs(y),Math.abs(k))},exactEquals:P,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=r+r,o=n+n,l=a+a,u=r*s,h=n*s,c=n*o,d=a*s,f=a*o,p=a*l,g=i*s,m=i*o,M=i*l;return t[0]=1-c-p,t[1]=h+M,t[2]=d-m,t[3]=0,t[4]=h-M,t[5]=1-u-p,t[6]=f+g,t[7]=0,t[8]=d+m,t[9]=f-g,t[10]=1-u-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let r=w,n=-e[0],a=-e[1],i=-e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=n*n+a*a+i*i+s*s;return c>0?(r[0]=2*(o*s+h*n+l*i-u*a)/c,r[1]=2*(l*s+h*a+u*n-o*i)/c,r[2]=2*(u*s+h*i+o*a-l*n)/c):(r[0]=2*(o*s+h*n+l*i-u*a),r[1]=2*(l*s+h*a+u*n-o*i),r[2]=2*(u*s+h*i+o*a-l*n)),v(t,e,r),t},fromRotation:M,fromRotationTranslation:v,fromRotationTranslationScale:R,fromRotationTranslationScaleOrigin:x,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:m,fromXRotation:y,fromYRotation:function(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:b,frustum:I,getRotation:A,getScale:_,getTranslation:S,hasIdentityRotation:L,identity:o,invert:h,invertOrIdentity:u,isOrthoNormal:U,lookAt:C,mul:T,multiply:c,multiplyScalar:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},multiplyScalarAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},ortho:function(t,e,r,n,a,i,s){let o=1/(e-r),l=1/(n-a),u=1/(i-s);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*o,t[13]=(a+n)*l,t[14]=(s+i)*u,t[15]=1,t},perspective:function(t,e,r,n,a){let i,s=1/Math.tan(e/2);return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(i=1/(n-a),t[10]=(a+n)*i,t[14]=2*a*n*i):(t[10]=-1,t[14]=-2*n),t},perspectiveFromFieldOfView:function(t,e,r,n){let a=Math.tan(e.upDegrees*Math.PI/180),i=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),o=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+o),u=2/(a+i);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(s-o)*l*.5,t[9]=(a-i)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},rotate:p,rotateX:g,rotateY:function(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[0],s=e[1],o=e[2],l=e[3],u=e[8],h=e[9],c=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*a-u*n,t[1]=s*a-h*n,t[2]=o*a-c*n,t[3]=l*a-d*n,t[8]=i*n+u*a,t[9]=s*n+h*a,t[10]=o*n+c*a,t[11]=l*n+d*a,t},rotateZ:function(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[0],s=e[1],o=e[2],l=e[3],u=e[4],h=e[5],c=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*a+u*n,t[1]=s*a+h*n,t[2]=o*a+c*n,t[3]=l*a+d*n,t[4]=u*a-i*n,t[5]=h*a-s*n,t[6]=c*a-o*n,t[7]=d*a-l*n,t},scale:f,set:s,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:k,subtract:E,targetTo:function(t,e,r,n){let a=e[0],i=e[1],s=e[2],o=n[0],l=n[1],u=n[2],h=a-r[0],c=i-r[1],d=s-r[2],f=h*h+c*c+d*d;f>0&&(f=1/Math.sqrt(f),h*=f,c*=f,d*=f);let p=l*d-u*c,g=u*h-o*d,m=o*c-l*h;return f=p*p+g*g+m*m,f>0&&(f=1/Math.sqrt(f),p*=f,g*=f,m*=f),t[0]=p,t[1]=g,t[2]=m,t[3]=0,t[4]=c*m-d*g,t[5]=d*p-h*m,t[6]=h*g-c*p,t[7]=0,t[8]=h,t[9]=c,t[10]=d,t[11]=0,t[12]=a,t[13]=i,t[14]=s,t[15]=1,t},translate:d,transpose:l},Symbol.toStringTag,{value:"Module"}))},35522(t,e,r){r.d(e,{$A:()=>R,Bw:()=>i,C:()=>s,Cc:()=>x,DI:()=>S,Io:()=>y,Ln:()=>M,Om:()=>A,Qr:()=>c,Re:()=>u,S8:()=>_,T9:()=>g,WQ:()=>l,Z0:()=>I,_S:()=>f,aI:()=>k,ei:()=>C,fw:()=>P,gL:()=>E,hG:()=>b,hZ:()=>o,hs:()=>m,jk:()=>p,lw:()=>h,m3:()=>v,oW:()=>q,t2:()=>T,tn:()=>d,ze:()=>w});var n=r(51850),a=r(34304);function i(t){let e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function l(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function u(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function h(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function g(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function M(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function y(t,e){let r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return Math.sqrt(r*r+n*n+a*a)}function b(t,e){let r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return r*r+n*n+a*a}function v(t){let e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function _(t,e=t){let r=e[0],n=e[1],a=e[2],i=r*r+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function R(t,e,r){let n=e[0],a=e[1],i=e[2],s=r[0],o=r[1],l=r[2];return t[0]=a*l-i*o,t[1]=i*s-n*l,t[2]=n*o-a*s,t}function x(t,e,r,n){let a=e[0],i=e[1],s=e[2];return t[0]=a+n*(r[0]-a),t[1]=i+n*(r[1]-i),t[2]=s+n*(r[2]-s),t}function I(t,e,r){let n=e[0],a=e[1],i=e[2];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12],t[1]=r[1]*n+r[5]*a+r[9]*i+r[13],t[2]=r[2]*n+r[6]*a+r[10]*i+r[14],t}function C(t,e,r){let n=e[0],a=e[1],i=e[2];return t[0]=n*r[0]+a*r[3]+i*r[6],t[1]=n*r[1]+a*r[4]+i*r[7],t[2]=n*r[2]+a*r[5]+i*r[8],t}function E(t,e,r){return P(t,e,r[0],r[1],r[2],r[3])}function P(t,e,r,n,a,i){let s=e[0],o=e[1],l=e[2],u=n*l-a*o,h=a*s-r*l,c=r*o-n*s,d=n*c-a*h,f=a*u-r*c,p=r*h-n*u,g=2*i;return t[0]=s+u*g+2*d,t[1]=o+h*g+2*f,t[2]=l+c*g+2*p,t}const U=(0,n.vt)(),L=(0,n.vt)();function T(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function k(t,e){if(t===e)return!0;let r=t[0],n=t[1],i=t[2],s=e[0],o=e[1],l=e[2],u=(0,a.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))}function q(t,e,r){let n=r[0]-e[0],a=r[1]-e[1],i=r[2]-e[2],s=n*n+a*a+i*i;return s>0?(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=u,O=h,D=c,H=y,Z=b,G=i,N=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(t,e){_(U,t),_(L,e);let r=A(U,L);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,n,a,i){let s=1-i,o=s*s,l=i*i,u=o*s,h=3*i*o,c=3*l*s,d=l*i;return t[0]=e[0]*u+r[0]*h+n[0]*c+a[0]*d,t[1]=e[1]*u+r[1]*h+n[1]*c+a[1]*d,t[2]=e[2]*u+r[2]*h+n[2]*c+a[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:s,cross:R,crossAndNormalize:function(t,e,r){let n=e[0],a=e[1],i=e[2],s=r[0],o=r[1],l=r[2],u=a*l-i*o,h=i*s-n*l,c=n*o-a*s,d=Math.sqrt(u*u+h*h+c*c);return t[0]=u/d,t[1]=h/d,t[2]=c/d,t},direction:q,dist:H,distance:y,div:D,divide:c,dot:A,equals:k,exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,n,a,i){let s=i*i,o=s*(2*i-3)+1,l=s*(i-2)+i,u=s*(i-1),h=s*(3-2*i);return t[0]=e[0]*o+r[0]*l+n[0]*u+a[0]*h,t[1]=e[1]*o+r[1]*l+n[1]*u+a[1]*h,t[2]=e[2]*o+r[2]*l+n[2]*u+a[2]*h,t},inverse:S,len:G,length:i,lerp:x,max:g,min:p,mul:O,multiply:h,negate:w,normalize:_,random:function(t,e=1){let r=a.Ov,n=2*r()*Math.PI,i=2*r()-1,s=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*s,t[1]=Math.sin(n)*s,t[2]=i*e,t},rotateX:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[0],i[1]=a[1]*Math.cos(n)-a[2]*Math.sin(n),i[2]=a[1]*Math.sin(n)+a[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[2]*Math.sin(n)+a[0]*Math.cos(n),i[1]=a[1],i[2]=a[2]*Math.cos(n)-a[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[0]*Math.cos(n)-a[1]*Math.sin(n),i[1]=a[0]*Math.sin(n)+a[1]*Math.cos(n),i[2]=a[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:M,scaleTo:function(t,e){return m(t,t,e/G(t))},set:o,sign:f,sqrDist:Z,sqrLen:N,squaredDistance:b,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:u,transformMat3:C,transformMat4:I,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:E,transformQuatValues:P},Symbol.toStringTag,{value:"Module"})),r.d(e,["Il",0,G,"jb",0,j,"lo",0,Z,"uE",0,N])},54239(t,e,r){r.d(e,{A:()=>M});var n,a=r(32198),i=r(4576),s=r(66552),o=r(25482),l=r(86211),u=r(67076),h=r(91429),c=r(97348),d=r(43937),f=r(36005);const p=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=p.jsonValues.slice();(0,i.Xy)(g,"orthometric");const m=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let M=n=class extends o.o{constructor(t){super(t),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(t,e){super.read(t,e),("service"===e?.origin||"web-scene"===e?.origin)&&(this.origin="service"===e.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(t,e,r){return p.write(t,e,r)}readHeightModel(t,e,r){return p.read(t)||(r?.messages&&r.messages.push(function(t,e){return new u.A("height-model:unsupported",`Height model of value '${t}' is not supported`,e)}(t,{context:r})),null)}readHeightUnit(t,e,r){return m.read(t)||(r?.messages&&r.messages.push(y(t,{context:r})),null)}readHeightUnitService(t,e,r){return(0,l.LA)(t)||m.read(t)||(r?.messages&&r.messages.push(y(t,{context:r})),null)}readVertCRS(t,e){return e.vertCRS||e.ellipsoid||e.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(t){return!!t&&(this===t||this.heightModel===t.heightModel&&this.heightUnit===t.heightUnit&&this.vertCRS===t.vertCRS)}static fromSpatialReference(t){let{latestVcsWkid:e,vcsWkid:r}=t;if(!r)return null;let a=(null==e?null:c.B.get(e))??c.B.get(r);return a?new n({heightModel:0===a.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(a.unit.name),vertCRS:a.datum,origin:3,associatedSpatialReference:t}):null}write(t,e){return e={origin:"web-scene",...e},super.write(t,e)}static fromJSON(t){if(!t)return null;let e=new n;return e.read(t,{origin:"web-scene"}),e}};function y(t,e){return new u.A("height-unit:unsupported",`Height unit of value '${t}' is not supported`,e)}(0,a.Cg)([(0,h.MZ)()],M.prototype,"origin",void 0),(0,a.Cg)([(0,h.MZ)()],M.prototype,"associatedSpatialReference",void 0),(0,a.Cg)([(0,h.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],M.prototype,"heightModel",void 0),(0,a.Cg)([(0,d.K)("web-scene","heightModel")],M.prototype,"writeHeightModel",null),(0,a.Cg)([(0,f.w)(["web-scene","service"],"heightModel")],M.prototype,"readHeightModel",null),(0,a.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],M.prototype,"heightUnit",void 0),(0,a.Cg)([(0,f.w)("web-scene","heightUnit")],M.prototype,"readHeightUnit",null),(0,a.Cg)([(0,f.w)("service","heightUnit")],M.prototype,"readHeightUnitService",null),(0,a.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],M.prototype,"vertCRS",void 0),(0,a.Cg)([(0,f.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],M.prototype,"readVertCRS",null),M=n=(0,a.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],M)},18768(t,e,r){var n=r(32198),a=r(53966),i=r(91429),s=r(60694);r.d(e,["b",0,t=>{let e=t,r=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let t=(0,s.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,s.Jf)(t,a.A.getLogger(this)))}};return(0,n.Cg)([(0,i.MZ)()],r.prototype,"title",null),(0,n.Cg)([(0,i.MZ)({type:String})],r.prototype,"url",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(t,e,r){var n=r(32198),a=r(91429);r.d(e,["d",0,t=>{let e=t,r=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,a.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},8303(t,e,r){var n=r(32198),a=r(92602),i=r(70333),s=r(56507),o=r(60999),l=r(49186),u=r(36563),h=r(53966),c=r(97768),d=r(17676),f=r(84952),p=r(91429),g=r(77548),m=r(20655),M=r(80812),y=r(41318),b=r(10407),v=r(26121),w=r(36005),S=r(43937);const _={credential:null,user:null};r.d(e,["A",0,t=>{let e=t,A=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new M.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{let{load:n}=await r.e(1204).then(()=>r(41204));return(0,d.Te)(e),await n({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,d.zf)(t)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async reloadFromPortal(t,e){if(!this.loaded||!this.portalItem?.id)return!1;let n=e?.signal?null:new AbortController;try{let{reload:a}=await r.e(1204).then(()=>r(41204));return n&&this.addHandles((0,u.rE)(n),"reloadFromPortal"),await a({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e?.signal?e:{signal:n.signal})}catch(t){throw(0,d.zf)(t)||h.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}finally{n&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,d.QP)(t),!0)))}async setUserPrivileges(t,e){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{let{features:{edit:r,fullEdit:n},content:{updateItem:a}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",a)}catch(t){(0,d.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);let n,a,s=!i.id?.findCredential(this.url),o=t===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,s);if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,e)}catch(t){(0,d.QP)(t)}if(!n||!(0,f.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{let t=null==e?null:e.signal;a=await(i.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,d.QP)(t)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await r.reload():(r=new M.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,d.QP)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(t,e){let r=(0,b.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,d.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){let e=this.url?i.id?.findCredential(this.url):null;if(!e)return!0;let r=_.credential===e?_.user:await this._fetchEditingUser(t);return _.credential=e,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){let e=this.portalItem?.portal?.user;if(e)return e;let r=i.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let n=`${r.owningSystemUrl}/sharing/rest`,a=m.A.getDefault();if(a&&a.loaded&&(0,f.S8)(a.restUrl)===(0,f.S8)(n))return a.user;let l=`${n}/community/self`,u=null==t?null:t.signal,h=await(0,o.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?y.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){return(0,v.wN)(this.portalItem,e)?(e?.messages?.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,n.Cg)([(0,p.MZ)({type:M.default})],A.prototype,"portalItem",null),(0,n.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,n.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,n.Cg)([(0,p.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,n.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],A),A}])},25036(t,e,r){var n=r(32198),a=r(91429),i=r(83960);r.d(e,["j",0,t=>{let e=t,r=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let t={minScale:this.minScale,maxScale:this.maxScale},e=this.parent;void 0!==e?.effectiveScaleRange&&(0,i.RH)(t,e.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===t.minScale&&r.maxScale===t.maxScale?r:t}};return(0,n.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,n.Cg)([(0,a.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},88546(t,e,r){r.d(e,{_8:()=>y,uB:()=>w});var n=r(34727),a=r(58083),i=r(9093),s=r(35522),o=r(51850),l=r(73941),u=r(5443),h=r(54239),c=r(16930),d=r(9762);const f=new c.A({wkid:4326,vcsWkid:115700}),p=new u.A(-180,-90,180,90,f);function g(t,e){if(!Array.isArray(t)||t.length<e)return!1;for(let e of t)if("number"!=typeof e)return!1;return!0}const m=7645211,M={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function y(t){return!!(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt||t.extensions?.ESRI_crs?.wkt2)}new Map([[5773,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new h.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new h.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new h.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height)"})],[5709,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"NAP"})]]);const b=(0,i.vt)(),v=(0,a.D_)(b);function w(t,e=!1){let r=new c.A({wkid:4326,vcsWkid:115700}),a=t.root?.boundingVolume,i=!1,h=t?.root?.transform;if(e&&y(t)&&(i=!0,r=new c.A(t.extensions?.ESRI_crs),(t.root?.extensions?.ESRI_crs?.boundingVolume?.box||t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)&&(a=t.root?.extensions?.ESRI_crs?.boundingVolume),h=t.root?.extensions?.ESRI_crs?.transform?t.root?.extensions?.ESRI_crs?.transform:v),!a)return p;if(a.box){let t=a?.box;if(t[3]>m&&t[7]>m&&t[11]>m)return new u.A({...M,spatialReference:r})}let f=(0,o.vt)();if(!i&&a.region&&g(a.region,6)){let t=a.region,e=(0,n.KJ)(t[0]),i=(0,n.KJ)(t[1]),s=t[4],o=(0,n.KJ)(t[2]),l=(0,n.KJ)(t[3]),h=t[5];return new u.A({xmin:e,ymin:i,zmin:s,xmax:o,ymax:l,zmax:h,spatialReference:r})}if(a.sphere&&g(a.sphere,4)){let t=a.sphere,e=(0,o.fA)(t[0],t[1],t[2]),n=t[3]/Math.sqrt(3),p=(0,o.vt)();(0,s.Re)(p,e,(0,o.fA)(n,n,n));let m=(0,o.vt)();if((0,s.WQ)(m,e,(0,o.fA)(n,n,n)),h&&g(h,16)){let t=h;(0,s.Z0)(f,p,t),(0,s.C)(p,f),(0,s.Z0)(f,m,t),(0,s.C)(m,f)}i||((0,d.projectBuffer)(p,l.Ro,0,p,c.A.WGS84,0),(0,d.projectBuffer)(m,l.Ro,0,m,c.A.WGS84,0));let M=(0,o.vt)(),y=(0,o.vt)();return(0,s.jk)(M,p,m),(0,s.T9)(y,p,m),new u.A({xmin:M[0],ymin:M[1],zmin:M[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:r})}if(a.box&&g(a.box,12)){let t=a.box,e=(0,o.fA)(t[0],t[1],t[2]),n=(0,o.fA)(t[3],t[4],t[5]),f=(0,o.fA)(t[6],t[7],t[8]),p=(0,o.fA)(t[9],t[10],t[11]),m=[];for(let t=0;t<8;++t)m.push((0,o.vt)());if((0,s.WQ)(m[0],e,n),(0,s.WQ)(m[0],m[0],f),(0,s.WQ)(m[0],m[0],p),(0,s.jb)(m[1],e,n),(0,s.WQ)(m[1],m[1],f),(0,s.WQ)(m[1],m[1],p),(0,s.WQ)(m[2],e,n),(0,s.jb)(m[2],m[2],f),(0,s.WQ)(m[2],m[2],p),(0,s.jb)(m[3],e,n),(0,s.jb)(m[3],m[3],f),(0,s.WQ)(m[3],m[3],p),(0,s.WQ)(m[4],e,n),(0,s.WQ)(m[4],m[4],f),(0,s.jb)(m[4],m[4],p),(0,s.jb)(m[5],e,n),(0,s.WQ)(m[5],m[5],f),(0,s.jb)(m[5],m[5],p),(0,s.WQ)(m[6],e,n),(0,s.jb)(m[6],m[6],f),(0,s.jb)(m[6],m[6],p),(0,s.jb)(m[7],e,n),(0,s.jb)(m[7],m[7],f),(0,s.jb)(m[7],m[7],p),h&&g(h,16)){let t=h;for(let e=0;e<8;++e)(0,s.Z0)(m[e],m[e],t)}let M=(0,o.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),y=(0,o.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let t=0;t<8;++t)i||(0,d.projectBuffer)(m[t],l.Ro,0,m[t],c.A.WGS84,0),(0,s.jk)(y,y,m[t]),(0,s.T9)(M,M,m[t]);return new u.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:M[0],ymax:M[1],zmax:M[2],spatialReference:r})}return p}r.d(e,["Zx",0,f,"zq",0,p])},10407(t,e,r){r.d(e,{It:()=>f,LG:()=>s,OM:()=>u,Sm:()=>h,Y:()=>o,bK:()=>l,sQ:()=>c});var n=r(99917),a=r(16930),i=r(28735);function s(t,e){if(!o(t,e)){let r=t.typeKeywords;r?r.push(e):t.typeKeywords=[e]}}function o(t,e){return!!t.typeKeywords?.includes(e)}function l(t){return o(t,d.HOSTED_SERVICE)}function u(t,e){let r=t.typeKeywords;if(r){let t=r.indexOf(e);t>-1&&r.splice(t,1)}}function h(t,e,r){r?s(t,e):u(t,e)}async function c(t){let e,r=t.clone().normalize();if(r.length>1)for(let t of r)e?t.width>e.width&&(e=t):e=t;else e=r[0];return async function(t){let e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,i.ci)(t);let r=a.A.WGS84;return await(0,n.initializeProjection)(e,r),(0,n.project)(t,r)}(e)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function f(t){let{portal:e,isOrgItem:r,itemControl:n}=t,a=e.user?.privileges,i=!a||a.includes("features:user:edit"),s=!!r&&!!a?.includes("features:user:fullEdit"),o="update"===n||"admin"===n;return o?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:o}}}r.d(e,["mm",0,d])},78553(t,e,r){r.d(e,{D:()=>i,p:()=>a});var n=r(78888);function a(t){let e=(0,n.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function i(t){let e=1-t/100;return Math.max(0,Math.min(e,1))}},26121(t,e,r){r.d(e,{I6:()=>h,ci:()=>u,dL:()=>l,wN:()=>c});var n=r(49186),a=r(84952),i=r(77548),s=r(20655),o=r(59923);async function l(t){let e=[];for(let r of t.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}function u(t,e,r){let a=(t.messages??[]).filter(({type:t})=>"error"===t).map(({name:t,message:e,details:r})=>new n.A(t,e,r));if(t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map(t=>(0,o.GL)("url",`Relative url '${t}' is not supported`)))),r){let{ignoreUnsupported:t,supplementalUnsupportedErrors:e=[],requiredPropertyChecksDisabled:n}=r;t&&(a=a.filter(({name:t})=>!(o.MG.has(t)||e.includes(t)))),n&&(a=a.filter(t=>"web-document-write:property-required"!==t.name))}if(a.length>0)throw new n.A(e.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:a})}function h(t){return(0,i.qd)(t).some(t=>!!t.charts?.length)}function c(t,e){let r=e?.portal,n=t?.id&&(t.portal||s.A.getDefault());return!!r&&!!n&&!(0,a.ut)(n.restUrl,r.restUrl)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9177],{60999(t,e,r){r.d(e,{DZ:()=>p,Ke:()=>f,QA:()=>g,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var n=r(32198),a=r(69622),i=r(97768),s=r(17676),o=r(10107),l=r(64108);function u(t,e,r){return(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))}async function h(t,e,r){return(await(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))).map(t=>t.value)}function c(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:Error("no promise provided")};try{return c(await t)}catch(t){return d(t)}}async function p(t){try{return c(await t)}catch(t){return(0,s.QP)(t),d(t)}}function g(t){if(!0===t.ok)return t.value;throw t.error}function m(t,e){return new M(t,e)}let M=class extends a.A{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=t(r),this.promise.then(t=>{this._result=c(t),this._cleanup()},t=>{this._result=d(t),this._cleanup()}),this._abortHandle=(0,s.u7)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,o.MZ)()],M.prototype,"value",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"error",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"finished",null),(0,n.Cg)([(0,o.MZ)()],M.prototype,"promise",void 0),(0,n.Cg)([(0,o.MZ)()],M.prototype,"_result",void 0),M=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],M);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let t;this._sequence=new Promise(e=>{t=this._sequence.then(()=>e,()=>e)});let e=await t;return{[Symbol.dispose]:e}}async run(t){let e={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(e,await this.acquire(),!1),await t()}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}}},9093(t,e,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>a,vt:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:n,fromValues:function(t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g){return[t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["zK",0,i])},58083(t,e,r){r.d(e,{$0:()=>M,$h:()=>I,B8:()=>h,C:()=>i,D_:()=>o,N9:()=>b,O7:()=>x,Qw:()=>u,Tl:()=>d,X_:()=>_,e$:()=>p,eL:()=>g,hM:()=>y,hZ:()=>s,hs:()=>f,kN:()=>m,l:()=>A,lw:()=>c,mg:()=>l,o1:()=>R,sC:()=>S,t2:()=>P,t5:()=>C,tZ:()=>L,ut:()=>U});var n=r(51850),a=r(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function s(t,e,r,n,a,i,s,o,l,u,h,c,d,f,p,g,m){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t[4]=i,t[5]=s,t[6]=o,t[7]=l,t[8]=u,t[9]=h,t[10]=c,t[11]=d,t[12]=f,t[13]=p,t[14]=g,t[15]=m,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function l(t,e){if(t===e){let r=e[1],n=e[2],a=e[3],i=e[6],s=e[7],o=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=a,t[13]=s,t[14]=o}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){return h(t,e)||o(t),t}function h(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],M=e[15],y=r*o-n*s,b=r*l-a*s,v=r*u-i*s,w=n*l-a*o,S=n*u-i*o,_=a*u-i*l,A=h*g-c*p,R=h*m-d*p,x=h*M-f*p,I=c*m-d*g,C=c*M-f*g,E=d*M-f*m,P=y*E-b*C+v*I+w*x-S*R+_*A;return P?(P=1/P,t[0]=(o*E-l*C+u*I)*P,t[1]=(a*C-n*E-i*I)*P,t[2]=(g*_-m*S+M*w)*P,t[3]=(d*S-c*_-f*w)*P,t[4]=(l*x-s*E-u*R)*P,t[5]=(r*E-a*x+i*R)*P,t[6]=(m*v-p*_-M*b)*P,t[7]=(h*_-d*v+f*b)*P,t[8]=(s*C-o*x+u*A)*P,t[9]=(n*x-r*C-i*A)*P,t[10]=(p*S-g*v+M*y)*P,t[11]=(c*v-h*S-f*y)*P,t[12]=(o*R-s*I-l*A)*P,t[13]=(r*I-n*R+a*A)*P,t[14]=(g*b-p*w-m*y)*P,t[15]=(h*w-c*b+d*y)*P,t):null}function c(t,e,r){let n=e[0],a=e[1],i=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],M=e[14],y=e[15],b=r[0],v=r[1],w=r[2],S=r[3];return t[0]=b*n+v*o+w*c+S*g,t[1]=b*a+v*l+w*d+S*m,t[2]=b*i+v*u+w*f+S*M,t[3]=b*s+v*h+w*p+S*y,b=r[4],v=r[5],w=r[6],S=r[7],t[4]=b*n+v*o+w*c+S*g,t[5]=b*a+v*l+w*d+S*m,t[6]=b*i+v*u+w*f+S*M,t[7]=b*s+v*h+w*p+S*y,b=r[8],v=r[9],w=r[10],S=r[11],t[8]=b*n+v*o+w*c+S*g,t[9]=b*a+v*l+w*d+S*m,t[10]=b*i+v*u+w*f+S*M,t[11]=b*s+v*h+w*p+S*y,b=r[12],v=r[13],w=r[14],S=r[15],t[12]=b*n+v*o+w*c+S*g,t[13]=b*a+v*l+w*d+S*m,t[14]=b*i+v*u+w*f+S*M,t[15]=b*s+v*h+w*p+S*y,t}function d(t,e,r){let n=r[0],a=r[1],i=r[2];if(e===t)t[12]=e[0]*n+e[4]*a+e[8]*i+e[12],t[13]=e[1]*n+e[5]*a+e[9]*i+e[13],t[14]=e[2]*n+e[6]*a+e[10]*i+e[14],t[15]=e[3]*n+e[7]*a+e[11]*i+e[15];else{let r=e[0],s=e[1],o=e[2],l=e[3],u=e[4],h=e[5],c=e[6],d=e[7],f=e[8],p=e[9],g=e[10],m=e[11];t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=u,t[5]=h,t[6]=c,t[7]=d,t[8]=f,t[9]=p,t[10]=g,t[11]=m,t[12]=r*n+u*a+f*i+e[12],t[13]=s*n+h*a+p*i+e[13],t[14]=o*n+c*a+g*i+e[14],t[15]=l*n+d*a+m*i+e[15]}return t}function f(t,e,r){let n=r[0],a=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*a,t[5]=e[5]*a,t[6]=e[6]*a,t[7]=e[7]*a,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function p(t,e,r,n){let s=n[0],o=n[1],l=n[2],u=Math.sqrt(s*s+o*o+l*l);if(u<=(0,a.FD)())return void i(t,e);u=1/u,s*=u,o*=u,l*=u;let h=Math.sin(r),c=Math.cos(r),d=1-c,f=e[0],p=e[1],g=e[2],m=e[3],M=e[4],y=e[5],b=e[6],v=e[7],w=e[8],S=e[9],_=e[10],A=e[11],R=s*s*d+c,x=o*s*d+l*h,I=l*s*d-o*h,C=s*o*d-l*h,E=o*o*d+c,P=l*o*d+s*h,U=s*l*d+o*h,L=o*l*d-s*h,T=l*l*d+c;t[0]=f*R+M*x+w*I,t[1]=p*R+y*x+S*I,t[2]=g*R+b*x+_*I,t[3]=m*R+v*x+A*I,t[4]=f*C+M*E+w*P,t[5]=p*C+y*E+S*P,t[6]=g*C+b*E+_*P,t[7]=m*C+v*E+A*P,t[8]=f*U+M*L+w*T,t[9]=p*U+y*L+S*T,t[10]=g*U+b*L+_*T,t[11]=m*U+v*L+A*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function g(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[4],s=e[5],o=e[6],l=e[7],u=e[8],h=e[9],c=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*a+u*n,t[5]=s*a+h*n,t[6]=o*a+c*n,t[7]=l*a+d*n,t[8]=u*a-i*n,t[9]=h*a-s*n,t[10]=c*a-o*n,t[11]=d*a-l*n,t}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function M(t,e,r){if(0===e)return o(t);let n=r[0],i=r[1],s=r[2],l=Math.sqrt(n*n+i*i+s*s);if(l<=(0,a.FD)())return null;l=1/l,n*=l,i*=l,s*=l;let u=Math.sin(e),h=Math.cos(e),c=1-h;return t[0]=n*n*c+h,t[1]=i*n*c+s*u,t[2]=s*n*c-i*u,t[3]=0,t[4]=n*i*c-s*u,t[5]=i*i*c+h,t[6]=s*i*c+n*u,t[7]=0,t[8]=n*s*c+i*u,t[9]=i*s*c-n*u,t[10]=s*s*c+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,r){let n=e[0],a=e[1],i=e[2],s=e[3],o=n+n,l=a+a,u=i+i,h=n*o,c=n*l,d=n*u,f=a*l,p=a*u,g=i*u,m=s*o,M=s*l,y=s*u;return t[0]=1-(f+g),t[1]=c+y,t[2]=d-M,t[3]=0,t[4]=c-y,t[5]=1-(h+g),t[6]=p+m,t[7]=0,t[8]=d+M,t[9]=p-m,t[10]=1-(h+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}const w=(0,n.vt)();function S(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _(t,e){let r=e[0],n=e[1],a=e[2],i=e[4],s=e[5],o=e[6],l=e[8],u=e[9],h=e[10];return t[0]=Math.sqrt(r*r+n*n+a*a),t[1]=Math.sqrt(i*i+s*s+o*o),t[2]=Math.sqrt(l*l+u*u+h*h),t}function A(t,e){let r=e[0]+e[5]+e[10],n=0;return r>0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t}function R(t,e,r,n){let a=e[0],i=e[1],s=e[2],o=e[3],l=a+a,u=i+i,h=s+s,c=a*l,d=a*u,f=a*h,p=i*u,g=i*h,m=s*h,M=o*l,y=o*u,b=o*h,v=n[0],w=n[1],S=n[2];return t[0]=(1-(p+m))*v,t[1]=(d+b)*v,t[2]=(f-y)*v,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(c+m))*w,t[6]=(g+M)*w,t[7]=0,t[8]=(f+y)*S,t[9]=(g-M)*S,t[10]=(1-(c+p))*S,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function x(t,e,r,n,a){let i=e[0],s=e[1],o=e[2],l=e[3],u=i+i,h=s+s,c=o+o,d=i*u,f=i*h,p=i*c,g=s*h,m=s*c,M=o*c,y=l*u,b=l*h,v=l*c,w=n[0],S=n[1],_=n[2],A=a[0],R=a[1],x=a[2],I=(1-(g+M))*w,C=(f+v)*w,E=(p-b)*w,P=(f-v)*S,U=(1-(d+M))*S,L=(m+y)*S,T=(p+b)*_,k=(m-y)*_,q=(1-(d+g))*_;return t[0]=I,t[1]=C,t[2]=E,t[3]=0,t[4]=P,t[5]=U,t[6]=L,t[7]=0,t[8]=T,t[9]=k,t[10]=q,t[11]=0,t[12]=r[0]+A-(I*A+P*R+T*x),t[13]=r[1]+R-(C*A+U*R+k*x),t[14]=r[2]+x-(E*A+L*R+q*x),t[15]=1,t}function I(t,e,r,n,a,i,s){let o=1/(r-e),l=1/(a-n),u=1/(i-s);return t[0]=2*i*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*l,t[6]=0,t[7]=0,t[8]=(r+e)*o,t[9]=(a+n)*l,t[10]=(s+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*i*2*u,t[15]=0,t}function C(t,e,r,n){let i=e[0],s=e[1],l=e[2],u=i-r[0],h=s-r[1],c=l-r[2],d=(0,a.FD)();if(Math.abs(u)<d&&Math.abs(h)<d&&Math.abs(c)<d)return void o(t);let f=1/Math.sqrt(u*u+h*h+c*c);u*=f,h*=f,c*=f;let p=n[0],g=n[1],m=n[2],M=g*c-m*h,y=m*u-p*c,b=p*h-g*u;f=Math.sqrt(M*M+y*y+b*b),f?(f=1/f,M*=f,y*=f,b*=f):(M=0,y=0,b=0);let v=h*b-c*y,w=c*M-u*b,S=u*y-h*M;f=Math.sqrt(v*v+w*w+S*S),f?(f=1/f,v*=f,w*=f,S*=f):(v=0,w=0,S=0),t[0]=M,t[1]=v,t[2]=u,t[3]=0,t[4]=y,t[5]=w,t[6]=h,t[7]=0,t[8]=b,t[9]=S,t[10]=c,t[11]=0,t[12]=-(M*i+y*s+b*l),t[13]=-(v*i+w*s+S*l),t[14]=-(u*i+h*s+c*l),t[15]=1}function E(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function P(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function U(t){let e=(0,a.FD)(),r=t[0],n=t[1],i=t[2],s=t[4],o=t[5],l=t[6],u=t[8],h=t[9],c=t[10];return Math.abs(1-(r*r+s*s+u*u))<=e&&Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(i*i+l*l+c*c))<=e}function L(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=c,k=E;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t},adjoint:function(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],M=e[15];return t[0]=o*(d*M-f*m)-c*(l*M-u*m)+g*(l*f-u*d),t[1]=-(n*(d*M-f*m)-c*(a*M-i*m)+g*(a*f-i*d)),t[2]=n*(l*M-u*m)-o*(a*M-i*m)+g*(a*u-i*l),t[3]=-(n*(l*f-u*d)-o*(a*f-i*d)+c*(a*u-i*l)),t[4]=-(s*(d*M-f*m)-h*(l*M-u*m)+p*(l*f-u*d)),t[5]=r*(d*M-f*m)-h*(a*M-i*m)+p*(a*f-i*d),t[6]=-(r*(l*M-u*m)-s*(a*M-i*m)+p*(a*u-i*l)),t[7]=r*(l*f-u*d)-s*(a*f-i*d)+h*(a*u-i*l),t[8]=s*(c*M-f*g)-h*(o*M-u*g)+p*(o*f-u*c),t[9]=-(r*(c*M-f*g)-h*(n*M-i*g)+p*(n*f-i*c)),t[10]=r*(o*M-u*g)-s*(n*M-i*g)+p*(n*u-i*o),t[11]=-(r*(o*f-u*c)-s*(n*f-i*c)+h*(n*u-i*o)),t[12]=-(s*(c*m-d*g)-h*(o*m-l*g)+p*(o*d-l*c)),t[13]=r*(c*m-d*g)-h*(n*m-a*g)+p*(n*d-a*c),t[14]=-(r*(o*m-l*g)-s*(n*m-a*g)+p*(n*l-a*o)),t[15]=r*(o*d-l*c)-s*(n*d-a*c)+h*(n*l-a*o),t},copy:i,determinant:function(t){let e=t[0],r=t[1],n=t[2],a=t[3],i=t[4],s=t[5],o=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*s-r*i)*(c*m-d*g)-(e*o-n*i)*(h*m-d*p)+(e*l-a*i)*(h*g-c*p)+(r*o-n*s)*(u*m-d*f)-(r*l-a*s)*(u*g-c*f)+(n*l-a*o)*(u*p-h*f)},equals:function(t,e){if(t===e)return!0;let r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=t[8],d=t[9],f=t[10],p=t[11],g=t[12],m=t[13],M=t[14],y=t[15],b=e[0],v=e[1],w=e[2],S=e[3],_=e[4],A=e[5],R=e[6],x=e[7],I=e[8],C=e[9],E=e[10],P=e[11],U=e[12],L=e[13],T=e[14],k=e[15],q=(0,a.FD)();return Math.abs(r-b)<=q*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(n-v)<=q*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(i-w)<=q*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(s-S)<=q*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(o-_)<=q*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(l-A)<=q*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-R)<=q*Math.max(1,Math.abs(u),Math.abs(R))&&Math.abs(h-x)<=q*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(c-I)<=q*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(d-C)<=q*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(f-E)<=q*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(p-P)<=q*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(g-U)<=q*Math.max(1,Math.abs(g),Math.abs(U))&&Math.abs(m-L)<=q*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(M-T)<=q*Math.max(1,Math.abs(M),Math.abs(T))&&Math.abs(y-k)<=q*Math.max(1,Math.abs(y),Math.abs(k))},exactEquals:P,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=r+r,o=n+n,l=a+a,u=r*s,h=n*s,c=n*o,d=a*s,f=a*o,p=a*l,g=i*s,m=i*o,M=i*l;return t[0]=1-c-p,t[1]=h+M,t[2]=d-m,t[3]=0,t[4]=h-M,t[5]=1-u-p,t[6]=f+g,t[7]=0,t[8]=d+m,t[9]=f-g,t[10]=1-u-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let r=w,n=-e[0],a=-e[1],i=-e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=n*n+a*a+i*i+s*s;return c>0?(r[0]=2*(o*s+h*n+l*i-u*a)/c,r[1]=2*(l*s+h*a+u*n-o*i)/c,r[2]=2*(u*s+h*i+o*a-l*n)/c):(r[0]=2*(o*s+h*n+l*i-u*a),r[1]=2*(l*s+h*a+u*n-o*i),r[2]=2*(u*s+h*i+o*a-l*n)),v(t,e,r),t},fromRotation:M,fromRotationTranslation:v,fromRotationTranslationScale:R,fromRotationTranslationScaleOrigin:x,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:m,fromXRotation:y,fromYRotation:function(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:b,frustum:I,getRotation:A,getScale:_,getTranslation:S,hasIdentityRotation:L,identity:o,invert:h,invertOrIdentity:u,isOrthoNormal:U,lookAt:C,mul:T,multiply:c,multiplyScalar:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},multiplyScalarAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},ortho:function(t,e,r,n,a,i,s){let o=1/(e-r),l=1/(n-a),u=1/(i-s);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*o,t[13]=(a+n)*l,t[14]=(s+i)*u,t[15]=1,t},perspective:function(t,e,r,n,a){let i,s=1/Math.tan(e/2);return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(i=1/(n-a),t[10]=(a+n)*i,t[14]=2*a*n*i):(t[10]=-1,t[14]=-2*n),t},perspectiveFromFieldOfView:function(t,e,r,n){let a=Math.tan(e.upDegrees*Math.PI/180),i=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),o=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+o),u=2/(a+i);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(s-o)*l*.5,t[9]=(a-i)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},rotate:p,rotateX:g,rotateY:function(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[0],s=e[1],o=e[2],l=e[3],u=e[8],h=e[9],c=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*a-u*n,t[1]=s*a-h*n,t[2]=o*a-c*n,t[3]=l*a-d*n,t[8]=i*n+u*a,t[9]=s*n+h*a,t[10]=o*n+c*a,t[11]=l*n+d*a,t},rotateZ:function(t,e,r){let n=Math.sin(r),a=Math.cos(r),i=e[0],s=e[1],o=e[2],l=e[3],u=e[4],h=e[5],c=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*a+u*n,t[1]=s*a+h*n,t[2]=o*a+c*n,t[3]=l*a+d*n,t[4]=u*a-i*n,t[5]=h*a-s*n,t[6]=c*a-o*n,t[7]=d*a-l*n,t},scale:f,set:s,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:k,subtract:E,targetTo:function(t,e,r,n){let a=e[0],i=e[1],s=e[2],o=n[0],l=n[1],u=n[2],h=a-r[0],c=i-r[1],d=s-r[2],f=h*h+c*c+d*d;f>0&&(f=1/Math.sqrt(f),h*=f,c*=f,d*=f);let p=l*d-u*c,g=u*h-o*d,m=o*c-l*h;return f=p*p+g*g+m*m,f>0&&(f=1/Math.sqrt(f),p*=f,g*=f,m*=f),t[0]=p,t[1]=g,t[2]=m,t[3]=0,t[4]=c*m-d*g,t[5]=d*p-h*m,t[6]=h*g-c*p,t[7]=0,t[8]=h,t[9]=c,t[10]=d,t[11]=0,t[12]=a,t[13]=i,t[14]=s,t[15]=1,t},translate:d,transpose:l},Symbol.toStringTag,{value:"Module"}))},35522(t,e,r){r.d(e,{$A:()=>R,Bw:()=>i,C:()=>s,Cc:()=>x,DI:()=>S,Io:()=>y,Ln:()=>M,Om:()=>A,Qr:()=>c,Re:()=>u,S8:()=>_,T9:()=>g,WQ:()=>l,Z0:()=>I,_S:()=>f,aI:()=>k,ei:()=>C,fw:()=>P,gL:()=>E,hG:()=>b,hZ:()=>o,hs:()=>m,jk:()=>p,lw:()=>h,m3:()=>v,oW:()=>q,t2:()=>T,tn:()=>d,ze:()=>w});var n=r(51850),a=r(34304);function i(t){let e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function l(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function u(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function h(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function g(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function M(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function y(t,e){let r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return Math.sqrt(r*r+n*n+a*a)}function b(t,e){let r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return r*r+n*n+a*a}function v(t){let e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function _(t,e=t){let r=e[0],n=e[1],a=e[2],i=r*r+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function R(t,e,r){let n=e[0],a=e[1],i=e[2],s=r[0],o=r[1],l=r[2];return t[0]=a*l-i*o,t[1]=i*s-n*l,t[2]=n*o-a*s,t}function x(t,e,r,n){let a=e[0],i=e[1],s=e[2];return t[0]=a+n*(r[0]-a),t[1]=i+n*(r[1]-i),t[2]=s+n*(r[2]-s),t}function I(t,e,r){let n=e[0],a=e[1],i=e[2];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12],t[1]=r[1]*n+r[5]*a+r[9]*i+r[13],t[2]=r[2]*n+r[6]*a+r[10]*i+r[14],t}function C(t,e,r){let n=e[0],a=e[1],i=e[2];return t[0]=n*r[0]+a*r[3]+i*r[6],t[1]=n*r[1]+a*r[4]+i*r[7],t[2]=n*r[2]+a*r[5]+i*r[8],t}function E(t,e,r){return P(t,e,r[0],r[1],r[2],r[3])}function P(t,e,r,n,a,i){let s=e[0],o=e[1],l=e[2],u=n*l-a*o,h=a*s-r*l,c=r*o-n*s,d=n*c-a*h,f=a*u-r*c,p=r*h-n*u,g=2*i;return t[0]=s+u*g+2*d,t[1]=o+h*g+2*f,t[2]=l+c*g+2*p,t}const U=(0,n.vt)(),L=(0,n.vt)();function T(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function k(t,e){if(t===e)return!0;let r=t[0],n=t[1],i=t[2],s=e[0],o=e[1],l=e[2],u=(0,a.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))}function q(t,e,r){let n=r[0]-e[0],a=r[1]-e[1],i=r[2]-e[2],s=n*n+a*a+i*i;return s>0?(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=u,O=h,D=c,H=y,Z=b,G=i,N=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(t,e){_(U,t),_(L,e);let r=A(U,L);return r>1?0:r<-1?Math.PI:Math.acos(r)},applyTranslation:function(t,e,r){return t[0]=e[0]+r[12],t[1]=e[1]+r[13],t[2]=e[2]+r[14],t},bezier:function(t,e,r,n,a,i){let s=1-i,o=s*s,l=i*i,u=o*s,h=3*i*o,c=3*l*s,d=l*i;return t[0]=e[0]*u+r[0]*h+n[0]*c+a[0]*d,t[1]=e[1]*u+r[1]*h+n[1]*c+a[1]*d,t[2]=e[2]*u+r[2]*h+n[2]*c+a[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:s,cross:R,crossAndNormalize:function(t,e,r){let n=e[0],a=e[1],i=e[2],s=r[0],o=r[1],l=r[2],u=a*l-i*o,h=i*s-n*l,c=n*o-a*s,d=Math.sqrt(u*u+h*h+c*c);return t[0]=u/d,t[1]=h/d,t[2]=c/d,t},direction:q,dist:H,distance:y,div:D,divide:c,dot:A,equals:k,exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,n,a,i){let s=i*i,o=s*(2*i-3)+1,l=s*(i-2)+i,u=s*(i-1),h=s*(3-2*i);return t[0]=e[0]*o+r[0]*l+n[0]*u+a[0]*h,t[1]=e[1]*o+r[1]*l+n[1]*u+a[1]*h,t[2]=e[2]*o+r[2]*l+n[2]*u+a[2]*h,t},inverse:S,len:G,length:i,lerp:x,max:g,min:p,mul:O,multiply:h,negate:w,normalize:_,random:function(t,e=1){let r=a.Ov,n=2*r()*Math.PI,i=2*r()-1,s=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*s,t[1]=Math.sin(n)*s,t[2]=i*e,t},rotateX:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[0],i[1]=a[1]*Math.cos(n)-a[2]*Math.sin(n),i[2]=a[1]*Math.sin(n)+a[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[2]*Math.sin(n)+a[0]*Math.cos(n),i[1]=a[1],i[2]=a[2]*Math.cos(n)-a[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){let a=[],i=[];return a[0]=e[0]-r[0],a[1]=e[1]-r[1],a[2]=e[2]-r[2],i[0]=a[0]*Math.cos(n)-a[1]*Math.sin(n),i[1]=a[0]*Math.sin(n)+a[1]*Math.cos(n),i[2]=a[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:M,scaleTo:function(t,e){return m(t,t,e/G(t))},set:o,sign:f,sqrDist:Z,sqrLen:N,squaredDistance:b,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:u,transformMat3:C,transformMat4:I,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:E,transformQuatValues:P},Symbol.toStringTag,{value:"Module"})),r.d(e,["Il",0,G,"jb",0,j,"lo",0,Z,"uE",0,N])},54239(t,e,r){r.d(e,{A:()=>M});var n,a=r(32198),i=r(4576),s=r(66552),o=r(25482),l=r(86211),u=r(67076),h=r(91429),c=r(97348),d=r(43937),f=r(36005);const p=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=p.jsonValues.slice();(0,i.Xy)(g,"orthometric");const m=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let M=n=class extends o.o{constructor(t){super(t),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(t,e){super.read(t,e),("service"===e?.origin||"web-scene"===e?.origin)&&(this.origin="service"===e.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(t,e,r){return p.write(t,e,r)}readHeightModel(t,e,r){return p.read(t)||(r?.messages&&r.messages.push(function(t,e){return new u.A("height-model:unsupported",`Height model of value '${t}' is not supported`,e)}(t,{context:r})),null)}readHeightUnit(t,e,r){return m.read(t)||(r?.messages&&r.messages.push(y(t,{context:r})),null)}readHeightUnitService(t,e,r){return(0,l.LA)(t)||m.read(t)||(r?.messages&&r.messages.push(y(t,{context:r})),null)}readVertCRS(t,e){return e.vertCRS||e.ellipsoid||e.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(t){return!!t&&(this===t||this.heightModel===t.heightModel&&this.heightUnit===t.heightUnit&&this.vertCRS===t.vertCRS)}static fromSpatialReference(t){let{latestVcsWkid:e,vcsWkid:r}=t;if(!r)return null;let a=(null==e?null:c.B.get(e))??c.B.get(r);return a?new n({heightModel:0===a.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(a.unit.name),vertCRS:a.datum,origin:3,associatedSpatialReference:t}):null}write(t,e){return e={origin:"web-scene",...e},super.write(t,e)}static fromJSON(t){if(!t)return null;let e=new n;return e.read(t,{origin:"web-scene"}),e}};function y(t,e){return new u.A("height-unit:unsupported",`Height unit of value '${t}' is not supported`,e)}(0,a.Cg)([(0,h.MZ)()],M.prototype,"origin",void 0),(0,a.Cg)([(0,h.MZ)()],M.prototype,"associatedSpatialReference",void 0),(0,a.Cg)([(0,h.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],M.prototype,"heightModel",void 0),(0,a.Cg)([(0,d.K)("web-scene","heightModel")],M.prototype,"writeHeightModel",null),(0,a.Cg)([(0,f.w)(["web-scene","service"],"heightModel")],M.prototype,"readHeightModel",null),(0,a.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],M.prototype,"heightUnit",void 0),(0,a.Cg)([(0,f.w)("web-scene","heightUnit")],M.prototype,"readHeightUnit",null),(0,a.Cg)([(0,f.w)("service","heightUnit")],M.prototype,"readHeightUnitService",null),(0,a.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],M.prototype,"vertCRS",void 0),(0,a.Cg)([(0,f.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],M.prototype,"readVertCRS",null),M=n=(0,a.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],M)},18768(t,e,r){var n=r(32198),a=r(53966),i=r(91429),s=r(60694);r.d(e,["b",0,t=>{let e=t,r=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let t=(0,s.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,s.Jf)(t,a.A.getLogger(this)))}};return(0,n.Cg)([(0,i.MZ)()],r.prototype,"title",null),(0,n.Cg)([(0,i.MZ)({type:String})],r.prototype,"url",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(t,e,r){var n=r(32198),a=r(91429);r.d(e,["d",0,t=>{let e=t,r=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,a.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},8303(t,e,r){var n=r(32198),a=r(92602),i=r(70333),s=r(56507),o=r(60999),l=r(49186),u=r(36563),h=r(53966),c=r(97768),d=r(17676),f=r(84952),p=r(91429),g=r(77548),m=r(20655),M=r(80812),y=r(41318),b=r(10407),v=r(26121),w=r(36005),S=r(43937);const _={credential:null,user:null};r.d(e,["A",0,t=>{let e=t,A=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new M.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{let{load:n}=await r.e(1204).then(()=>r(41204));return(0,d.Te)(e),await n({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,d.zf)(t)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async reloadFromPortal(t,e){if(!this.loaded||!this.portalItem?.id)return!1;let n=e?.signal?null:new AbortController;try{let{reload:a}=await r.e(1204).then(()=>r(41204));return n&&this.addHandles((0,u.rE)(n),"reloadFromPortal"),await a({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e?.signal?e:{signal:n.signal})}catch(t){throw(0,d.zf)(t)||h.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}finally{n&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,d.QP)(t),!0)))}async setUserPrivileges(t,e){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{let{features:{edit:r,fullEdit:n},content:{updateItem:a}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",a)}catch(t){(0,d.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);let n,a,s=!i.id?.findCredential(this.url),o=t===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,s);if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,e)}catch(t){(0,d.QP)(t)}if(!n||!(0,f.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{let t=null==e?null:e.signal;a=await(i.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,d.QP)(t)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await r.reload():(r=new M.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,d.QP)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(t,e){let r=(0,b.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,d.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){let e=this.url?i.id?.findCredential(this.url):null;if(!e)return!0;let r=_.credential===e?_.user:await this._fetchEditingUser(t);return _.credential=e,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){let e=this.portalItem?.portal?.user;if(e)return e;let r=i.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let n=`${r.owningSystemUrl}/sharing/rest`,a=m.A.getDefault();if(a&&a.loaded&&(0,f.S8)(a.restUrl)===(0,f.S8)(n))return a.user;let l=`${n}/community/self`,u=null==t?null:t.signal,h=await(0,o.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?y.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){return(0,v.wN)(this.portalItem,e)?(e?.messages?.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,n.Cg)([(0,p.MZ)({type:M.default})],A.prototype,"portalItem",null),(0,n.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,n.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,n.Cg)([(0,p.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,n.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],A),A}])},25036(t,e,r){var n=r(32198),a=r(91429),i=r(83960);r.d(e,["j",0,t=>{let e=t,r=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let t={minScale:this.minScale,maxScale:this.maxScale},e=this.parent;void 0!==e?.effectiveScaleRange&&(0,i.RH)(t,e.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===t.minScale&&r.maxScale===t.maxScale?r:t}};return(0,n.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,n.Cg)([(0,a.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},88546(t,e,r){r.d(e,{_8:()=>y,uB:()=>w});var n=r(34727),a=r(58083),i=r(9093),s=r(35522),o=r(51850),l=r(73941),u=r(5443),h=r(54239),c=r(16930),d=r(9762);const f=new c.A({wkid:4326,vcsWkid:115700}),p=new u.A(-180,-90,180,90,f);function g(t,e){if(!Array.isArray(t)||t.length<e)return!1;for(let e of t)if("number"!=typeof e)return!1;return!0}const m=7645211,M={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function y(t){return!!(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt||t.extensions?.ESRI_crs?.wkt2)}new Map([[5773,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new h.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new h.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new h.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height)"})],[5709,new h.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"NAP"})]]);const b=(0,i.vt)(),v=(0,a.D_)(b);function w(t,e=!1){let r=new c.A({wkid:4326,vcsWkid:115700}),a=t.root?.boundingVolume,i=!1,h=t?.root?.transform;if(e&&y(t)&&(i=!0,r=new c.A(t.extensions?.ESRI_crs),(t.root?.extensions?.ESRI_crs?.boundingVolume?.box||t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)&&(a=t.root?.extensions?.ESRI_crs?.boundingVolume),h=t.root?.extensions?.ESRI_crs?.transform?t.root?.extensions?.ESRI_crs?.transform:v),!a)return p;if(a.box){let t=a?.box;if(t[3]>m&&t[7]>m&&t[11]>m)return new u.A({...M,spatialReference:r})}let f=(0,o.vt)();if(!i&&a.region&&g(a.region,6)){let t=a.region,e=(0,n.KJ)(t[0]),i=(0,n.KJ)(t[1]),s=t[4],o=(0,n.KJ)(t[2]),l=(0,n.KJ)(t[3]),h=t[5];return new u.A({xmin:e,ymin:i,zmin:s,xmax:o,ymax:l,zmax:h,spatialReference:r})}if(a.sphere&&g(a.sphere,4)){let t=a.sphere,e=(0,o.fA)(t[0],t[1],t[2]),n=t[3]/Math.sqrt(3),p=(0,o.vt)();(0,s.Re)(p,e,(0,o.fA)(n,n,n));let m=(0,o.vt)();if((0,s.WQ)(m,e,(0,o.fA)(n,n,n)),h&&g(h,16)){let t=h;(0,s.Z0)(f,p,t),(0,s.C)(p,f),(0,s.Z0)(f,m,t),(0,s.C)(m,f)}i||((0,d.projectBuffer)(p,l.Ro,0,p,c.A.WGS84,0),(0,d.projectBuffer)(m,l.Ro,0,m,c.A.WGS84,0));let M=(0,o.vt)(),y=(0,o.vt)();return(0,s.jk)(M,p,m),(0,s.T9)(y,p,m),new u.A({xmin:M[0],ymin:M[1],zmin:M[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:r})}if(a.box&&g(a.box,12)){let t=a.box,e=(0,o.fA)(t[0],t[1],t[2]),n=(0,o.fA)(t[3],t[4],t[5]),f=(0,o.fA)(t[6],t[7],t[8]),p=(0,o.fA)(t[9],t[10],t[11]),m=[];for(let t=0;t<8;++t)m.push((0,o.vt)());if((0,s.WQ)(m[0],e,n),(0,s.WQ)(m[0],m[0],f),(0,s.WQ)(m[0],m[0],p),(0,s.jb)(m[1],e,n),(0,s.WQ)(m[1],m[1],f),(0,s.WQ)(m[1],m[1],p),(0,s.WQ)(m[2],e,n),(0,s.jb)(m[2],m[2],f),(0,s.WQ)(m[2],m[2],p),(0,s.jb)(m[3],e,n),(0,s.jb)(m[3],m[3],f),(0,s.WQ)(m[3],m[3],p),(0,s.WQ)(m[4],e,n),(0,s.WQ)(m[4],m[4],f),(0,s.jb)(m[4],m[4],p),(0,s.jb)(m[5],e,n),(0,s.WQ)(m[5],m[5],f),(0,s.jb)(m[5],m[5],p),(0,s.WQ)(m[6],e,n),(0,s.jb)(m[6],m[6],f),(0,s.jb)(m[6],m[6],p),(0,s.jb)(m[7],e,n),(0,s.jb)(m[7],m[7],f),(0,s.jb)(m[7],m[7],p),h&&g(h,16)){let t=h;for(let e=0;e<8;++e)(0,s.Z0)(m[e],m[e],t)}let M=(0,o.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),y=(0,o.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let t=0;t<8;++t)i||(0,d.projectBuffer)(m[t],l.Ro,0,m[t],c.A.WGS84,0),(0,s.jk)(y,y,m[t]),(0,s.T9)(M,M,m[t]);return new u.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:M[0],ymax:M[1],zmax:M[2],spatialReference:r})}return p}r.d(e,["Zx",0,f,"zq",0,p])},10407(t,e,r){r.d(e,{It:()=>f,LG:()=>s,OM:()=>u,Sm:()=>h,Y:()=>o,bK:()=>l,sQ:()=>c});var n=r(99917),a=r(16930),i=r(28735);function s(t,e){if(!o(t,e)){let r=t.typeKeywords;r?r.push(e):t.typeKeywords=[e]}}function o(t,e){return!!t.typeKeywords?.includes(e)}function l(t){return o(t,d.HOSTED_SERVICE)}function u(t,e){let r=t.typeKeywords;if(r){let t=r.indexOf(e);t>-1&&r.splice(t,1)}}function h(t,e,r){r?s(t,e):u(t,e)}async function c(t){let e,r=t.clone().normalize();if(r.length>1)for(let t of r)e?t.width>e.width&&(e=t):e=t;else e=r[0];return async function(t){let e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,i.ci)(t);let r=a.A.WGS84;return await(0,n.initializeProjection)(e,r),(0,n.project)(t,r)}(e)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function f(t){let{portal:e,isOrgItem:r,itemControl:n}=t,a=e.user?.privileges,i=!a||a.includes("features:user:edit"),s=!!r&&!!a?.includes("features:user:fullEdit"),o="update"===n||"admin"===n;return o?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:o}}}r.d(e,["mm",0,d])},78553(t,e,r){r.d(e,{D:()=>i,p:()=>a});var n=r(78888);function a(t){let e=(0,n.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function i(t){let e=1-t/100;return Math.max(0,Math.min(e,1))}},26121(t,e,r){r.d(e,{I6:()=>h,ci:()=>u,dL:()=>l,wN:()=>c});var n=r(49186),a=r(84952),i=r(77548),s=r(20655),o=r(59923);async function l(t){let e=[];for(let r of t.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}function u(t,e,r){let a=(t.messages??[]).filter(({type:t})=>"error"===t).map(({name:t,message:e,details:r})=>new n.A(t,e,r));if(t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map(t=>(0,o.GL)("url",`Relative url '${t}' is not supported`)))),r){let{ignoreUnsupported:t,supplementalUnsupportedErrors:e=[],requiredPropertyChecksDisabled:n}=r;t&&(a=a.filter(({name:t})=>!(o.MG.has(t)||e.includes(t)))),n&&(a=a.filter(t=>"web-document-write:property-required"!==t.name))}if(a.length>0)throw new n.A(e.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:a})}function h(t){return(0,i.qd)(t).some(t=>!!t.charts?.length)}function c(t,e){let r=e?.portal,n=t?.id&&(t.portal||s.A.getDefault());return!!r&&!!n&&!(0,a.ut)(n.restUrl,r.restUrl)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7237],{11006(t,e,i){function n(t,e,i,n,s){r(t,e,i||0,n||t.length-1,s||o)}function r(t,e,i,n,o){for(;n>i;){if(n-i>600){var l=n-i+1,h=e-i+1,a=Math.log(l),u=.5*Math.exp(2*a/3),f=.5*Math.sqrt(a*u*(l-u)/l)*(h-l/2<0?-1:1);r(t,e,Math.max(i,Math.floor(e-h*u/l+f)),Math.min(n,Math.floor(e+(l-h)*u/l+f)),o)}var c=t[e],d=i,y=n;for(s(t,i,e),o(t[n],c)>0&&s(t,i,n);d<y;){for(s(t,d,y),d++,y--;o(t[d],c)<0;)d++;for(;o(t[y],c)>0;)y--}0===o(t[i],c)?s(t,i,y):s(t,++y,n),y<=e&&(i=y+1),e<=y&&(n=y-1)}}function s(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e){return t<e?-1:+(t>e)}i.d(e,{q:()=>n})},69540(t,e,i){var n=i(32198),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),h=i(64108);const a=Symbol("ClonableMixin"),u=t=>{var e;let i=t,r=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=a}clone(t){let e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,r={},h=new Map;for(let e in i){let o=i[e],l=n?.originOf(e),a=o.clonable;if(o.readOnly||!1===a||7!==l&&0!==l&&5!==l&&4!==l)continue;let u=this[e],f=null;if("function"==typeof a)f=a(u,t);else if("reference"===a)f=u;else if(f=(0,s.TU)(u,t),null!=u&&null==f)continue;0===l?h.set(e,f):r[e]=f}let a=new(0,Object.getPrototypeOf(this).constructor)(r);if(h.size){let t=(0,l.oY)(a)?.store;if(t)for(let[e,i]of h)t.set(e,i,0)}return a}};return r=(0,n.Cg)([(0,h.$)("esri.core.Clonable")],r),r},f=u(r.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==r(t)}function r(t){return function(t){let e=s.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,r=i.month-1,o=+i.day,l=+(i.hours??"0"),h=+(i.minutes??"0"),a=+(i.seconds??"0");if(l>23||h>59||a>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,r,o,l,h,a,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,r,o,l,h,a,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!o.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m){return[t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,s])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>s,C:()=>o,Cc:()=>P,DI:()=>b,Io:()=>g,Ln:()=>_,Om:()=>I,Qr:()=>f,Re:()=>a,S8:()=>v,T9:()=>m,WQ:()=>h,Z0:()=>A,_S:()=>d,aI:()=>G,ei:()=>B,fw:()=>C,gL:()=>S,hG:()=>x,hZ:()=>l,hs:()=>p,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>O,t2:()=>Z,tn:()=>c,ze:()=>w});var n=i(51850),r=i(34304);function s(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function h(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function p(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function _(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function g(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],r=e[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2];return t[0]=r*h-s*l,t[1]=s*o-n*h,t[2]=n*l-r*o,t}function P(t,e,i,n){let r=e[0],s=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=s+n*(i[1]-s),t[2]=o+n*(i[2]-o),t}function A(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=i[0]*n+i[4]*r+i[8]*s+i[12],t[1]=i[1]*n+i[5]*r+i[9]*s+i[13],t[2]=i[2]*n+i[6]*r+i[10]*s+i[14],t}function B(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=n*i[0]+r*i[3]+s*i[6],t[1]=n*i[1]+r*i[4]+s*i[7],t[2]=n*i[2]+r*i[5]+s*i[8],t}function S(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,n,r,s){let o=e[0],l=e[1],h=e[2],a=n*h-r*l,u=r*o-i*h,f=i*l-n*o,c=n*f-r*u,d=r*a-i*f,y=i*u-n*a,m=2*s;return t[0]=o+a*m+2*c,t[1]=l+u*m+2*d,t[2]=h+f*m+2*y,t}const R=(0,n.vt)(),F=(0,n.vt)();function Z(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function G(t,e){if(t===e)return!0;let i=t[0],n=t[1],s=t[2],o=e[0],l=e[1],h=e[2],a=(0,r.FD)();return Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-l)<=a*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))}function O(t,e,i){let n=i[0]-e[0],r=i[1]-e[1],s=i[2]-e[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=a,q=u,N=f,Y=g,X=x,k=s,L=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:h,angle:function(t,e){v(R,t),v(F,e);let i=I(R,F);return i>1?0:i<-1?Math.PI:Math.acos(i)},applyTranslation:function(t,e,i){return t[0]=e[0]+i[12],t[1]=e[1]+i[13],t[2]=e[2]+i[14],t},bezier:function(t,e,i,n,r,s){let o=1-s,l=o*o,h=s*s,a=l*o,u=3*s*l,f=3*h*o,c=h*s;return t[0]=e[0]*a+i[0]*u+n[0]*f+r[0]*c,t[1]=e[1]*a+i[1]*u+n[1]*f+r[1]*c,t[2]=e[2]*a+i[2]*u+n[2]*f+r[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:o,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2],a=r*h-s*l,u=s*o-n*h,f=n*l-r*o,c=Math.sqrt(a*a+u*u+f*f);return t[0]=a/c,t[1]=u/c,t[2]=f/c,t},direction:O,dist:Y,distance:g,div:N,divide:f,dot:I,equals:G,exactEquals:Z,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,r,s){let o=s*s,l=o*(2*s-3)+1,h=o*(s-2)+s,a=o*(s-1),u=o*(3-2*s);return t[0]=e[0]*l+i[0]*h+n[0]*a+r[0]*u,t[1]=e[1]*l+i[1]*h+n[1]*a+r[1]*u,t[2]=e[2]*l+i[2]*h+n[2]*a+r[2]*u,t},inverse:b,len:k,length:s,lerp:P,max:m,min:y,mul:q,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=s*e,t},rotateX:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateY:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateZ:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:p,scaleAndAdd:_,scaleTo:function(t,e){return p(t,t,e/k(t))},set:l,sign:d,sqrDist:X,sqrLen:L,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:a,transformMat3:B,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,k,"jb",0,j,"lo",0,X,"uE",0,L])},75503(t,e,i){i.d(e,{wq:()=>l});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class l{constructor(t=9,e){this._compareMinX=c,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){h(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;x(t,o)&&(i.leaf?e(s):g(t,o)?h(s,e):w.push(s))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,r=e.children.length;n<r;n++){let r=e.children[n],s=e.leaf?i(r):r;if(x(t,s)){if(e.leaf||g(t,s))return!0;w.push(r)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(t){if(!t)return this;let e,i=this._data,s=null,o=0,l=!1,h=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=I.pop()??0,l=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,r.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;l||i.leaf||!g(i,h)?s?(o++,i=s.children[o],l=!1):i=null:(v.push(i),I.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let r=i-e+1,s=this._maxEntries;if(r<=s){let n=new A(t.slice(e,i+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new B([]);o.height=n;let l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));M(t,e,i,h,this._compareMinX);for(let r=e;r<=i;r+=h){let e=Math.min(r+h-1,i);M(t,r,e,l,this._compareMinY);for(let i=r;i<=e;i+=l){let r=Math.min(i+l-1,e);o.children.push(this._build(t,i,r,n-1))}}return a(o,this._toBBox),o}_insert(t,e,i){let n=this._toBBox,r=i?t:n(t);v.clear();let s=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=e.children.length;s<o;s++){let o=e.children[s],l=y(o),h=p(t,o)-l;h<r?(r=h,n=l<n?l:n,i=o):h===r&&l<n&&(n=l,i=o)}e=i||e.children[0]}return e}(r,this._data,e,v);for(s.children.push(t),f(s,r);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(r,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),l=i.leaf?new A(o):new B(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(i,l)}_splitRoot(t,e){this._data=new B([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,r,s;n=r=1/0;for(let o=e;o<=i-e;o++){let e=u(t,0,o,this._toBBox),l=u(t,o,i,this._toBBox),h=_(e,l),a=y(e)+y(l);h<n?(n=h,s=o,r=a<r?a:r):h===n&&a<r&&(r=a,s=o)}return s}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,r=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let r=this._toBBox,s=u(t,0,e,r),o=u(t,i-e,i,r),l=m(s)+m(o);for(let n=e;n<i-e;n++){let e=t.children[n];f(s,t.leaf?r(e):e),l+=m(s)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(o,t.leaf?r(e):e),l+=m(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let r=t.data[e-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else a(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function h(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,r.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function a(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,r){r||=new A([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=e;o<i;o++)s=t.children[o],f(r,t.leaf?n(s):s);return r}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),s=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,r){let s=[e,i];for(;s.length;){let e=s.pop(),i=s.pop();if(e-i<=n)continue;let l=i+Math.ceil((e-i)/n/2)*n;(0,o.q)(t,l,i,e,r),s.push(i,l,l,e)}}const w=new s.A,b=new s.A,v=new s.A,I=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class B extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>h,Qh:()=>o,lM:()=>s,ro:()=>a,rq:()=>u});var n=i(44208),r=i(34275);function s(t){if(!t)return 0;let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return h(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let i=c;for(let n=0;n<e;n++)i+=l(t[n]);return i}(t);let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i]));return e}function l(t,e=!0){switch(typeof t){case"object":return e?o(t):f;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function h(...t){return t.reduce((t,e)=>t+a(e),0)}function a(t,e=16){return t?(0,r.iu)(t)?t.byteLength+y:Array.isArray(t)?u(t,e):0:0}function u(t,e){return c+t.length*e}const f=32,c=16,d=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,y=145;i.d(e,["JY",0,d])},48526(t,e,i){i.d(e,{A:()=>p});var n,r=i(32198),s=i(4576),o=i(4718),l=i(91429),h=i(5443),a=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),m=i(43937);let p=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:r}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new h.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,o.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:r}=this;return new n({points:(0,o.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:r})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,s.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)&&((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points")),this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],p.prototype,"points",void 0),(0,r.Cg)([(0,m.K)("points")],p.prototype,"writePoints",null),p=n=(0,r.Cg)([(0,l.$K)("esri.geometry.Multipoint")],p),p.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,r=i(32198),s=i(4718),o=i(91429),l=i(5443),h=i(91075),a=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends h.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,s.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new l.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,r=this.hasM;return n&&!r?new a.A(i[0],i[1],i[2],void 0,this.spatialReference):r&&!n?new a.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&r?new a.A(i[0],i[1],i[2],i[3],this.spatialReference):new a.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths")),this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new a.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new a.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths")),this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,r.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,r.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>o,cj:()=>s,jh:()=>r});var n=i(9093);function r(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function s(t){return[...t]}function o(t){let e=(0,n.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>s,Ox:()=>o,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class s{constructor(t,e,i,n=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=r,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,s,o,l,h,a,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,s=d,o=this._intersect(s,i),this._start=this._dist+y*(1-this._r),this._lineTo(o.x,o.y,!0),this._lineTo(s.x,s.y,!0));else if(this._prevIsIn)s=this._prevPt,i=d,o=this._intersect(s,i),this._lineTo(o.x,o.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(l=(this._xmin-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(l=(this._xmax-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(l=(this._ymin-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(l=(this._ymax-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymax))),0===i.length)h?a?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):a?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&l.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,s;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,s=(r-t.y)/(e.y-t.y),i=t.x+s*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,s=(i-t.x)/(e.x-t.x),r=t.y+s*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);n<o?(s=n,r=t.y+n*(e.y-t.y)):(s=o,i=t.x+o*(e.x-t.x))}return this._r=s,new n(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let r,s;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];let i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,s=this._line[this._line.length-2],s.x===t&&s.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===e)):(this._isH=s.x===t,this._isV=s.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=o)}else this._line.push(new n(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class l{static simplify(t,e,i){if(!i)return;let n=-e,r=t+e,s=-e,o=t+e,h=[],a=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let l,u=e[0],f=e.length;for(let i=1;i<f;++i)l=e[i],u.x===l.x&&(u.x<=n&&(u.y>l.y?(h.push(t),h.push(i),h.push(0),h.push(-1)):(a.push(t),a.push(i),a.push(0),a.push(-1))),u.x>=r&&(u.y<l.y?(h.push(t),h.push(i),h.push(1),h.push(-1)):(a.push(t),a.push(i),a.push(1),a.push(-1)))),u.y===l.y&&(u.y<=s&&(u.x<l.x?(h.push(t),h.push(i),h.push(2),h.push(-1)):(a.push(t),a.push(i),a.push(2),a.push(-1))),u.y>=o&&(u.x>l.x?(h.push(t),h.push(i),h.push(3),h.push(-1)):(a.push(t),a.push(i),a.push(3),a.push(-1)))),u=l}if(0===h.length||0===a.length)return;l.fillParent(i,a,h),l.fillParent(i,h,a);let f=[];l.calcDeltas(f,a,h),l.calcDeltas(f,h,a),l.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,r=e.length;for(let s=0;s<r;s+=4){let r=e[s],o=e[s+1],l=e[s+2],a=t[r][o-1],u=t[r][o],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==l)continue;let n=i[e],r=i[e+1],s=t[n][r-1],o=t[n][r];switch(l){case 0:case 1:if(h(a.y,s.y,o.y)&&h(u.y,s.y,o.y)){let t=Math.abs(o.y-s.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(h(a.x,s.x,o.x)&&h(u.x,s.x,o.x)){let t=Math.abs(o.x-s.x);t<f&&(f=t,c=e)}}}e[s+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let r=0;r<n;r+=4){let n=l.calcDelta(r,e,i,[]);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,n){let r=e[t+3];if(-1===r)return 0;let s=n.length;return s>1&&n[s-2]===r?0:(n.push(r),l.calcDelta(r,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let r=0;r<i;r+=4){let i=e[t[r]],s=t[r+1],o=n-t[r+3];switch(t[r+2]){case 0:i[s-1].x-=o,i[s].x-=o,1===s&&(i[i.length-1].x-=o),s===i.length-1&&(i[0].x-=o);break;case 1:i[s-1].x+=o,i[s].x+=o,1===s&&(i[i.length-1].x+=o),s===i.length-1&&(i[0].x+=o);break;case 2:i[s-1].y-=o,i[s].y-=o,1===s&&(i[i.length-1].y-=o),s===i.length-1&&(i[0].y-=o);break;case 3:i[s-1].y+=o,i[s].y+=o,1===s&&(i[i.length-1].y+=o),s===i.length-1&&(i[0].y+=o)}}}}const h=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>o,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>P,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>_,VL:()=>y,aI:()=>S,fA:()=>l,gE:()=>a,gX:()=>g,hZ:()=>I,iT:()=>d,is:()=>B,pg:()=>M,uJ:()=>p,vI:()=>v,vY:()=>h,vt:()=>s,w1:()=>u,yr:()=>m}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function l(t,e,i,n,r,o,l=s()){return l[0]=t,l[1]=e,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l}function h(t,e=s()){return function(t,e,i,n=s()){return I(n,C),function(t,e,i=0,n=e.length/3){let r=t[0],s=t[1],o=t[2],l=t[3],h=t[4],a=t[5];for(let t=0;t<n;t++)r=Math.min(r,e[i+3*t]),s=Math.min(s,e[i+3*t+1]),o=Math.min(o,e[i+3*t+2]),l=Math.max(l,e[i+3*t]),h=Math.max(h,e[i+3*t+1]),a=Math.max(a,e[i+3*t+2]);t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=h,t[5]=a}(n,t,e,i),n}(t,0,t.length/3,e)}function a(t,e=(0,r.jh)(24)){let[i,n,s,o,l,h]=t;return e[0]=i,e[1]=n,e[2]=s,e[3]=i,e[4]=n,e[5]=h,e[6]=i,e[7]=l,e[8]=s,e[9]=i,e[10]=l,e[11]=h,e[12]=o,e[13]=n,e[14]=s,e[15]=o,e[16]=n,e[17]=h,e[18]=o,e[19]=l,e[20]=s,e[21]=o,e[22]=l,e[23]=h,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function _(t){let e=y(t),i=p(t),n=m(t);return e*e+i*i+n*n}function g(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+p(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=m(t),e[2]=p(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function T(t){return t?I(t,C):s(C)}function P(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=r,t[5]=1/0,t}function B(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!B(t)||!B(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];s(),i.d(e,["qv",0,C,"v_",0,R])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function r(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function l(t){return void 0!==t.rings||void 0!==t.curveRings}function h(t){return"object"==typeof t&&"vertexAttributes"in t}function a(t){return t?s(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":l(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":r(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>a,Bi:()=>l,Pv:()=>u,Rg:()=>o,U9:()=>r,W0:()=>f,ZC:()=>n,fT:()=>s,uW:()=>h})},65864(t,e,i){i.d(e,{rS:()=>u,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),l=i(39829),h=i(82799),a=i(60408);function u(t){return null==t?null:t instanceof r.A?t:(0,a.fT)(t)?o.A.fromJSON(t):(0,a.Rg)(t)?h.A.fromJSON(t):(0,a.Bi)(t)?l.A.fromJSON(t):(0,a.U9)(t)?s.A.fromJSON(t):(0,a.ZC)(t)?n.A.fromJSON(t):null}const f={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:l.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:l.A};function c(t){return t&&f[t]||null}},43334(t,e,i){i.d(e,{N3:()=>l,Om:()=>o});var n=i(69397),r=i(27647),s=i(92722);class o{constructor(t,e,i,n,r=0,s=null,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=n,this.displayId=r,this.distance=s,this.vertexCount=o}static fromJSON(t){let e=t.geometry?s.A.fromJSON(t.geometry):null,i=t.centroid?s.A.fromJSON(t.centroid):null,n=t.objectId;return new o(e,t.attributes,i,n,void 0,t.distance,t.vertexCount)}weakClone(){return new o(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new o(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(t){return this.centroid??=(0,r.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(t){return!!t.geometry?.coords?.length}},58512(t,e,i){i.d(e,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let t=new n;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},92722(t,e,i){i.d(e,{A:()=>r});var n=i(69397);class r{constructor(t=[],e=[],i=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:n}){return new r(t,e,i||!1,n||!1)}static fromRect([t,e,i,n]){let s=i-t,o=n-e;return new r([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let t=0,e=0;for(let i of this.lengths){if(i<3)continue;let{stride:n}=this,r=this.coords[n*e],s=this.coords[n*e+1];for(let o=1;o<i;o+=1){let i=n*(e+o),l=this.coords[i],h=this.coords[i+1];t+=-.5*(l-r)*(h+s),r=l,s=h}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);let{stride:i}=this;for(let n of this.lengths){for(let r=0;r<n;r++){let n=i*(e+r);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){let t=this.clone(),{coords:e,lengths:i}=t,n=0,{stride:r}=this;for(let t of i){for(let i=1;i<t;i++){let t=r*(n+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}n+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let e=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return t?(t.set(s),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:t,size:e}=this;if(2===t)return this;let i=Array(e*t);for(let e=0,n=0;e<i.length;e+=t)i[n++]=this.coords[e],i[n++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},27647(t,e,i){i.d(e,{Q:()=>s});var n=i(92722);function r(t,e){return t?e?4:3:e?3:2}function s(t){if(null==t||!t?.lengths.length)return null;let{lengths:e,coords:i,stride:r,hasZ:s,hasM:h}=t,a=new n.A([],[],s,!1),u=a.coords,f=[],c=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],d=0;for(let t of e){let e=o(c,i,d,t,s,h);e&&f.push(e),d+=t*r}if(f.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&s&&(i=t[4]-e[4]),i}),f.length){let t=6*f[0][2];u[0]=f[0][0]/t,u[1]=f[0][1]/t,s&&(t=6*f[0][4],u[2]=0===t?0:f[0][3]/t),(u[0]<c[0]||u[0]>c[1]||u[1]<c[2]||u[1]>c[3]||s&&(u[2]<c[4]||u[2]>c[5]))&&(u.length=0)}if(!u.length){let n=t.lengths[0]?l(i,0,e[0],s,h):null;if(!n)return null;u[0]=n[0],u[1]=n[1],s&&(u[2]=n[2]??0)}return a}function o(t,e,i,n,s,o){let l=r(s,o),h=i,a=i+l,u=0,f=0,c=0,d=0,y=0;for(let i=0,r=n-1;i<r;i++,h+=l,a+=l){let i=e[h],n=e[h+1],r=e[h+2],o=e[a],l=e[a+1],m=e[a+2],p=i*l-o*n;d+=p,u+=(i+o)*p,f+=(n+l)*p,s&&(p=i*m-o*r,c+=(r+m)*p,y+=p),i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i),n<t[2]&&(t[2]=n),n>t[3]&&(t[3]=n),s&&(r<t[4]&&(t[4]=r),r>t[5]&&(t[5]=r))}if(d>0&&(d*=-1),y>0&&(y*=-1),!d)return null;let m=[u,f,.5*d];return s&&(m[3]=c,m[4]=.5*y),m}function l(t,e,i,n,s){let o=r(n,s),l=e,c=e+o,d=0,y=0,m=0,p=0;for(let e=0,r=i-1;e<r;e++,l+=o,c+=o){let e=t[l],i=t[l+1],r=t[l+2],s=t[c],o=t[c+1],_=t[c+2],g=n?a(e,i,r,s,o,_):h(e,i,s,o);if(g)if(d+=g,n){let t=f(e,i,r,s,o,_);y+=g*t[0],m+=g*t[1],p+=g*t[2]}else{let t=u(e,i,s,o);y+=g*t[0],m+=g*t[1]}}return d>0?n?[y/d,m/d,p/d]:[y/d,m/d]:i>0?n?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function h(t,e,i,n){let r=i-t,s=n-e;return Math.sqrt(r*r+s*s)}function a(t,e,i,n,r,s){let o=n-t,l=r-e,h=s-i;return Math.sqrt(o*o+l*l+h*h)}function u(t,e,i,n){return[t+.5*(i-t),e+.5*(n-e)]}function f(t,e,i,n,r,s){return[t+.5*(n-t),e+.5*(r-e),i+.5*(s-i)]}},6518(t,e,i){i.d(e,{F:()=>l});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let t=(0,s.Ie)();for(let e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){let e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){let e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(t,e,i){i.d(e,{A:()=>d});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),l=i(70328),h=i(19419),a=i(90708),u=i(6518),f=i(37730);const c=(0,l.vt)();class d{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=f.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,r]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:r,spatialReference:t}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,l.Jt)(c,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),t.geometry?.coords?.length?(i=(0,a.jQ)(i??(0,h.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0):(this._boundsStore.set(e,null),this._featuresById.set(e,t))}_upsert(t){let e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=t;for(let t in s)i.attributes[t]=s[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,a.jQ)((0,h.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},54339(t,e,i){function n(t,e){switch(e.type){case"object-id":case"unique-id-simple":return t.attributes[e.fieldName];case"unique-id-composite":{let i=[];for(let n of e.fieldNames)i.push(t.attributes[n]??null);return JSON.stringify(i)}}}function r(t,e){if("uniqueIdFields"in e&&e.uniqueIdFields?.length){if(1===e.uniqueIdFields.length)return t.attributes?.[e.uniqueIdFields[0]];let i=e.uniqueIdFields.map(e=>t.attributes?.[e]);return JSON.stringify(i)}return"objectIdField"in e&&e.objectIdField?t.attributes?.[e.objectIdField]:null}i.d(e,{W:()=>n,r:()=>r})},37730(t,e,i){var n=i(43334);const r={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,r])},31464(t,e,i){i.d(e,{Cv:()=>d,Nk:()=>c,lK:()=>m});var n=i(4576),r=i(99917),s=i(60408),o=i(21325),l=i(28735);const h=[0,0];function a(t,e){let i=(0,o.K8)(t)?l.je:l.tD;if((0,s.fT)(e)){let t={x:0,y:0};return[t.x,t.y]=i(e.x,e.y,h),null!=e.z&&(t.z=e.z),null!=e.m&&(t.m=e.m),t}if((0,s.ZC)(e)){let t={xmin:0,ymin:0,xmax:0,ymax:0};return[t.xmin,t.ymin]=i(e.xmin,e.ymin,h),[t.xmax,t.ymax]=i(e.xmax,e.ymax,h),e.hasZ&&(t.zmin=e.zmin,t.zmax=e.zmax,t.hasZ=!0),e.hasM&&(t.mmin=e.mmin,t.mmax=e.mmax,t.hasM=!0),t}if((0,s.Bi)(e))return{rings:u(e.rings,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.Rg)(e))return{paths:u(e.paths,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.U9)(e))return{points:f(e.points,i),hasM:e.hasM,hasZ:e.hasZ};throw Error()}function u(t,e){let i=[];for(let n of t)i.push(f(n,e));return i}function f(t,e){let i=[];for(let n of t){let t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function c(t,e){if(!t||!e)return;let i=Array.isArray(t)?t.map(t=>null==t.geometry?null:t.geometry.spatialReference).filter(n.Ru):[t];await(0,r.initializeProjection)(i.map(t=>({source:t,dest:e})))}function d(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,o.fn)(e)||!(0,o.fn)(i)||(0,o.aI)(e,i))return t;if((0,l.y7)(e,i)){let e=a(i,t);return e.spatialReference=i,e}let[s]=(0,r.projectMany)([t],e,i,n);return s}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,o.aI)(e,i))return t;let r={geometries:t,inSpatialReference:e,outSpatialReference:i,options:n,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;let t=this._jobs.shift();if(!t)return;let e,{geometries:i,inSpatialReference:n,outSpatialReference:s,resolve:o,options:h}=t,u=i.filter(t=>null!=t);e=(0,l.y7)(n,s)&&null==h?.extendedParams?u.map(t=>a(s,t)):(0,r.projectMany)(u,n,s,h);let f=0,c=i.map(t=>null==t?null:e[f++]);o.resolve(c),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(t,e,i,n){return y.push(t,e,i,n)}},90708(t,e,i){i.d(e,{Ap:()=>A,B2:()=>p,DF:()=>b,Di:()=>Z,E2:()=>F,IE:()=>m,Nl:()=>k,PR:()=>T,Rk:()=>U,Ux:()=>O,Ye:()=>S,ZF:()=>N,aQ:()=>V,jH:()=>X,jQ:()=>D,kz:()=>L,oN:()=>G,q3:()=>Y,qN:()=>v,zv:()=>j});var n=i(49186),r=i(53966),s=i(97768),o=i(70328),l=i(19419),h=i(60408),a=i(43334),u=i(58512),f=i(92722),c=i(54339);const d=()=>r.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function p({scale:t,translate:e},i){return Math.round((e[1]-i)/t[1])}function _({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function g({scale:t,translate:e},i){return Math.round((i-e[1])/t[1])}function x({scale:t,translate:e},i,n){return i*t[n]+e[n]}function M(t,e,i){return e&&(t.hasZ=!0),i&&(t.hasM=!0),t}function w(t,e,i,n){if(e&&n&&t!==i)return(e,i,n,r)=>{n[r++]=e[i++],n[r++]=e[i++],t?i++:n[r++]=0,n[r++]=e[i++]??0};let r=+!!i+2+ +!!n,s=r-((!t&&i?1:0)+(!e&&n?1:0));return(t,e,i,n)=>{for(let o=0;o<r;++o)i[n++]=o<s?t[e++]??0:0}}function b(t,e,i){if(!t)return null;let{coords:n,hasZ:r,hasM:s}=t,[o,l]=n,h=r?n[2]:0,a=s?n[+!!r+2]:0;return{x:o,y:l,z:e?h:void 0,m:i?a:void 0}}function v(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{x:n,y:r,z:s,m:o}=t,l=[n,r];return e&&l.push(s??0),i&&l.push(o??0),new f.A([],l,e,i)}function I(t,e,i){if(null==t)return null;let{coords:n,stride:r,hasZ:s,hasM:o}=t,l=w(s,o,e,i),h=[];for(let t=0;t<n.length;t+=r){let e=[];l(n,t,e,0),h.push(e)}return M({points:h},e,i)}function T(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{points:n,hasZ:r,hasM:s}=t,o=new f.A([n.length],[],e,i),{coords:l,stride:a}=o,u=0,c=w(r??!1,s??!1,e,i);for(let t of n)c(t,0,l,u),u+=a;return o}function P(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({paths:u},e,i)}function A(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{paths:n,hasZ:r,hasM:s}=t,o=w(r??!1,s??!1,e,i),l=new f.A([],[],e,i),{lengths:a,coords:u,stride:c}=l,d=0;for(let t of n){for(let e of t)o(e,0,u,d),d+=c;a.push(t.length)}return l}function B(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({rings:u},e,i)}function S(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{rings:n,hasZ:r,hasM:s}=t,o=new f.A([],[],e,i),{lengths:l,coords:a,stride:u}=o,c=0,d=w(r??!1,s??!1,e,i);for(let t of n){for(let e of t)d(e,0,a,c),c+=u;l.push(t.length)}return o}const C=[],R=[];function F(t,e,i,n,r){C[0]=t;let[s]=Z(R,C,e,i,n,r);return W(C),W(R),s}function Z(t,e,i,r,s,o){if(W(t),!i){for(let i of e){let e=(0,c.W)(i,o);t.push(new a.Om(null,i.attributes,null,e,void 0,i.distance,i.vertexCount))}return t}switch(i){case"esriGeometryPoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?v(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryMultipoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o}=s,l=(0,h.Pv)(e),u=(0,h.W0)(e);t.push(new a.Om(e?T(e,i&&l,n&&u):null,o,null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolyline":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?A(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?S(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),W(t)}return t}function G(t,e,i,n){R[0]=t,q(C,R,e,i,n);let r=C[0];return W(C),W(R),r}function O(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){return null==t?null:(0,h.fT)(t)?v(t,e,i):(0,h.Bi)(t)?S(t,e,i):(0,h.Rg)(t)?A(t,e,i):(0,h.U9)(t)?T(t,e,i):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function j(t,e,i,r){if(null==t)return null;let s="coords"in t?t:t.geometry;if(null==s)return null;switch(e){case"esriGeometryPoint":return b(s,i,r);case"esriGeometryMultipoint":return I(s,i,r);case"esriGeometryPolyline":return P(s,i,r);case"esriGeometryPolygon":return B(s,i,r);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function q(t,e,i,r,s){if(W(t),null==i)return function(t,e){for(let i of e)t.push({attributes:i.attributes});return t}(t,e);switch(i){case"esriGeometryPoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({attributes:s,geometry:b(r,i,n)});return t}(t,e,r,s);case"esriGeometryMultipoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&I(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolyline":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&P(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolygon":return function(t,e,i,n){for(let{geometry:r,attributes:s,centroid:o}of e){let e=B(r,i,n),l=b(o,!1,!1);t.push(o?{geometry:e,attributes:s,centroid:l}:{geometry:e,attributes:s})}return t}(t,e,r,s);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return t}function N(t){let{spatialReference:e,transform:i,fields:n,hasM:r,hasZ:s,features:o,geometryType:l,exceededTransferLimit:h,queryGeometry:a,queryGeometryType:u}=t,f={features:q([],o,l,s,r),fields:n,geometryType:l,spatialReference:e,queryGeometry:j(a,u,s,r)};return i&&(f.transform=i),h&&(f.exceededTransferLimit=h),r&&(f.hasM=r),s&&(f.hasZ=s),f}function Y(t,e){let i=new u.A,{hasM:n,hasZ:r,features:s,spatialReference:o,geometryType:l,exceededTransferLimit:h,transform:a,fields:f,globalIdFieldName:c}=t;return f&&(i.fields=f),i.geometryType=l??null,i.spatialReference=o??null,s&&Z(i.features,s,l,r,n,e),h&&(i.exceededTransferLimit=h),n&&(i.hasM=n),r&&(i.hasZ=r),a&&(i.transform=a),c&&(i.globalIdFieldName=c),i}function X(t,e){let{geometryType:i,features:n}=e;if(!t)return e;for(let e=0;e<n.length;e++){let r=n[e],s=r.weakClone();s.geometry=k(r.geometry,i,t),s.centroid=k(r.centroid,"esriGeometryPoint",t),n[e]=s}return e.transform=t,e}function k(t,e,i,n,r,s=!1){if(null==t||!t?.coords.length)return null;let o=y[e],{coords:l,lengths:h,stride:a,hasZ:u,hasM:c}=t;n??=u,r??=c;let d=new f.A([],[],n,r),x=d.stride,M=w(u,c,n,r),b=0,v=[0,0,0,0].slice(x),I=s?_:m,T=s?g:p;function P(){M(l,b,v,0),b+=a,v[0]=I(i,v[0]),v[1]=T(i,v[1])}if(t.isPoint)return P(),d.coords.push(...v),d;let A=0;for(let t of h){if(t<o)continue;let e=1;P(),d.coords.push(...v);let[i,n]=v;for(let r=1;r<t;r++){P();let[t,r]=v;(i!==t||n!==r)&&(s||(v[0]-=i,v[1]-=n),d.coords.push(...v),i=t,n=r,e++)}e>=o?(d.lengths.push(e),A=d.coords.length):W(d.coords,A)}return W(d.coords,A),d.coords.length?d:null}function L(t,e,i,n=t.hasZ,r=t.hasM){if(!t.coords.length)return null;let s=y[e],{coords:o,lengths:l,stride:h,hasZ:a,hasM:u}=t,c=new f.A([],[],n,r),d=c.stride,m=w(a,u,n,r);if(t.isPoint)return m(o,0,c.coords,0),c;let p=0,_=i*i;for(let t of l){if(t<s){p+=t*h;continue}let e=c.coords.length/d,i=p,n=p+(t-1)*h;m(o,i,c.coords,c.coords.length),E(c.coords,o,h,_,m,i,n),m(o,n,c.coords,c.coords.length);let r=c.coords.length/d-e;r>=s?c.lengths.push(r):W(c.coords,e*d),p+=t*h}return c.coords.length?c:null}function z(t,e,i,n){let r=t[e],s=t[e+1],o=t[i],l=t[i+1],h=t[n],a=t[n+1],u=o,f=l,c=h-u,d=a-f;if(0!==c||0!==d){let t=((r-u)*c+(s-f)*d)/(c*c+d*d);t>1?(u=h,f=a):t>0&&(u+=c*t,f+=d*t)}return c=r-u,d=s-f,c*c+d*d}function E(t,e,i,n,r,s,o){let l,h=n,a=0;for(let t=s+i;t<o;t+=i)l=z(e,t,s,o),l>h&&(a=t,h=l);h>n&&(a-s>i&&E(t,e,i,n,r,s,a),r(e,a,t,t.length),o-a>i&&E(t,e,i,n,r,a,o))}function D(t,e){if(!e?.coords?.length)return null;let i=1/0,n=1/0,r=-1/0,s=-1/0,{coords:h,stride:a}=e;for(let t=0;t<h.length;t+=a){let e=h[t],o=h[t+1];i=Math.min(i,e),r=Math.max(r,e),n=Math.min(n,o),s=Math.max(s,o)}return(0,o.is)(t)?(0,o.BI)(t,i,n,r,s):(0,l.fA)(i,n,r,s,t),t}function V(t,e){let{coords:i,lengths:n,stride:r,hasZ:o,hasM:l}=t;if(!i.length)return void(n.length=0);(0,s.Lw)(e);let{originPosition:h,scale:a,translate:u}=e,f=$;f.originPosition=h;let c=f.scale;c[0]=a[0]??1,c[1]=-(a[1]??1),c[2]=a[2]??1,c[3]=a[3]??1;let d=f.translate;if(d[0]=u[0]??0,d[1]=u[1]??0,d[2]=u[2]??0,d[3]=u[3]??0,l&&!o&&(c[2]=c[3],d[2]=d[3]),!n.length){for(let t=0;t<r;++t)i[t]=x(f,i[t],t);return void(n.length=0)}let y=0;for(let t=0;t<n.length;t++){let e=n[t];n[t]=e;for(let t=0;t<r;++t)i[y+t]=x(f,i[y+t],t);let s=i[y],o=i[y+1];y+=r;for(let t=1;t<e;t++,y+=r){s+=i[y]*c[0],o+=i[y+1]*c[1],i[y]=s,i[y+1]=o;for(let t=2;t<r;++t)i[y+t]=x(f,i[y+t],t)}}}function J(t,e,i,n){let r=0,s=t[n*e],o=t[n*(e+1)];for(let l=1;l<i;l++){let i=s+t[n*(e+l)],h=o+t[n*(e+l)+1],a=(i-s)*(h+o);s=i,o=h,r+=a}return.5*r}function U(t,e){let{coords:i,lengths:n}=t,r=0,s=0;for(let t=0;t<n.length;t++){let o=n[t];s+=J(i,r,o,e),r+=o}return Math.abs(s)}function W(t,e=0){t.length!==e&&(t.length=e)}const $={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>P,sO:()=>I,xD:()=>f});var n=i(67482),r=i(49186),s=i(21325),o=i(90708),l=i(43334),h=i(92722),a=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function m(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],r=t[(i+1)%t.length];e+=n[0]*r[1]-r[0]*n[1]}return e<=0}function p(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function _(t,e){let{coordinates:i,type:n}=t,r=e.hasZ??!1;switch(n){case"Point":{let t=r||3!==i.length?r&&2===i.length?[...i,0]:[...i]:i.slice(0,2);return new h.A([],t,r,!1)}case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let t=new h.A([],[],r,!1);for(let e of"Polygon"===n?[i]:i){g(t,e[0],r);for(let i=1;i<e.length;i++)x(t,e[i],r)}return t}}}function g(t,e,i){p(e),function(t){return!m(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){p(e),function(t){return m(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],r){t.coords.push(e,i),r&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],r=new Set,s=new Set,o=!1,l=null,h=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:m}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(o||=y(d(t)),h||(h=null!=m,h&&(i=typeof m,c&&(l=Object.keys(c).filter(t=>c[t]===m)))),c&&l&&h&&null!=m&&(l.length>1?l=l.filter(t=>c[t]===m):1===l.length&&(l=c[l[0]]===m?l:[])),c))for(let t in c){if(r.has(t))continue;let e=v(c[t]);if("unknown"===e){s.add(t);continue}s.delete(t),r.add(t);let i=(0,a.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let m=(0,a.rS)(1===l?.length&&l[0]||null)??void 0;if(m)for(let t of n)if(t.name===m&&(0,a.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:o,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(s)}}function P(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let r of t){let{geometry:t,properties:s,id:o}=r;if(t&&f(t.type)!==i)continue;let h,a=s||{};n&&(h=a[n],null!=o&&!h&&(a[n]=h=o)),yield new l.Om(t&&_(t,e),a,null,h)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>P});var n=i(56507),r=i(17676),s=i(19419),o=i(21325),l=i(6774),h=i(90708),a=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let r=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-r)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function m(t,e,i){let n=new y;return n.writeMessage(3,p,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function p(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,_,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function _(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,g,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function g(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let r=w(i[n]);if(null==r)continue;let s=t.keyIndices.get(n);s??(s=t.keys.length,t.keyIndices.set(n,s),t.keys.push(n));let o=`${typeof r}:${r}`,l=t.valueIndices.get(o);l??(l=t.values.length,t.valueIndices.set(o,l),t.values.push(r)),e.writeVarint(s),e.writeVarint(l)}}function x(t,e){let i=t.getType(),n=0,r=0;for(let s=0;s<t.getPathCount();s++){let o=t.getPathLength(s),l=1===i?o:1;e.writeVarint(b(1,l));let h=3===i?o-1:o;for(let o=0;o<h;o++){1===o&&1!==i&&e.writeVarint(b(2,h-1));let l=t.getX(s,o),a=t.getY(s,o);e.writeVarint(v(l-n)),e.writeVarint(v(a-r)),n=l,r=a}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class P{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._webMercatorStores=null,this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();for(let{store:t}of this._webMercatorStores??[])t.clear();this._webMercatorStores=null,this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},s={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let o="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:s.signal})).data:t.data;(0,r.Te)(s),(0,c.sO)(o),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let l=0;for(let{geometryType:e,vectorTileGeometryType:i}of T){let n=(0,c.bd)(o,{geometryType:e,hasZ:!1}),r=A(o,e,t);if(0===n.length)continue;let s=new u.A({geometryType:e,hasM:!1,hasZ:!1}),h=[];for(let[t,e]of n.entries())e.geometry&&(e.objectId=l++,this._featureIds.set(e.objectId,r[t]??null),h.push(e));h.length>0&&(s.addMany(h),this._stores.push({geometryType:e,store:s,vectorTileGeometryType:i}))}return(0,r.Te)(s),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile(t,e={}){(0,r.Te)(e);let i=this._getTileFeatures(t),n=i.length>0?m(this._name,new S(i),I):new ArrayBuffer(0);return(0,r.Te)(e),{result:n,transferList:[n]}}_getStores(t){return(0,o.K8)(t)?(this._webMercatorStores||=this._stores.map(({geometryType:t,store:e,vectorTileGeometryType:i})=>{let n=new u.A({geometryType:t,hasM:!1,hasZ:!1});return e.forEach(e=>{let i=function(t,e){return t?(0,h.Ux)((0,f.Cv)((0,h.zv)(t,e,!1,!1),o.KK,o.ch))??null:null}(e.geometry,t);if(i){let t=e.weakClone();t.geometry=i,n.add(t)}}),{geometryType:t,store:n,vectorTileGeometryType:i}}),this._webMercatorStores):this._stores}_getTileFeatures({col:t,row:e,origin:i,tileSpan:n,spatialReference:r}){let l=i.x+t*n,h=i.y-e*n,{valid:a}=(0,o.Vp)(r),u=a[1]-a[0],f=this._getStores(r),c=n/I,d=this._buffer*c,y=this._tolerance*c,m=[];for(let t of[-u,0,u]){let e=(0,s.fA)(l-d-t,h-n-d,l+n+d-t,h+d),i={scale:[c,-c,1,1],translate:[l-t,h,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:r}of f)n.forEachInBounds(e,e=>{let n=B(e,t,r,i,y,this._buffer);n&&m.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:r})})}return m}}function A(t,e,i){let n=[],r="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<r.length;t++){let s=r[t];if(!s.geometry||(0,c.xD)(s.geometry.type)!==e)continue;let o=i.promoteId?s.properties?.[i.promoteId]:!0===i.generateId?t:s.id;n.push("number"==typeof o||"string"==typeof o?o:null)}return n}function B(t,e,i,n,r,s){if(!t.geometry)return null;let o=r>0?(0,h.kz)(t.geometry,e,r,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new l.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let r of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<r;e++){let r=i+e*t.stride;n.lineTo(t.coords[r],t.coords[r+1])}3===e&&n.close(),i+=r*t.stride}}let r=n.result();if(!r)return null;let s=1===e?[r.length]:r.map(t=>t.length),o=[];for(let t of r)for(let e of t)o.push(e.x,e.y);return new a.A(s,o)}((0,h.Nl)(o,e,n,!1,!1,!0),i,s)}class S{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6874],{66344(e,t,i){i.d(t,{q:()=>o});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,a){t=e.id+t;let o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.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 n=1+Math.max(a,-4)- -3;this._db.set(t,new l(i,s,n)),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:l}=i;if(r.startsWith(s)){let i=t[l]||0;t[l]=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(a)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l: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[l,o]of this._db)if(0===o.lifetime&&(!r||l.startsWith(r))){let r=t??this._clients.get(l.split(a)[0]);if(this._purgeItem(l,o,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(let[s,l]of this._db)if(!r||s.startsWith(r)){let r=t??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,l,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 l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{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:()=>f,Ke:()=>p,QA:()=>g,Tj:()=>u,UT:()=>y,aD:()=>v,jJ:()=>h});var r=i(32198),s=i(69622),l=i(97768),a=i(17676),o=i(10107),n=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function g(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new m(e,t)}let m=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,l.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=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,r.Cg)([(0,n.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{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)}}}},69397(e,t,i){i.d(t,{Qf:()=>n,Qh:()=>a,lM:()=>l,ro:()=>h,rq:()=>u});var r=i(44208),s=i(34275);function l(e){if(!e)return 0;let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return n(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function n(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?u(e,t):0:0}function u(e,t){return d+e.length*t}const c=32,d=16,p=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,f=145;i.d(t,["JY",0,p])},83027(e,t,i){const r=i(29953).ho;i.d(t,["h",0,r])},35982(e,t,i){i.d(t,{B:()=>u});var r=i(4576),s=i(71511),l=i(36563),a=i(53966),o=i(97768),n=i(17676),h=i(83027);class u{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:r}).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=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new c(e,t);return this._listeners.push(i),this._connectListener(i),(0,l.hA)(()=>{(0,r.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,o.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,r){return this._invokeMethod(e,[t],i,r)}invokeMethodWithArgs(e,t,i,r){return this._invokeMethod(e,t,i,r)}_invokeMethod(e,t,i,r){if(this._thread){let s=this._transferLists[e],l=s?s(...t):[];return this._thread.apply(e,t,{transferList:l,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,n.Te)(i),this._invokeMethod(e,t,i,r))):Promise.reject((0,n.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,n.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 c{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 d(){}},54239(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),l=i(4576),a=i(66552),o=i(25482),n=i(86211),h=i(67076),u=i(91429),c=i(97348),d=i(43937),p=i(36005);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,l.Xy)(g,"orthometric");const y=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=r=class extends o.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,n.LA)(e)||y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:i}=e;if(!i)return null;let s=(null==t?null:c.B.get(t))??c.B.get(i);return s?new r({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,n.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,u.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:{writer:y.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],m)},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var r=i(32198),s=i(56507),l=i(49186),a=i(97768),o=i(25728),n=i(17676),h=i(84952),u=i(91429),c=i(4146),d=i(89186),p=i(18768),f=i(85707),g=i(34287),y=i(8303),m=i(10873),v=i(87378),_=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,f.a)((0,d.f)((0,p.b)((0,g.q)((0,y.A)((0,o.M)(c.A))))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null==e?(t=new w,b.set(null,t)):(t=new w(t=>e.immediate.schedule(t)),b.set(e,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){let i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let i=t.currentVersion;return i||=9.3,i}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new l.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(n.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,r){let a=r?.signal,o={responseType:"array-buffer",signal:a,useQueue:r?.useQueue,priority:r?.priority},n={noDataValue:r?.noDataValue};await this.load(),await this._fetchTileAvailability(e,t,i,r);let h=await(0,s.A)(this.getTileUrl(e,t,i),o),u=await this._lercDecoder.decode(h.data,n,a);if(!u)throw new l.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:u.pixelData,width:u.width,height:u.height,noDataValue:u.noDataValue})}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){let{query:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}async queryElevationForGround(e,t){let{queryElevationFromTiles:r}=await i.e(4943).then(()=>i(54943));return r(this,e,t)}async createElevationSampler(e,t){let{createSampler:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;let t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,u.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},89186(e,t,i){var r=i(32198),s=i(91429),l=i(16930),a=i(87045),o=i(65509),n=i(25943),h=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:s,maxLOD:l,minScale:h,maxScale:u}=t;if(null==s&&null==l&&(0!==h||0!==u)){let e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);s=t>=h?i.level:s,l=t>=u?i.level:l}}if(r)return new n.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){let e=new a.A;return e.read(t.tileInfo,i),new o.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var r=i(32198),s=i(53966),l=i(91429),a=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},85707(e,t,i){var r=i(32198),s=i(91429),l=i(54239);i.d(t,["a",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,type:l.A})],i.prototype,"heightModelInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],i),i}])},8303(e,t,i){var r=i(32198),s=i(92602),l=i(70333),a=i(56507),o=i(60999),n=i(49186),h=i(36563),u=i(53966),c=i(97768),d=i(17676),p=i(84952),f=i(91429),g=i(77548),y=i(20655),m=i(80812),v=i(41318),_=i(10407),w=i(26121),b=i(36005),C=i(43937);const M={credential:null,user:null};i.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new m.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:r}=await i.e(1204).then(()=>i(41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let r=t?.signal?null:new AbortController;try{let{reload:s}=await i.e(1204).then(()=>i(41204));return r&&this.addHandles((0,h.rE)(r),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:r.signal})}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{r&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);let r,s,a=!l.id?.findCredential(this.url),o=e===i.id;if(o&&i.portal.user)return this._getUserPrivileges(i,a);if(o)r=i.portal.url;else try{r=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!r||!(0,p.b8)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(l.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await i.reload():(i=new m.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;let i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;let r=`${i.owningSystemUrl}/sharing/rest`,s=y.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;let n=`${r}/community/self`,h=null==e?null:e.signal,u=await(0,o.Ke)((0,a.A)(n,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,w.wN)(this.portalItem,t)?(t?.messages?.push(new n.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,f.MZ)({type:m.default})],A.prototype,"portalItem",null),(0,r.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,r.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,r.Cg)([(0,f.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,r.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],A),A}])},87378(e,t,i){i.d(t,{A:()=>o});var r,s=i(34275),l=i(78888);const a=Symbol("ElevationTileDataClass");class o{static{r=a}constructor({values:e,width:t,height:i,noDataValue:l}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,s.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=l}get hasNoDataValues(){if(null==this._hasNoDataValues){let e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;let{noDataValue:e,values:t}=this,i=1/0,r=-1/0,s=!0;for(let l of t)l===e?this._hasNoDataValues=!0:(i=l<i?l:i,r=l>r?l:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}static{this.from=(0,l.qf)(o)}}},91806(e,t,i){i.d(t,{A:()=>n});var r,s=i(32198),l=i(25482),a=i(91429),o=i(78888);let n=class extends l.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,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"cols",void 0),(0,s.Cg)([(0,a.MZ)({type:o.jz,json:{write:!0}})],n.prototype,"level",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],n.prototype,"levelValue",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"origin",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"resolution",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"rows",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"scale",void 0),n=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.LOD")],n)},87045(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),l=i(66552),a=i(25482),o=i(86211),n=i(91429),h=i(78888),u=i(86738),c=i(16930),d=i(21325),p=i(28735),f=i(91806),g=i(72802),y=i(36005),m=i(43937);const v=new l.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 _=class extends a.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=c.A.WebMercator,numLODs:a=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new f.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new u.A(0,0,l),size:[s,s],spatialReference:l})}let n=(0,d.Vp)(l),h=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):n?new u.A({x:n.origin[0],y:n.origin[1],spatialReference:l}):new u.A({x:0,y:0,spatialReference:l}),p=1/(39.37*(0,o.GA)(l)*96),g=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*p;g.push(new f.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(a/t);g.push(new f.A({level:0,scale:e,resolution:e*p}));for(let r=1;r<i;r++){let i=e/2**t,s=i*p;g.push(new f.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:g,origin:h,size:[s,s],spatialReference:l})}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,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.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,l,a=this.lodAt(e);if(!a)return null;if("number"==typeof t)s=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))s=t.x,l=t.y,r=i;else{let e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,l=e.y,r=i}let o=a.resolution*this.size[0],n=a.resolution*this.size[1];return r??=new g.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/n+.001),r.col=Math.floor((s-this.origin.x)/o+.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,l=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)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!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],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,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:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:s,resolution:l}))}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,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s.Cg)([(0,n.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,s.Cg)([(0,y.w)("origin")],_.prototype,"readOrigin",null),(0,s.Cg)([(0,n.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s.Cg)([(0,y.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s.Cg)([(0,m.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],_.prototype,"writeSize",null),(0,s.Cg)([(0,n.MZ)({type:c.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=r=(0,s.Cg)([(0,n.$K)("esri.layers.support.TileInfo")],_)},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(17676);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);let a=this.getAvailability(e,t,i);if("unavailable"===a)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return a}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;let a=this.tileInfo;return a.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(a.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}},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)}}},25943(e,t,i){i.d(t,{d:()=>C});var r,s=i(32198),l=i(56507),a=i(69622),o=i(49186),n=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(17676),d=i(36708),p=i(76030),f=i(84952),g=i(91429),y=i(72802),m=i(4718),v=i(69397);class _{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,s=this.location.height,l=!0,a=!0,n=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*s/32)),h=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(a=!1,n[h]|=1<<t):l=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,v.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||l.A,{row:r,col:s,width:a,height:n}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:n},valid:!0,data:Array(a*n).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==n))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:n}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function w(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof _){let s=r.getAvailability(t,i);if("unavailable"===s)throw b(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;let l=this.layer.tileInfo;l.updateTileInfo(r);let a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;let a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;let o=new AbortController;l.then(()=>o.abort(),()=>o.abort());let h=!1,u=(0,n.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(u,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(o))return;let d=new y.U(e,t,i),f={...s,signal:o.signal},g=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&g.upsampleTile(d);++e){let e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);let a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));let i=w(s),l=this._pendingTilemapRequests[i];if(!l){l=_.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let s=w(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=r=(0,s.Cg)([(0,g.$K)("esri.layers.support.TilemapCache")],C)},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>o,bK:()=>n,sQ:()=>c});var r=i(99917),s=i(16930),l=i(28735);function a(e,t){if(!o(e,t)){let i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function n(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){let i=e.typeKeywords;if(i){let e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){let t,i=e.clone().normalize();if(i.length>1)for(let e of i)t?e.width>t.width&&(t=e):t=e;else t=i[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);let i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){let{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges,l=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit"),o="update"===r||"admin"===r;return o?a=l=!0:a&&(l=!0),{features:{edit:l,fullEdit:a},content:{updateItem:o}}}i.d(t,["mm",0,d])},78553(e,t,i){i.d(t,{D:()=>l,p:()=>s});var r=i(78888);function s(e){let t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}},26121(e,t,i){i.d(t,{I6:()=>u,ci:()=>h,dL:()=>n,wN:()=>c});var r=i(49186),s=i(84952),l=i(77548),a=i(20655),o=i(59923);async function n(e){let t=[];for(let i of e.allLayers)if("beforeSave"in i&&"function"==typeof i.beforeSave){let e=i.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function h(e,t,i){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:i})=>new r.A(e,t,i));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),i){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:r}=i;e&&(s=s.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),r&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new r.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function u(e){return(0,l.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let i=t?.portal,r=e?.id&&(e.portal||a.A.getDefault());return!!i&&!!r&&!(0,s.ut)(r.restUrl,i.restUrl)}}}]);