@arcgis/core 4.33.0-next.20250423 → 4.33.0-next.20250424

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 (204) hide show
  1. package/Graphic.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/analysis/Analysis.d.ts +4 -0
  4. package/analysis/Analysis.js +1 -1
  5. package/analysis/SliceAnalysis.js +1 -1
  6. package/analysis/SlicePlane.js +1 -1
  7. package/analysis/support/AnalysisOriginWebScene.d.ts +4 -0
  8. package/analysis/support/AnalysisOriginWebScene.js +5 -0
  9. package/analysis/support/SliceAnalysisExcludedLayer.js +5 -0
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/{d4d011eea16a89a5aad9.js → 0219c3f9408d3fa3c9a0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{4f8782b3b6ad414409e8.js → 0a48b9734ab4c64a6f4f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ccc50f28f217e50cc2c3.js → 1427e7953c3d8c87c5e8.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{184d7c8ea818bec5c462.js → 146b3699a9e8b1f2dcc2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{8ba7d44eff348004f084.js → 1a6d2d090b643a87408a.js} +1 -1
  16. package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/{5e5225623977e61fd0ef.js → 213adc87c843d627c5d6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{fa8a3c75f9b41d31559b.js → 265f69d153b7b6f07e42.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{769b66cca8347f0f84db.js → 279bbd61b32577693a4a.js} +1 -1
  20. package/assets/esri/core/workers/chunks/290b065b377f9d2ee058.js +1 -0
  21. package/assets/esri/core/workers/chunks/29d3245261a7223124ed.js +1 -0
  22. package/assets/esri/core/workers/chunks/335b539893569e3d7b82.js +1 -0
  23. package/assets/esri/core/workers/chunks/5958af341014e13475d2.js +1 -0
  24. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +1 -0
  25. package/assets/esri/core/workers/chunks/{26e0a0a13060cd3e4291.js → 626ba3a7dee952308566.js} +1 -1
  26. package/assets/esri/core/workers/chunks/7cd32b10ed0e18e44ef2.js +1 -0
  27. package/assets/esri/core/workers/chunks/7ffa68d69c138db1295d.js +1 -0
  28. package/assets/esri/core/workers/chunks/91f8547a13f0461045ef.js +1 -0
  29. package/assets/esri/core/workers/chunks/9661ee8569ee208e6237.js +1 -0
  30. package/assets/esri/core/workers/chunks/974742af7beb000c4b4a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e27fa1e84f16b7f19a90.js → 9850ff14bd9c7da81c65.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{a276980c06d5d311a37e.js → 9f416cc5673665f8c37c.js} +1 -1
  33. package/assets/esri/core/workers/chunks/a0c51c4c30a5f749dfc6.js +1 -0
  34. package/assets/esri/core/workers/chunks/{fdcbd28f38bc485ac5e3.js → ab6ecd8eeec5ff761b34.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{5bdd5ae2d2f23ef6b331.js → c87e2a63b96e0da77dfe.js} +1 -1
  36. package/assets/esri/core/workers/chunks/cc4dd739c4c7e3ccea3f.js +1 -0
  37. package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +1 -0
  38. package/assets/esri/core/workers/chunks/{26fcbe053194bd78fcc3.js → d8474dca270b25705699.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{7c42281188b874ffcdad.js → db5913824d5e5a2a8365.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{48a1bb1e171dd06a7c6e.js → dd94585508f49863dc15.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{9408a72968cbd985dd24.js → f2cef954b58c6604642c.js} +34 -34
  42. package/chunks/BloomBlur.glsl.js +7 -7
  43. package/chunks/BloomComposition.glsl.js +24 -25
  44. package/chunks/cameraUtilsSpherical.js +1 -1
  45. package/chunks/sphere.js +1 -1
  46. package/core/Collection.js +1 -1
  47. package/core/JSONSupport.js +1 -1
  48. package/core/SetUtils.js +1 -1
  49. package/{views/webgl/GLObjectType.js → core/support/jsonUtils.js} +1 -1
  50. package/core/urlUtils.js +1 -1
  51. package/geometry/Mesh.js +1 -1
  52. package/geometry/support/normalizeUtilsSync.js +1 -1
  53. package/geometry/support/sphere.js +1 -1
  54. package/interfaces.d.ts +344 -111
  55. package/layers/DimensionLayer.js +1 -1
  56. package/layers/RouteLayer.js +1 -1
  57. package/layers/SubtypeGroupLayer.js +1 -1
  58. package/layers/ViewshedLayer.js +1 -1
  59. package/layers/graphics/data/QueryEngine.js +1 -1
  60. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  61. package/layers/orientedImagery/transformations/utils.js +1 -1
  62. package/layers/support/FieldsIndex.js +1 -1
  63. package/layers/support/VideoElement.js +1 -1
  64. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  65. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  66. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  67. package/layers/support/rasterFormats/{TiffTags.js → tiffTag.js} +1 -1
  68. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  69. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  70. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  71. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  72. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  73. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  74. package/layers/support/videoUtils.js +5 -0
  75. package/package.json +1 -1
  76. package/portal/schemas/definitions.js +1 -1
  77. package/renderers/UniqueValueRenderer.js +1 -1
  78. package/renderers/support/colorRampUtils.js +1 -1
  79. package/support/revision.js +1 -1
  80. package/symbols/IconSymbol3DLayer.js +1 -1
  81. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  82. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  84. package/views/2d/engine/webgl/textureUtils.js +1 -1
  85. package/views/2d/layers/MediaLayerView2D.js +1 -1
  86. package/views/2d/layers/TileLayerView2D.js +1 -1
  87. package/views/2d/layers/support/DebugOverlay.js +1 -1
  88. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  89. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  90. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  91. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  92. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +1 -1
  93. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  94. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  95. package/views/3d/camera/constraintUtils/distance.js +1 -1
  96. package/views/3d/camera/intersectionUtils.js +1 -1
  97. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  98. package/views/3d/environment/atmosphereUtils.js +1 -1
  99. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  100. package/views/3d/interactive/visualElements/EngineVisualElement.js +1 -1
  101. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  102. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  103. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  104. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  105. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  106. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  107. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  108. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  109. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  110. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  111. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  112. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  113. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  114. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
  115. package/views/3d/interactive/visualElements/VisualElement.js +1 -1
  116. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  117. package/views/3d/layers/I3SMeshView3D.js +1 -1
  118. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  119. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  120. package/views/3d/state/ConstraintsManager.js +1 -1
  121. package/views/3d/state/NearFarHeuristic.js +1 -1
  122. package/views/3d/state/ViewState.js +1 -1
  123. package/views/3d/state/ViewStateManager.js +1 -1
  124. package/views/3d/state/utils/navigationUtils.js +1 -1
  125. package/views/3d/support/cameraUtilsSpherical.js +1 -1
  126. package/views/3d/support/geometryUtils/sphere.js +1 -1
  127. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  128. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  129. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  130. package/views/3d/webgl-engine/core/FBOCacheFormats.js +5 -0
  131. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +12 -14
  132. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
  133. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  134. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  135. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  136. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  137. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  138. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  139. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  140. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  141. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  142. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  143. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  144. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  145. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  146. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  147. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  148. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  149. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  150. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  151. package/views/SceneView.js +1 -1
  152. package/views/VideoView.js +1 -1
  153. package/views/webgl/FBOAttachmentType.js +5 -0
  154. package/views/webgl/FramebufferObject.js +1 -1
  155. package/views/webgl/Renderbuffer.js +1 -1
  156. package/views/webgl/RenderbufferDescriptor.js +1 -1
  157. package/views/webgl/Texture.js +1 -1
  158. package/views/webgl/TextureDescriptor.js +1 -1
  159. package/views/webgl/textureUtils.js +1 -1
  160. package/webscene/InitialViewProperties.js +1 -1
  161. package/webscene/Presentation.js +1 -1
  162. package/webscene/Slide.js +1 -1
  163. package/webscene/SlideLegendInfo.js +1 -1
  164. package/webscene/background/ColorBackground.js +1 -1
  165. package/webscene/spec-certification/api.js +1 -1
  166. package/webscene/spec-certification/compare.js +1 -1
  167. package/webscene/spec-certification/index.js +1 -1
  168. package/webscene/spec-certification/spec.js +1 -1
  169. package/webscene/spec-certification/utils.js +1 -1
  170. package/webscene/support/Description.js +1 -1
  171. package/webscene/support/SlideElements.js +1 -1
  172. package/webscene/support/SlideEnvironment.js +1 -1
  173. package/webscene/support/SlideGround.js +1 -1
  174. package/webscene/support/SlideVisibleLayer.js +1 -1
  175. package/webscene/support/Title.js +1 -1
  176. package/webscene/support/analysisUtils.js +5 -0
  177. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  178. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  179. package/widgets/Editor/EditorViewModel.js +1 -1
  180. package/widgets/Editor/UpdateWorkflow.js +1 -1
  181. package/widgets/Editor/support/SketchController.js +5 -0
  182. package/widgets/Editor/workflowUtils.js +1 -1
  183. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  184. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  185. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  186. package/widgets/FeatureTable.js +1 -1
  187. package/widgets/LayerList/LayerListItem.js +1 -1
  188. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  189. package/widgets/Widget.js +1 -1
  190. package/widgets/support/SelectionList.js +1 -1
  191. package/widgets/support/SnappingControls.js +1 -1
  192. package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +0 -1
  193. package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +0 -1
  194. package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +0 -1
  195. package/assets/esri/core/workers/chunks/5ffc3ca6c6a4d32e1282.js +0 -1
  196. package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +0 -1
  197. package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +0 -1
  198. package/assets/esri/core/workers/chunks/95379fdd6917c8a84c71.js +0 -1
  199. package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +0 -1
  200. package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +0 -1
  201. package/assets/esri/core/workers/chunks/d81bebbb6fe000200d35.js +0 -1
  202. package/assets/esri/core/workers/chunks/dd8e72d6784a8ebc115d.js +0 -1
  203. package/assets/esri/core/workers/chunks/e9fba86036b8fe700a41.js +0 -1
  204. package/views/webgl/formats.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4587],{431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>w,hx:()=>F,Jb:()=>x});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),h=r[n],l=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*h+2*o]=t,u[2*h+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];l(n,o,e),l(o,r,e),l(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(h+i[t],h+i[t+1]);const f=new Int32Array(3*o),m=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,T=(t,e)=>{const n=m(t,e);f[3*e+n]=-1},_=(t,e,n,o)=>{const r=m(t,e);f[3*e+r]=o;const i=m(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*h+2*o];n===r?(_(t,u[2*e+1],r,u[2*h+2*o+1]),e++,o++):n<r?(T(t,u[2*e+1]),e++):(T(r,u[2*h+2*o+1]),o++)}for(;e<n;)T(t,u[2*e+1]),e++;for(;o<s;)T(u[2*h+2*o],u[2*h+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),h=n(51850),l=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,h=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,l=e*i;t[l]=m(u),t[l+1]=m(h)}function m(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class T{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:p}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const _=new Float32Array(6),g=new Uint32Array(_.buffer),O=new Uint32Array(1);function p(t){return _[0]=t.position0[0],_[1]=t.position0[1],_[2]=t.position0[2],_[3]=t.position1[0],_[4]=t.position1[1],_[5]=t.position1[2],O[0]=31*(31*(31*(31*(31*(166811+g[0])+g[1])+g[2])+g[3])+g[4])+g[5],O[0]}function A(t){const e=_;e[0]=N(t.position0[0]),e[1]=N(t.position0[1]),e[2]=N(t.position0[2]),e[3]=N(t.position1[0]),e[4]=N(t.position1[1]),e[5]=N(t.position1[2]),O[0]=5381;for(let t=0;t<g.length;t++)O[0]=31*O[0]+g[t];return O[0]}const E=1e4;function N(t){return Math.round(t*E)/E}class R{constructor(){this._commonWriter=new T}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.g)(I,n.faceNormal0,n.faceNormal1),(0,u.n)(I,I);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,I[0],I[1],I[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,l.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new T}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,l.U)(a.In,1)}}const I=(0,h.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return L.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,L,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new P(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:i}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class P{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const L=new R,C=new S,x=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),w=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4341:(t,e,n)=>{n.d(e,{I:()=>r});var o=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,h=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,h,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),h=i?t.length/e:t.byteLength/(4*e),l=i?t:new Uint32Array(t,0,h*e),d=n?.minReduction??0,f=n?.originalIndices||null,m=f?f.length:0,T=n?.componentOffsets||null;let _=0;if(T)for(let t=0;t<T.length-1;t++){const e=T[t+1]-T[t];e>_&&(_=e)}else _=h;const g=Math.floor(1.1*_)+1;(null==u||u.length<2*g)&&(u=new Uint32Array((0,o.cU)(2*g)));for(let t=0;t<2*g;t++)u[t]=0;let O=0;const p=!!T&&!!f,A=p?m:h;let E=(0,r.my)(h);const N=new Uint32Array(m),R=1.96;let S=0!==d?Math.ceil(4*R*R/(d*d)*d*(1-d)):A,I=1,b=T?T[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-O/t;if(e+R*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*g;t++)u[t]=0;if(f)for(let t=T[I-1];t<T[I];t++)N[t]=E[f[t]];b=T[++I]}const n=p?f[t]:t,o=n*e,r=c(l,o,e);let i=r%g,a=O;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(l,o,t*e,e)){a=E[t];break}}i++,i>=g&&(i-=g)}a===O&&(u[2*i]=r,u[2*i+1]=n+1,O++),E[n]=a}if(0!==d&&1-O/h<d)return null;if(p){for(let t=T[I-1];t<N.length;t++)N[t]=E[f[t]];E=(0,r.uW)(N)}const M=i?new Array(O):new Uint32Array(O*e);O=0;for(let t=0;t<A;t++)E[t]===O&&(a(l,(p?f[t]:t)*e,M,O*e,e),O++);if(f&&!p){const t=new Uint32Array(m);for(let e=0;e<t.length;e++)t[e]=E[f[e]];E=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:E,uniqueCount:O}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>l,kb:()=>h,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function h(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.f)(t.vector,n),s=(0,i.f)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.h)(a.rq.get(),t.vector,c),n);return(0,i.f)(u,u)}function l(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,h=(0,i.d)(a.rq.get(),e,u),l=(0,i.f)(c,h)/(0,i.k)(c);return(0,i.h)(s,c,(0,o.qE)(l,n,r)),(0,i.g)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),h=n(51850),l=n(11964),d=n(97937),f=n(93687),m=n(3694),T=n(4341),_=(n(58083),n(87317),n(91829)),g=n(71351);function O(t){return t?{ray:(0,g.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,g.vt)(),c0:0,c1:Number.MAX_VALUE}}function p(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new T.I((()=>O())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,_.fA)(-1,-1,-1,1),(0,_.fA)(1,-1,-1,1),(0,_.fA)(1,1,-1,1),(0,_.fA)(-1,1,-1,1),(0,_.fA)(-1,-1,1,1),(0,_.fA)(1,-1,1,1),(0,_.fA)(1,1,1,1),(0,_.fA)(-1,1,1,1),new T.I(O),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)();var E,N,R=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new I,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),I.clearPool(),V[0]=null,X.prune(),$.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=I.acquire();for(let o=0;o<e;o++){const e=t[o];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}I.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=I.acquire();for(const o of t){const t=e??(0,d.e)(this.objectToBoundingSphere(o),W);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}I.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,g.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return x((0,d.a)(e.bounds),2*-e.halfSize,G),x((0,d.a)(e.bounds),2*e.halfSize,k),(0,R.O_)(t.origin,t.direction,G,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,g.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return x((0,d.a)(e.bounds),2*-e.halfSize,G),x((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(G,k),(0,R.O_)(t.origin,t.direction,G,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=B(t,e),h=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!p(n,u))return;const h=D(t,e,(0,d.a)(u)),l=h-u[3],f=h+u[3];l<i&&(i=l,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!p(n,o.bounds))return!1;if((0,u.h)(q,c,o.halfSize),(0,u.g)(q,q,(0,d.a)(o.bounds)),D(t,e,q)>s)return!1;const i=o.node;return i.terminals.forAll((t=>h(t))),null!==i.residents&&i.residents.forAll((t=>h(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const h={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};h.setRange(o);const l=D(e,n,t),f=B(e,n),m=B(e,-n),T=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=D(e,n,u)-l,m=f-o[3],T=f+o[3];m>c||T<a||!p(i,o)||r(t,h)};M(this._root,(t=>{if(!p(i,t.bounds))return!1;if((0,u.h)(q,f,t.halfSize),(0,u.g)(q,q,(0,d.a)(t.bounds)),D(e,n,q)-l>c)return!1;if((0,u.h)(q,m,t.halfSize),(0,u.g)(q,q,(0,d.a)(t.bounds)),D(e,n,q)-l<a)return!1;const o=t.node;return o.terminals.forAll((t=>T(t))),null!==o.residents&&o.residents.forAll((t=>T(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.i)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.i)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=I.acquire().init(t);this._add(e.at(n),o),I.release(o)}}_grow(t,e){if(0!==e&&(w(t,e,(t=>this.objectToBoundingSphere(t)),K),y(K[3])&&!this._fitsInsideTree(K)))if(P(this._root.node))(0,d.e)(K,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(K);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(K,t):this._growRootAsSubNode(t),I.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,w([t,Y],2,(t=>t),J);const n=I.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),I.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,h=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,h),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,I.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(K),(0,d.a)(this._root.bounds)),K[3]=this._root.halfSize,this._root.init(t),t.advanceTo(K,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class I{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:I.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=I.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=j[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new m.A({shrink:!0}),residents:new m.A({shrink:!0})}}static{this._pool=new f.A(I)}static acquire(){return I._pool.acquire()}static release(t){I._pool.release(t)}static clearPool(){I._pool.prune()}}function b(t,e){let n=I.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(I.acquire().init(n).advance(t));I.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=I.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=j[n];$.data[n].index=n,$.data[n].distance=D(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(I.acquire().init(r).advance(e))}I.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!P(t)&&(null===t.residents&&(t.residents=new m.A({shrink:!0})),!0)}function P(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function L(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function x(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function w(t,e,n,o){if(1===e){const e=n(t[0]);(0,d.e)(e,o)}else{G[0]=1/0,G[1]=1/0,G[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(let o=0;o<e;o++){const e=n(t[o]);y(e[3])&&(L(G,e),C(k,e))}(0,u.m)((0,d.a)(o),G,k,.5),o[3]=Math.max(k[0]-G[0],k[1]-G[1],k[2]-G[2])/2}}function B(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=D(t,e,U[r]);i<o&&(o=i,n=U[r])}return n}function D(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}(N=(E=S).DepthOrder||(E.DepthOrder={}))[N.FRONT_TO_BACK=1]="FRONT_TO_BACK",N[N.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const j=[(0,h.fA)(-1,-1,-1),(0,h.fA)(1,-1,-1),(0,h.fA)(-1,1,-1),(0,h.fA)(1,1,-1),(0,h.fA)(-1,-1,1),(0,h.fA)(1,-1,1),(0,h.fA)(-1,1,1),(0,h.fA)(1,1,1)],U=[(0,h.fA)(-1,-1,-1),(0,h.fA)(-1,-1,1),(0,h.fA)(-1,1,-1),(0,h.fA)(-1,1,1),(0,h.fA)(1,-1,-1),(0,h.fA)(1,-1,1),(0,h.fA)(1,1,-1),(0,h.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),q=(0,h.vt)(),G=(0,h.vt)(),k=(0,h.vt)(),X=new m.A,W=(0,d.c)(),K=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new m.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.g)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,l.vt)(),this._tmpP1=(0,h.vt)(),this._tmpP2=(0,h.vt)(),this._tmpP3=(0,h.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,h.vt)(),i=(0,h.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.g)(a,a,r),(0,u.g)(c,c,r);const h=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,a,c,n),rt(t,h,a,n),rt(t,h,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,l.Cr)(n,o,this._tmpLineSegment),a=(0,l._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,h.o8)(a),distance:(0,u.j)(i,a),start:(0,h.o8)(n),end:(0,h.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,h.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>N,Cc:()=>s,Hx:()=>T,Io:()=>E,KJ:()=>u,Sp:()=>d,XM:()=>h,YN:()=>l,ZH:()=>m,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>I,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function h(t){return Math.acos(i(t,-1,1))}function l(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function m(t,e,n=1e-6){return!d(t,e,n)&&t<e}function T(t,e,n=1e-6){return d(t,e,n)||t>e}const _=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return _.setFloat64(0,t),_.getBigInt64(0)}const O=BigInt("1000000"),p=A(1);function A(t){const e=g(t=Math.abs(t)),n=function(t){return _.setBigInt64(0,t),_.getFloat64(0)}(e<=O?O:e-O);return Math.abs(t-n)}function E(t,e,n=p){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=g(t),r=g(e);return o<0==r<0&&!((o<r?r-o:o-r)>O)}function N(t){return R(Math.max(-I,Math.min(t,I)))}function R(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const I=R(34028234663852886e22);function b(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},71351:(t,e,n)=>{n.d(e,{Cr:()=>l,LV:()=>h,kb:()=>d,oC:()=>f,vt:()=>c}),n(4576);var o=n(4341),r=(n(77690),n(29242)),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?u((0,s.o8)(t.origin),(0,s.o8)(t.direction)):u((0,s.vt)(),(0,s.vt)())}function u(t,e){return{origin:t,direction:e}}function h(t,e){const n=m.get();return n.origin=t,n.direction=e,n}function l(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.direction,e,t),n}function d(t,e){const n=(0,i.e)(a.rq.get(),(0,i.n)(a.rq.get(),t.direction),(0,i.d)(a.rq.get(),e,t.origin));return(0,i.f)(n,n)}function f(t,e,n){const o=(0,i.f)(t.direction,(0,i.d)(n,e,t.origin));return(0,i.g)(n,t.origin,(0,i.h)(n,t.direction,o)),n}const m=new o.I((()=>c()));(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,r.vt)()},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=T.position0,c=T.position1,l=T.faceNormal0,f=T.faceNormal1,{edges:m,normals:_}=h(t),g=m.length/4,O=e.allocate(g);let p=0;const A=g,R=n?.allocate(A);let I=0,b=0,M=0;d.length=0;for(let t=0;t<g;++t){const e=4*t;o.getVec(m.data[e],s),o.getVec(m.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:h})=>{const d=m.data[h],g=m.data[h+1],A=m.data[h+2],P=m.data[h+3],L=P===a;if(o.getVec(d,s),o.getVec(g,c),L){const t=3*A;(0,i.i)(l,_.data[t],_.data[t+1],_.data[t+2]),(0,i.c)(f,l),T.componentIndex=r.get(d),T.cosAngle=(0,i.f)(l,f)}else{let t=3*A;if((0,i.i)(l,_.data[t],_.data[t+1],_.data[t+2]),t=3*P,(0,i.i)(f,_.data[t],_.data[t+1],_.data[t+2]),T.componentIndex=r.get(d),T.cosAngle=(0,i.f)(l,f),function(t,e){return t.cosAngle>e}(T,N))return;T.cosAngle<-.9999&&(0,i.c)(f,l)}b+=t,M++,L||function(t,e){return t.cosAngle<e}(T,S)?(e.write(O,p++,T),v.push(t)):u(T,E)&&(R&&n&&n.write(R,I++,T),F.push(t))}));const P=new Float32Array(v.reverse()),L=new Float32Array(F.reverse()),C=R&&n?{instancesData:R.slice(0,I),lodInfo:{lengths:L}}:void 0;return{regular:{instancesData:O.slice(0,p),lodInfo:{lengths:P}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.o)(g,t.position1,t.position0),n*((0,i.f)((0,i.e)(_,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function h(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=m.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],h=n[e],l=n[e+1],d=n[e+2];r.getVec(h,O),r.getVec(l,p),r.getVec(d,A),(0,i.d)(p,p,O),(0,i.d)(A,A,O),(0,i.e)(O,p,A),(0,i.n)(O,O),m.pushArray(O),(s===a||h<l)&&(f.push(h),f.push(l),f.push(t),f.push(s)),(c===a||l<d)&&(f.push(l),f.push(d),f.push(t),f.push(c)),(u===a||d<h)&&(f.push(d),f.push(h),f.push(t),f.push(u))}return{edges:f,normals:m}}class l{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new l,deallocator:null}),f=new r.A({deallocator:null}),m=new r.A({deallocator:null}),T=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},_=(0,s.vt)(),g=(0,s.vt)(),O=(0,s.vt)(),p=(0,s.vt)(),A=(0,s.vt)(),E=(0,o.kU)(4),N=Math.cos(E),R=(0,o.kU)(35),S=Math.cos(R)},97937:(t,e,n)=>{n.d(e,{a:()=>E,c:()=>_,e:()=>p,f:()=>N,g:()=>A,i:()=>M,o:()=>w,s:()=>y}),n(44208),n(53966);var o=n(34727),r=n(58083),i=n(38954),s=n(51850),a=n(87317),c=n(91829),u=n(34304),h=n(88582),l=n(71351);function d(t,e){const n=(0,i.l)(t),r=(0,o.YN)(t[2]/n),s=Math.atan2(t[1]/n,t[0]/n);return(0,i.i)(e,n,r,s),e}var f=n(44280),m=n(32114);const T=_();function _(){return(0,c.vt)()}const g=a.e,O=a.e;function p(t,e){return(0,a.c)(e,t)}function A(t){return t[3]}function E(t){return t}function N(t,e,n,o){return(0,c.fA)(t,e,n,o)}function R(t,e,n){if(null==e)return!1;if(!I(t,e,S))return!1;let{t0:o,t1:r}=S;if((o<0||r<o&&r>0)&&(o=r),o<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*o,n[1]=t[1]+r[1]*o,n[2]=t[2]+r[2]*o}return!0}const S={t0:0,t1:0};function I(t,e,n){const{origin:o,direction:r}=e,i=b;i[0]=o[0]-t[0],i[1]=o[1]-t[1],i[2]=o[2]-t[2];const s=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===s)return!1;const a=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),c=a*a-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(c<0)return!1;const u=Math.sqrt(c);return n.t0=(-a-u)/(2*s),n.t1=(-a+u)/(2*s),!0}const b=(0,s.vt)();function M(t,e){return R(t,e,null)}function v(t,e,n){const o=m.rq.get(),s=m.Rc.get();(0,i.e)(o,e.origin,e.direction);const a=A(t);(0,i.e)(n,o,e.origin),(0,i.h)(n,n,1/(0,i.l)(n)*a);const c=P(t,e.origin),u=(0,f.g7)(e.origin,n);return(0,r.$0)(s,u+c,o),(0,i.t)(n,n,s),n}function F(t,e,n){const o=(0,i.d)(m.rq.get(),e,t),r=(0,i.h)(m.rq.get(),o,t[3]/(0,i.l)(o));return(0,i.g)(n,r,t)}function P(t,e){const n=(0,i.d)(m.rq.get(),e,t),r=(0,i.l)(n),s=A(t),a=s+Math.abs(s-r);return(0,o.XM)(s/a)}const L=(0,s.vt)();function C(t,e,n,o){const r=(0,i.d)(L,e,t);switch(n){case h._.X:{const t=d(r,L)[2];return(0,i.i)(o,-Math.sin(t),Math.cos(t),0)}case h._.Y:{const t=d(r,L),e=t[1],n=t[2],s=Math.sin(e);return(0,i.i)(o,-s*Math.cos(n),-s*Math.sin(n),Math.cos(e))}case h._.Z:return(0,i.n)(o,r);default:return}}function x(t,e){const n=(0,i.d)(B,e,t);return(0,i.l)(n)-t[3]}function w(t,e){const n=(0,i.s)(t,e),o=A(t);return n<=o*o}const B=(0,s.vt)(),D=_(),y=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:T,altitudeAt:x,angleToSilhouette:P,axisAt:C,cameraFrustumCoverage:function(t,e,n,o){const r=A(t),i=r*r,s=e+.5*Math.PI,a=n*n+i-2*Math.cos(s)*n*r,c=Math.sqrt(a),u=a-i;if(u<=0)return.5;const h=Math.sqrt(u),l=Math.acos(h/c)-Math.asin(r/(c/Math.sin(s)));return Math.min(1,(l+.5*o)/o)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return R(t,e,n)?n:((0,l.oC)(e,t,n),F(t,n,n))},closestPointOnSilhouette:v,containsPoint:w,copy:p,create:_,distanceToSilhouette:function(t,e){const n=(0,i.d)(m.rq.get(),e,t),o=(0,i.k)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(o-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:O,exactEquals:g,fromCenterAndRadius:function(t,e){return(0,c.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:N,getCenter:E,getExtent:function(t,e){return e},getRadius:A,intersectLine:function(t,e,n){const o=(0,l.Cr)(e,n);if(!I(t,o,S))return[];const{origin:r,direction:a}=o,{t0:c,t1:h}=S,d=e=>{const n=(0,s.vt)();return(0,i.b)(n,r,a,e),F(t,n,n)};return Math.abs(c-h)<(0,u.FD)()?[d(c)]:[d(c),d(h)]},intersectRay:R,intersectRayClosestSilhouette:function(t,e,n){if(R(t,e,n))return n;const o=v(t,e,m.rq.get());return(0,i.g)(n,e.origin,(0,i.h)(m.rq.get(),e.direction,(0,i.j)(e.origin,o)/(0,i.l)(e.direction))),n},intersectsRay:M,projectPoint:F,setAltitudeAt:function(t,e,n,o){const r=x(t,e),s=C(t,e,h._.Z,B),a=(0,i.h)(B,s,n-r);return(0,i.g)(o,e,a)},setExtent:function(t,e,n){return t!==n&&p(t,n),n},tmpSphere:D,union:function(t,e,n=(0,c.vt)()){const o=(0,i.j)(t,e),r=t[3],s=e[3];return o+s<r?((0,a.c)(n,t),n):o+r<s?((0,a.c)(n,e),n):((0,i.m)(n,t,e,(o+s-r)/(2*o)),n[3]=(o+r+s)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3455],{431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>x,hx:()=>F,Jb:()=>w});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let c=0,a=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=c,i[t+1]=a,c+=e,a+=n}const u=new Uint32Array(6*o),h=r[n],l=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*h+2*o]=t,u[2*h+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];l(n,o,e),l(o,r,e),l(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(h+i[t],h+i[t+1]);const f=new Int32Array(3*o),m=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,T=(t,e)=>{const n=m(t,e);f[3*e+n]=-1},_=(t,e,n,o)=>{const r=m(t,e);f[3*e+r]=o;const i=m(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*h+2*o];n===r?(_(t,u[2*e+1],r,u[2*h+2*o+1]),e++,o++):n<r?(T(t,u[2*e+1]),e++):(T(r,u[2*h+2*o+1]),o++)}for(;e<n;)T(t,u[2*e+1]),e++;for(;o<s;)T(u[2*h+2*o],u[2*h+2*o+1]),o++}return f}var i=n(1843),s=n(46540),c=n(3055),a=n(87811),u=n(38954),h=n(51850),l=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),c=n*s,a=o*s,u=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=e*i;t[l]=m(u),t[l+1]=m(h)}function m(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class T{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:p}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const _=new Float32Array(6),g=new Uint32Array(_.buffer),O=new Uint32Array(1);function p(t){return _[0]=t.position0[0],_[1]=t.position0[1],_[2]=t.position0[2],_[3]=t.position1[0],_[4]=t.position1[1],_[5]=t.position1[2],O[0]=31*(31*(31*(31*(31*(166811+g[0])+g[1])+g[2])+g[3])+g[4])+g[5],O[0]}function A(t){const e=_;e[0]=N(t.position0[0]),e[1]=N(t.position0[1]),e[2]=N(t.position0[2]),e[3]=N(t.position1[0]),e[4]=N(t.position1[1]),e[5]=N(t.position1[2]),O[0]=5381;for(let t=0;t<g.length;t++)O[0]=31*O[0]+g[t];return O[0]}const E=1e4;function N(t){return Math.round(t*E)/E}class R{constructor(){this._commonWriter=new T}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.g)(I,n.faceNormal0,n.faceNormal1),(0,u.n)(I,I);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,I[0],I[1],I[2],r)}static{this.Layout=c.gr}static{this.glLayout=(0,l.U)(c.gr,1)}}class S{constructor(){this._commonWriter=new T}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=c.In}static{this.glLayout=(0,l.U)(c.In,1)}}const I=(0,h.vt)(),b=new a.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return L.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,L,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new P(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:i}),a=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:a,vertices:c.I$.createView(s.buffer)}}class P{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const L=new R,C=new S,w=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),x=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>a});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),c=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),a=((0,o.U)(c),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4341:(t,e,n)=>{n.d(e,{I:()=>r});var o=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),c=i.constructor.ElementCount,a=s(i.constructor.ElementType),u=i.offset,h=i.optional?.glNormalized??!1;return new r._(o,c,a,u,n,h,e)}))}function s(t){const e=c[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const c={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),h=i?t.length/e:t.byteLength/(4*e),l=i?t:new Uint32Array(t,0,h*e),d=n?.minReduction??0,f=n?.originalIndices||null,m=f?f.length:0,T=n?.componentOffsets||null;let _=0;if(T)for(let t=0;t<T.length-1;t++){const e=T[t+1]-T[t];e>_&&(_=e)}else _=h;const g=Math.floor(1.1*_)+1;(null==u||u.length<2*g)&&(u=new Uint32Array((0,o.cU)(2*g)));for(let t=0;t<2*g;t++)u[t]=0;let O=0;const p=!!T&&!!f,A=p?m:h;let E=(0,r.my)(h);const N=new Uint32Array(m),R=1.96;let S=0!==d?Math.ceil(4*R*R/(d*d)*d*(1-d)):A,I=1,b=T?T[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-O/t;if(e+R*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*g;t++)u[t]=0;if(f)for(let t=T[I-1];t<T[I];t++)N[t]=E[f[t]];b=T[++I]}const n=p?f[t]:t,o=n*e,r=a(l,o,e);let i=r%g,c=O;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(l,o,t*e,e)){c=E[t];break}}i++,i>=g&&(i-=g)}c===O&&(u[2*i]=r,u[2*i+1]=n+1,O++),E[n]=c}if(0!==d&&1-O/h<d)return null;if(p){for(let t=T[I-1];t<N.length;t++)N[t]=E[f[t]];E=(0,r.uW)(N)}const M=i?new Array(O):new Uint32Array(O*e);O=0;for(let t=0;t<A;t++)E[t]===O&&(c(l,(p?f[t]:t)*e,M,O*e,e),O++);if(f&&!p){const t=new Uint32Array(m);for(let e=0;e<t.length;e++)t[e]=E[f[e]];E=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:E,uniqueCount:O}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function c(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function a(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>l,kb:()=>h,vt:()=>a});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),c=n(32114);function a(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=a()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function h(t,e){const n=(0,i.d)(c.rq.get(),e,t.origin),r=(0,i.f)(t.vector,n),s=(0,i.f)(t.vector,t.vector),a=(0,o.qE)(r/s,0,1),u=(0,i.d)(c.rq.get(),(0,i.h)(c.rq.get(),t.vector,a),n);return(0,i.f)(u,u)}function l(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:a,origin:u}=t,h=(0,i.d)(c.rq.get(),e,u),l=(0,i.f)(a,h)/(0,i.k)(a);return(0,i.h)(s,a,(0,o.qE)(l,n,r)),(0,i.g)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>a()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),c=n(74887),a=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),h=n(51850),l=n(11964),d=n(97937),f=n(93687),m=n(3694),T=n(4341),_=(n(58083),n(87317),n(91829)),g=n(71351);function O(t){return t?{ray:(0,g.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,g.vt)(),c0:0,c1:Number.MAX_VALUE}}function p(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new T.I((()=>O())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,_.fA)(-1,-1,-1,1),(0,_.fA)(1,-1,-1,1),(0,_.fA)(1,1,-1,1),(0,_.fA)(-1,1,-1,1),(0,_.fA)(-1,-1,1,1),(0,_.fA)(1,-1,1,1),(0,_.fA)(1,1,1,1),(0,_.fA)(-1,1,1,1),new T.I(O),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)();var E,N,R=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new I,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),I.clearPool(),V[0]=null,X.prune(),$.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=I.acquire();for(let o=0;o<e;o++){const e=t[o];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}I.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=I.acquire();for(const o of t){const t=e??(0,d.e)(this.objectToBoundingSphere(o),W);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}I.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,g.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return w((0,d.a)(e.bounds),2*-e.halfSize,G),w((0,d.a)(e.bounds),2*e.halfSize,k),(0,R.O_)(t.origin,t.direction,G,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,g.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return w((0,d.a)(e.bounds),2*-e.halfSize,G),w((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(G,k),(0,R.O_)(t.origin,t.direction,G,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,c=null;const a=B(t,e),h=a=>{if(--r,!o(a))return;const u=this.objectToBoundingSphere(a);if(!p(n,u))return;const h=D(t,e,(0,d.a)(u)),l=h-u[3],f=h+u[3];l<i&&(i=l,s=f,c=a)};return M(this._root,(o=>{if(r<=0||!p(n,o.bounds))return!1;if((0,u.h)(q,a,o.halfSize),(0,u.g)(q,q,(0,d.a)(o.bounds)),D(t,e,q)>s)return!1;const i=o.node;return i.terminals.forAll((t=>h(t))),null!==i.residents&&i.residents.forAll((t=>h(t))),!0}),t,e),c}forEachInDepthRange(t,e,n,o,r,i,s){let c=-1/0,a=1/0;const h={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(c=Math.max(c,t.near),a=Math.min(a,t.far)):(c=Math.max(c,-t.far),a=Math.min(a,-t.near))}};h.setRange(o);const l=D(e,n,t),f=B(e,n),m=B(e,-n),T=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=D(e,n,u)-l,m=f-o[3],T=f+o[3];m>a||T<c||!p(i,o)||r(t,h)};M(this._root,(t=>{if(!p(i,t.bounds))return!1;if((0,u.h)(q,f,t.halfSize),(0,u.g)(q,q,(0,d.a)(t.bounds)),D(e,n,q)-l>a)return!1;if((0,u.h)(q,m,t.halfSize),(0,u.g)(q,q,(0,d.a)(t.bounds)),D(e,n,q)-l<c)return!1;const o=t.node;return o.terminals.forAll((t=>T(t))),null!==o.residents&&o.residents.forAll((t=>T(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const c=t.node;return c.terminals.forAll(s),i&&null!==c.residents&&c.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.i)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.i)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=I.acquire().init(t);this._add(e.at(n),o),I.release(o)}}_grow(t,e){if(0!==e&&(x(t,e,(t=>this.objectToBoundingSphere(t)),K),y(K[3])&&!this._fitsInsideTree(K)))if(P(this._root.node))(0,d.e)(K,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(K);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(K,t):this._growRootAsSubNode(t),I.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,x([t,Y],2,(t=>t),J);const n=I.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),I.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),c=n[t]+e-(r[t]+i),a=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(c/(2*i)))+1,h=2**Math.ceil(Math.log(a+u)*Math.LOG2E);o=Math.max(o,h),Z[t].min=a,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=r[t]-i-e*i*2;H[t]=c+(n+e)*i}const s=o*i;return H[3]=s*z,I.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(K),(0,d.a)(this._root.bounds)),K[3]=this._root.halfSize,this._root.init(t),t.advanceTo(K,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class I{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:I.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=I.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=j[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new m.A({shrink:!0}),residents:new m.A({shrink:!0})}}static{this._pool=new f.A(I)}static acquire(){return I._pool.acquire()}static release(t){I._pool.release(t)}static clearPool(){I._pool.prune()}}function b(t,e){let n=I.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(I.acquire().init(n).advance(t));I.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=I.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=j[n];$.data[n].index=n,$.data[n].distance=D(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(I.acquire().init(r).advance(e))}I.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!P(t)&&(null===t.residents&&(t.residents=new m.A({shrink:!0})),!0)}function P(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function L(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function w(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function x(t,e,n,o){if(1===e){const e=n(t[0]);(0,d.e)(e,o)}else{G[0]=1/0,G[1]=1/0,G[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(let o=0;o<e;o++){const e=n(t[o]);y(e[3])&&(L(G,e),C(k,e))}(0,u.m)((0,d.a)(o),G,k,.5),o[3]=Math.max(k[0]-G[0],k[1]-G[1],k[2]-G[2])/2}}function B(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=D(t,e,U[r]);i<o&&(o=i,n=U[r])}return n}function D(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}(N=(E=S).DepthOrder||(E.DepthOrder={}))[N.FRONT_TO_BACK=1]="FRONT_TO_BACK",N[N.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const j=[(0,h.fA)(-1,-1,-1),(0,h.fA)(1,-1,-1),(0,h.fA)(-1,1,-1),(0,h.fA)(1,1,-1),(0,h.fA)(-1,-1,1),(0,h.fA)(1,-1,1),(0,h.fA)(-1,1,1),(0,h.fA)(1,1,1)],U=[(0,h.fA)(-1,-1,-1),(0,h.fA)(-1,-1,1),(0,h.fA)(-1,1,-1),(0,h.fA)(-1,1,1),(0,h.fA)(1,-1,-1),(0,h.fA)(1,-1,1),(0,h.fA)(1,1,-1),(0,h.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),q=(0,h.vt)(),G=(0,h.vt)(),k=(0,h.vt)(),X=new m.A,W=(0,d.c)(),K=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new m.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.g)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,l.vt)(),this._tmpP1=(0,h.vt)(),this._tmpP2=(0,h.vt)(),this._tmpP3=(0,h.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,c.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,h.vt)(),i=(0,h.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const c=et(r,i,t.origin),a=new st(e,s,c);o[s]=a}this._edges.add(o);const{objectIds:s,origin:c}=t;e.info={locations:n,objectIds:s,origin:c}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,c=s.position0.getVec(e.index,this._tmpP1),a=s.position1.getVec(e.index,this._tmpP2);(0,u.g)(c,c,r),(0,u.g)(a,a,r);const h=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,c,a,n),rt(t,h,c,n),rt(t,h,a,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,l.Cr)(n,o,this._tmpLineSegment),c=(0,l._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,c)&&r.push({type:"edge",objectId:e,target:(0,h.o8)(c),distance:(0,u.j)(i,c),start:(0,h.o8)(n),end:(0,h.o8)(o)})}};nt=(0,s._)([(0,a.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,h.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>N,Cc:()=>s,Hx:()=>T,Io:()=>E,KJ:()=>u,Sp:()=>d,XM:()=>h,YN:()=>l,ZH:()=>m,cU:()=>r,gg:()=>f,hs:()=>c,kU:()=>a,or:()=>S,pF:()=>b,pq:()=>I,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function c(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function a(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function h(t){return Math.acos(i(t,-1,1))}function l(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function m(t,e,n=1e-6){return!d(t,e,n)&&t<e}function T(t,e,n=1e-6){return d(t,e,n)||t>e}const _=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return _.setFloat64(0,t),_.getBigInt64(0)}const O=BigInt("1000000"),p=A(1);function A(t){const e=g(t=Math.abs(t)),n=function(t){return _.setBigInt64(0,t),_.getFloat64(0)}(e<=O?O:e-O);return Math.abs(t-n)}function E(t,e,n=p){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=g(t),r=g(e);return o<0==r<0&&!((o<r?r-o:o-r)>O)}function N(t){return R(Math.max(-I,Math.min(t,I)))}function R(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const I=R(34028234663852886e22);function b(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},71351:(t,e,n)=>{n.d(e,{Cr:()=>l,LV:()=>h,kb:()=>d,oC:()=>f,vt:()=>a}),n(4576);var o=n(4341),r=(n(77690),n(29242)),i=n(38954),s=n(51850),c=n(32114);function a(t){return t?u((0,s.o8)(t.origin),(0,s.o8)(t.direction)):u((0,s.vt)(),(0,s.vt)())}function u(t,e){return{origin:t,direction:e}}function h(t,e){const n=m.get();return n.origin=t,n.direction=e,n}function l(t,e,n=a()){return(0,i.c)(n.origin,t),(0,i.d)(n.direction,e,t),n}function d(t,e){const n=(0,i.e)(c.rq.get(),(0,i.n)(c.rq.get(),t.direction),(0,i.d)(c.rq.get(),e,t.origin));return(0,i.f)(n,n)}function f(t,e,n){const o=(0,i.f)(t.direction,(0,i.d)(n,e,t.origin));return(0,i.g)(n,t.origin,(0,i.h)(n,t.direction,o)),n}const m=new o.I((()=>a()));(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,r.vt)()},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>a});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const c=-1;function a(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=T.position0,a=T.position1,l=T.faceNormal0,f=T.faceNormal1,{edges:m,normals:_}=h(t),g=m.length/4,O=e.allocate(g);let p=0;const A=g,R=n?.allocate(A);let I=0,b=0,M=0;d.length=0;for(let t=0;t<g;++t){const e=4*t;o.getVec(m.data[e],s),o.getVec(m.data[e+1],a);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,a)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:h})=>{const d=m.data[h],g=m.data[h+1],A=m.data[h+2],P=m.data[h+3],L=P===c;if(o.getVec(d,s),o.getVec(g,a),L){const t=3*A;(0,i.i)(l,_.data[t],_.data[t+1],_.data[t+2]),(0,i.c)(f,l),T.componentIndex=r.get(d),T.cosAngle=(0,i.f)(l,f)}else{let t=3*A;if((0,i.i)(l,_.data[t],_.data[t+1],_.data[t+2]),t=3*P,(0,i.i)(f,_.data[t],_.data[t+1],_.data[t+2]),T.componentIndex=r.get(d),T.cosAngle=(0,i.f)(l,f),function(t,e){return t.cosAngle>e}(T,N))return;T.cosAngle<-.9999&&(0,i.c)(f,l)}b+=t,M++,L||function(t,e){return t.cosAngle<e}(T,S)?(e.write(O,p++,T),v.push(t)):u(T,E)&&(R&&n&&n.write(R,I++,T),F.push(t))}));const P=new Float32Array(v.reverse()),L=new Float32Array(F.reverse()),C=R&&n?{instancesData:R.slice(0,I),lodInfo:{lengths:L}}:void 0;return{regular:{instancesData:O.slice(0,p),lodInfo:{lengths:P}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.o)(g,t.position1,t.position0),n*((0,i.f)((0,i.e)(_,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function h(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=m.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],a=o[e+1],u=o[e+2],h=n[e],l=n[e+1],d=n[e+2];r.getVec(h,O),r.getVec(l,p),r.getVec(d,A),(0,i.d)(p,p,O),(0,i.d)(A,A,O),(0,i.e)(O,p,A),(0,i.n)(O,O),m.pushArray(O),(s===c||h<l)&&(f.push(h),f.push(l),f.push(t),f.push(s)),(a===c||l<d)&&(f.push(l),f.push(d),f.push(t),f.push(a)),(u===c||d<h)&&(f.push(d),f.push(h),f.push(t),f.push(u))}return{edges:f,normals:m}}class l{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new l,deallocator:null}),f=new r.A({deallocator:null}),m=new r.A({deallocator:null}),T=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},_=(0,s.vt)(),g=(0,s.vt)(),O=(0,s.vt)(),p=(0,s.vt)(),A=(0,s.vt)(),E=(0,o.kU)(4),N=Math.cos(E),R=(0,o.kU)(35),S=Math.cos(R)},97937:(t,e,n)=>{n.d(e,{a:()=>E,c:()=>_,e:()=>p,f:()=>N,g:()=>A,i:()=>M,o:()=>x,s:()=>y}),n(44208),n(53966);var o=n(34727),r=n(58083),i=n(38954),s=n(51850),c=n(87317),a=n(91829),u=n(34304),h=n(88582),l=n(71351);function d(t,e){const n=(0,i.l)(t),r=(0,o.YN)(t[2]/n),s=Math.atan2(t[1]/n,t[0]/n);return(0,i.i)(e,n,r,s),e}var f=n(44280),m=n(32114);const T=_();function _(){return(0,a.vt)()}const g=c.e,O=c.e;function p(t,e){return(0,c.c)(e,t)}function A(t){return t[3]}function E(t){return t}function N(t,e,n,o){return(0,a.fA)(t,e,n,o)}function R(t,e,n){if(null==e)return!1;if(!I(t,e,S))return!1;let{t0:o,t1:r}=S;if((o<0||r<o&&r>0)&&(o=r),o<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*o,n[1]=t[1]+r[1]*o,n[2]=t[2]+r[2]*o}return!0}const S={t0:0,t1:0};function I(t,e,n){const{origin:o,direction:r}=e,i=b;i[0]=o[0]-t[0],i[1]=o[1]-t[1],i[2]=o[2]-t[2];const s=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===s)return!1;const c=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),a=c*c-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(a<0)return!1;const u=Math.sqrt(a);return n.t0=(-c-u)/(2*s),n.t1=(-c+u)/(2*s),!0}const b=(0,s.vt)();function M(t,e){return R(t,e,null)}function v(t,e,n){const o=m.rq.get(),s=m.Rc.get();(0,i.e)(o,e.origin,e.direction);const c=A(t);(0,i.e)(n,o,e.origin),(0,i.h)(n,n,1/(0,i.l)(n)*c);const a=P(t,e.origin),u=(0,f.g7)(e.origin,n);return(0,r.$0)(s,u+a,o),(0,i.t)(n,n,s),n}function F(t,e,n){const o=(0,i.d)(m.rq.get(),e,t),r=(0,i.h)(m.rq.get(),o,t[3]/(0,i.l)(o));return(0,i.g)(n,r,t)}function P(t,e){const n=(0,i.d)(m.rq.get(),e,t),r=(0,i.l)(n),s=A(t),c=s+Math.abs(s-r);return(0,o.XM)(s/c)}const L=(0,s.vt)();function C(t,e,n,o){const r=(0,i.d)(L,e,t);switch(n){case h._.X:{const t=d(r,L)[2];return(0,i.i)(o,-Math.sin(t),Math.cos(t),0)}case h._.Y:{const t=d(r,L),e=t[1],n=t[2],s=Math.sin(e);return(0,i.i)(o,-s*Math.cos(n),-s*Math.sin(n),Math.cos(e))}case h._.Z:return(0,i.n)(o,r);default:return}}function w(t,e){const n=(0,i.d)(B,e,t);return(0,i.l)(n)-t[3]}function x(t,e){const n=(0,i.s)(t,e),o=A(t);return n<=o*o}const B=(0,s.vt)(),D=_(),y=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:T,altitudeAt:w,angleToSilhouette:P,axisAt:C,cameraFrustumCoverage:function(t,e,n,o){const r=A(t),i=r*r,s=e+.5*Math.PI,c=n*n+i-2*Math.cos(s)*n*r,a=Math.sqrt(c),u=c-i;if(u<=0)return.5;const h=Math.sqrt(u),l=Math.acos(h/a)-Math.asin(r/(a/Math.sin(s)));return Math.min(1,(l+.5*o)/o)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return R(t,e,n)?n:((0,l.oC)(e,t,n),F(t,n,n))},closestPointOnSilhouette:v,containsPoint:x,copy:p,create:_,distanceToSilhouette:function(t,e){const n=(0,i.d)(m.rq.get(),e,t),o=(0,i.k)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(o-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:O,exactEquals:g,fromCenterAndRadius:function(t,e){return(0,a.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:N,getCenter:E,getExtent:function(t,e){return e},getRadius:A,intersectLine:function(t,e,n){const o=(0,l.Cr)(e,n);if(!I(t,o,S))return[];const{origin:r,direction:c}=o,{t0:a,t1:h}=S,d=e=>{const n=(0,s.vt)();return(0,i.b)(n,r,c,e),F(t,n,n)};return Math.abs(a-h)<(0,u.FD)()?[d(a)]:[d(a),d(h)]},intersectRay:R,intersectRayClosestSilhouette:function(t,e,n){if(R(t,e,n))return n;const o=v(t,e,m.rq.get());return(0,i.g)(n,e.origin,(0,i.h)(m.rq.get(),e.direction,(0,i.j)(e.origin,o)/(0,i.l)(e.direction))),n},intersectsRay:M,projectPoint:F,setAltitudeAt:function(t,e,n,o){const r=w(t,e),s=C(t,e,h._.Z,B),c=(0,i.h)(B,s,n-r);return(0,i.g)(o,e,c)},setExtent:function(t,e,n){return t!==n&&p(t,n),n},tmpSphere:D,union:function(t,e,n=(0,a.vt)()){const o=(0,i.j)(t,e),r=t[3],s=e[3];return o+s<r?((0,c.c)(n,t),n):o+r<s?((0,c.c)(n,e),n):((0,i.m)(n,t,e,(o+s-r)/(2*o)),n[3]=(o+r+s)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5122],{3694:(t,e,r)=>{r.d(e,{A:()=>a});var n,o=r(4576),i=r(21818);!function(t){const e=(t,e,r,n)=>{let o=e,i=e;const s=r>>>1,a=t[o-1];for(;i<=s;){i=o<<1,i<r&&n(t[i-1],t[i])<0&&++i;const e=t[i-1];if(n(e,a)<=0)break;t[o-1]=e,o=i}t[o-1]=a},r=(t,e)=>t<e?-1:t>e?1:0;t.sort=function(t,n,o,i){void 0===n&&(n=0),void 0===o&&(o=t.length),void 0===i&&(i=r);for(let r=o>>>1;r>n;r--)e(t,r,o,i);const s=n+1;for(let r=o-1;r>n;r--){const o=t[n];t[n]=t[r],t[r]=o,e(t,s,r,i)}},t.iterableSort=function*(t,n,o,i){void 0===n&&(n=0),void 0===o&&(o=t.length),void 0===i&&(i=r);for(let r=o>>>1;r>n;r--)e(t,r,o,i),yield;const s=n+1;for(let r=o-1;r>n;r--){const o=t[n];t[n]=t[r],t[r]=o,e(t,s,r,i),yield}}}(n||(n={}));const s=n;class a{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];t(n)&&e.push(n)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const r=this.data.indexOf(t,e);return-1!==r&&r<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let r=0;r<e;r++)this.data[this._length++]=t[r]}fill(t,e){for(let r=0;r<e;r++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,r){this.length=(0,o.mW)(this.data,t,this.length,e,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const r=this.data[t];this.data[t]=this.data[e],this.data[e]=r}sort(t){s.sort(this.data,0,this.length,t)}iterableSort(t){return s.iterableSort(this.data,0,this.length,t)}some(t,e){for(let r=0;r<this.length;++r)if(t.call(e,this.data[r],r,this.data))return!0;return!1}find(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)if(t.call(e,r[o]))return r[o]}filterInPlace(t,e){let r=0;for(let n=0;n<this._length;++n){const o=this.data[n];t.call(e,o,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=o,r++)}if(this._deallocator)for(let t=r;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=r,this._shrink(),this}forAll(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)t.call(e,r[o],o,r)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=t.call(e,this.data[n],n,this.data);return r}reduce(t,e){let r=e;for(let e=0;e<this.length;++e)r=t(r,this.data[e],e,this.data);return r}has(t){const e=this.length,r=this.data;for(let n=0;n<e;++n)if(r[n]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},15903:(t,e,r)=>{function n(t){return!!t&&t.prototype?.declaredClass&&0===t.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(e,{P:()=>n})},26390:(t,e,r)=>{r.d(e,{d:()=>o});const n=[];function o(t){n.push(t),1===n.length&&queueMicrotask((()=>{const t=n.slice();n.length=0;for(const e of t)e()}))}},40608:(t,e,r)=>{r.d(e,{$:()=>f}),r(44208);var n=r(53966),o=r(56454),i=r(45873),s=r(96156),a=r(62788),c=r(51822);const l=new Set,u=new Set;function f(t){return e=>{t??="esri.core.Accessor",e.prototype.declaredClass=t,p(e);const r=[],n=[];let a=e.prototype;for(;a;)a.hasOwnProperty("initialize")&&!l.has(a.initialize)&&(l.add(a.initialize),r.push(a.initialize)),a.hasOwnProperty("destroy")&&!u.has(a.destroy)&&(u.add(a.destroy),n.push(a.destroy)),a=Object.getPrototypeOf(a);l.clear(),u.clear();const c=class extends e{constructor(...t){if(super(...t),this.constructor===c&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let t=r.length-1;t>=0;t--)r[t].call(this)}}),n.length){let t=!1;const e=this[o.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!t){this.__accessor__.lifecycle=i.v.DESTROYING,t=!0,e.call(this);for(let t=0;t<n.length;t++)n[t].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};c.__accessorMetadata__=(0,s.tD)(e.prototype),c.prototype.declaredClass=t;const f=(t||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(c,"name",{value:f,configurable:!0}),c}}function h(t,e){return null==e.get?function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0===r)return;e.mutable&&(0,a.gc)(r);const n=e.store;return n.has(t)?n.get(t):r.metadata.value}:function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0!==r)return r.getComputed(e)}}function p(t){const e=t.prototype,r=(0,s.tD)(e),n={};for(const t of Object.getOwnPropertyNames(r)){const e=r[t];(0,c.qk)(e),n[t]={enumerable:!0,configurable:!0,get:h(t,e),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&e.readOnly?d("read-only",t):n.lifecycle===i.v.CONSTRUCTED&&e.constructOnly?d("construct-only",t):void n.set(t,r)}else Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(t.prototype,n)}const d=(t,e)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${e}'`)}},45873:(t,e,r)=>{var n;r.d(e,{v:()=>n}),function(t){t[t.INITIALIZING=0]="INITIALIZING",t[t.CONSTRUCTING=1]="CONSTRUCTING",t[t.CONSTRUCTED=2]="CONSTRUCTED",t[t.DESTROYING=3]="DESTROYING",t[t.DESTROYED=4]="DESTROYED"}(n||(n={}))},47328:(t,e,r)=>{var n;r.d(e,{i:()=>n}),function(t){t[t.Dirty=1]="Dirty",t[t.Overridden=2]="Overridden",t[t.Computing=4]="Computing",t[t.NonNullable=8]="NonNullable",t[t.HasDefaultValue=16]="HasDefaultValue",t[t.DepTrackingInitialized=32]="DepTrackingInitialized",t[t.AutoTracked=64]="AutoTracked",t[t.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},51822:(t,e,r)=>{r.d(e,{xF:()=>u,N5:()=>f,k4:()=>h,qk:()=>v});var n=r(56507),o=r(90360);function i(t){if(t.json||(t.json={}),a(t.json),c(t.json),s(t.json),t.json.origins)for(const e in t.json.origins)a(t.json.origins[e]),c(t.json.origins[e]),s(t.json.origins[e]);return!0}function s(t){t.name&&(t.read&&"object"==typeof t.read?void 0===t.read.source&&(t.read.source=t.name):t.read={source:t.name},t.write&&"object"==typeof t.write?void 0===t.write.target&&(t.write.target=t.name):t.write={target:t.name})}function a(t){"boolean"==typeof t.read?t.read={enabled:t.read}:"function"==typeof t.read?t.read={enabled:!0,reader:t.read}:t.read&&"object"==typeof t.read&&void 0===t.read.enabled&&(t.read.enabled=!0)}function c(t){"boolean"==typeof t.write?t.write={enabled:t.write}:"function"==typeof t.write?t.write={enabled:!0,writer:t.write}:t.write&&"object"==typeof t.write&&void 0===t.write.enabled&&(t.write.enabled=!0)}var l=r(67124);function u(t,e){return p(t,"any",e?.origin)}function f(t,e){return p(t,"read",e?.origin)}function h(t,e){return p(t,"write",e?.origin)}function p(t,e,r){let n=t?.json;if(n?.origins&&r){let t;t="link-chart"===r?n.origins[r]&&("any"===e||e in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],t&&("any"===e||e in t)&&(n=t)}return n}function d(t){return t.type?y(t):g(t)}function y(t){if(!t.type)return;let e=0,r=t.type;for(;Array.isArray(r)&&!(0,n.EK)(r);)r=r[0],e++;return{type:r,ndimArray:e}}function g(t){if(!t.types)return;let e=0,r=t.types;for(;Array.isArray(r);)r=r[0],e++;return{types:r,ndimArray:e}}function v(t){i(t)&&(function(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const t in r)if(e[t]){const n=e[t];r[t].forEach((t=>{e[t]=n})),delete e[t]}}}(t),function(t){const e=function(t){return t.json.types?g(t.json):t.type?y(t):g(t)}(t);if(t.json.origins)for(const r in t.json.origins){const n=t.json.origins[r],i=n.types?d(n):e;(0,o.v)(i,n,!1),n.types&&!n.write&&t.json.write?.enabled&&(n.write={...t.json.write}),(0,l.v)(i,n)}(0,o.v)(e,t.json,!0),(0,l.v)(e,t.json)}(t))}},56454:(t,e,r)=>{r.d(e,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},56507:(t,e,r)=>{r.d(e,{EK:()=>O,GB:()=>l,GX:()=>c,MB:()=>E,Nd:()=>I,PZ:()=>_,Qp:()=>h,Uv:()=>C,Vr:()=>u,Zu:()=>D,_e:()=>T,aq:()=>N,dp:()=>w,e6:()=>S,eC:()=>j,gK:()=>P,jz:()=>M,wB:()=>A}),r(44208);var n=r(53966),o=r(91869);const i=()=>n.A.getLogger("esri.core.accessorSupport.ensureTypes");function s(t){return null==t?t:new Date(t)}function a(t){return null==t?t:!!t}function c(t){return null==t?t:t.toString()}function l(t,e=0){return null==t?t:(t=parseFloat(t),isNaN(t)?e:t)}function u(t){return null==t?t:Math.round(parseFloat(t))}function f(t){return null}function h(t,e){return r=>{let n=t(r);return null!=e.step&&(n=Math.round(n/e.step)*e.step),null!=e.min&&(n=Math.max(e.min,n)),null!=e.max&&(n=Math.min(e.max,n)),n}}function p(t){return t?.constructor&&void 0!==t.constructor.__accessorMetadata__}function d(t,e){return null!=e&&t&&!(e instanceof t)}function y(t){return t&&"isCollection"in t}function g(t){return t?.Type?"function"==typeof t.Type?t.Type:t.Type.base:null}function v(t,e){return!!p(e)&&(i().error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+b(t)+"'"),!0)}function _(t,e){return null==e?e:y(t)?function(t,e){if(!e?.constructor||!y(e.constructor))return v(t,e)?e:new t(e);const r=g(t.prototype.itemType),n=g(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(v(t,e),e):new t(e):e}(t,e):d(t,e)?v(t,e)?e:new t(e):e}function b(t){return t?.prototype?.declaredClass||"unknown"}const m=new WeakMap;function w(t,e){const r=function(t){switch(t){case Number:return t=>l(t);case M:return u;case Boolean:return a;case String:return c;case Date:return s;case C:return f;default:return(0,o.tE)(m,t,(()=>_.bind(null,t)))}}(t);return 1===arguments.length?r:r(e)}function A(t,e,r){return 1===arguments.length?A.bind(null,t):e?Array.isArray(e)?e.map((e=>t(e,r))):[t(e,r)]:e}function j(t,e){return 1===arguments.length?A((e=>w(t,e))):A((e=>w(t,e)),e)}function k(t,e,r){return 0!==e&&Array.isArray(r)?r.map((r=>k(t,e-1,r))):t(r)}function T(t,e,r){if(2===arguments.length)return r=>T(t,e,r);if(!r)return r;r=k(t,e,r);let n=e,o=r;for(;n>0&&Array.isArray(o);)n--,o=o[0];if(void 0!==o)for(let t=0;t<n;t++)r=[r];return r}function S(t,e,r){return 2===arguments.length?T((e=>w(t,e)),e):T((e=>w(t,e)),e,r)}function O(t){return!!Array.isArray(t)&&!t.some((e=>{const r=typeof e;return!("string"===r||"number"===r||"function"===r&&t.length>1)}))}function E(t,e){if(2===arguments.length)return E(t).call(null,e);const r=new Set,n=t.filter((t=>"function"!=typeof t)),o=t.filter((t=>"function"==typeof t));for(const e of t)"string"!=typeof e&&"number"!=typeof e||r.add(e);let s=null,a=null;return(t,e)=>{if(null==t)return t;const c=typeof t,l="string"===c||"number"===c;return l&&(r.has(t)||o.some((t=>"string"===c&&t===String||"number"===c&&t===Number)))||"object"===c&&o.some((e=>!d(t,e)))?t:(l&&n.length?(s||(s=n.map((t=>"string"==typeof t?`'${t}'`:`${t}`)).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, only the following values are valid: ${s}`)):"object"==typeof t&&o.length?(a||(a=o.map((t=>b(t))).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, value must be one of ${a}`)):i().error("Accessor#set",`'${t}' is not a valid value for this property`),e&&(e.valid=!1),null)}}function N(t,e){if(2===arguments.length)return N(t).call(null,e);const r={},n=[],o=[];for(const e in t.typeMap){const i=t.typeMap[e];r[e]=w(i),n.push(b(i)),o.push(e)}const s=()=>`'${n.join("', '")}'`,a=()=>`'${o.join("', '")}'`,c="string"==typeof t.key?e=>e[t.key]:t.key;return e=>{if(t.base&&!d(t.base,e))return e;if(null==e)return e;const n=c(e)||t.defaultKeyValue,o=r[n];if(!o)return i().error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(t.typeMap[n],e))return e;if("string"==typeof t.key&&!p(e)){const r={};for(const n in e)n!==t.key&&(r[n]=e[n]);return o(r)}return o(e)}}class M{}class C{}const P={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function D(t){if(!t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function I(t){switch(t.type){case"native":return w(t.value);case"array":return A(I(t.value));case"one-of":return function(t){let e=null;return(r,n)=>x(r,t)?r:(null==e&&(e=$(t)),i().error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}(t);default:return null}}function $(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case M:return"integer";case Date:return"date";case C:return"null";default:return b(t.value)}case"array":return`array of ${$(t.value)}`;case"one-of":{const e=t.values.map((t=>$(t)));return`one of ${e.slice(0,-1)} or ${e[e.length-1]}`}}return"unknown"}function x(t,e){if(null==t)return!0;switch(e.type){case"native":switch(e.value){case Number:case M:return"number"==typeof t;case Boolean:return"boolean"==typeof t;case String:return"string"==typeof t;case C:return null===t}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some((t=>!x(t,e.value)));case"one-of":return e.values.some((e=>x(t,e)))}}},62788:(t,e,r)=>{r.d(e,{F_:()=>p,Xr:()=>b,a:()=>h,fE:()=>v,gc:()=>l}),r(44208);var n=r(53966),o=r(88620),i=r(47328);const s=new(r(67867).R),a=[];let c=s;function l(t){c.onAccessed(t)}let u=!1,f=!1;function h(t,e,r){if(u)return d(t,e,r);let n=null;return y(t),n=e.call(r),g(),n}function p(t,e){return h(s,t,e)}function d(t,e,r){const o=u;u=!0,y(t);let i=null;try{i=e.call(r)}catch(t){f&&n.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return g(),u=o,i}function y(t){c=t,a.push(t)}function g(){const t=a.length;if(t>1){const e=a.pop();c=a[t-2],e.onTrackingEnd()}else if(1===t){const t=a.pop();c=s,t.onTrackingEnd()}else c=s}function v(t,e){if(e.flags&i.i.DepTrackingInitialized)return;e.flags|=i.i.DepTrackingInitialized;const r=f;f=!1,e.flags&i.i.AutoTracked?d(e.trackingTarget,e.metadata.get,t):b(t,e),f=r}const _=[];function b(t,e){e.flags&i.i.ExplicitlyTracking||(e.flags|=i.i.ExplicitlyTracking,d(e.trackingTarget,(()=>{const r=e.metadata.dependsOn||_;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=(0,o.AH)(e);for(let e=0,n=t;e<r.length&&null!=n&&"object"==typeof n;++e)n=m(n,r[e],e!==r.length-1)}else m(t,e,!1)})),e.flags&=~i.i.ExplicitlyTracking)}function m(t,e,r){const n="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(n,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const i=(0,o.oY)(t);if(i){const e=i.propertiesByName.get(n);e&&(l(e),v(t,e))}return r?t[n]:void 0}},67076:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(79907);class o extends n.A{constructor(t,e,r){super(t,e,r)}}o.prototype.type="warning"},67124:(t,e,r)=>{r.d(e,{B:()=>f,v:()=>a});var n=r(49186),o=r(53966),i=r(93637),s=r(15903);function a(t,e){if(!e.write||e.write.writer||!1===e.write.enabled&&!e.write.overridePolicy)return;const r=t?.ndimArray??0;t&&(1===r||"type"in t&&(0,s.P)(t.type))?e.write.writer=h:r>1?e.write.writer=function(t){return(e,r,n,o)=>{let s;if(null===e)s=null;else{s=p(e,o,t);let r=t,n=s;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let t=0;t<r;t++)s=[s]}(0,i.sM)(n,s,r)}}(r):e.types?Array.isArray(e.types)?e.write.writer=function(t){return(e,r,n,o)=>e&&Array.isArray(e)?l(e.filter((e=>c(e,t,o))),r,n,o):l(e,r,n,o)}(e.types[0]):e.write.writer=function(t){return(e,r,n,o)=>e?c(e,t,o)?l(e,r,n,o):void 0:l(e,r,n,o)}(e.types):e.write.writer=l}function c(t,e,r){for(const r in e.typeMap)if(t instanceof e.typeMap[r])return!0;if(r?.messages){const i=e.errorContext??"type",s=`Values of type '${("function"!=typeof e.key?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new n.A(`${i}:unsupported`,s,{definition:t,context:r})),o.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(s)}return!1}function l(t,e,r,n){(0,i.sM)(r,u(t,n),e)}function u(t,e){return t&&"function"==typeof t.write?t.write({},e):t&&"function"==typeof t.toJSON?t.toJSON():"number"==typeof t?f(t):t}function f(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function h(t,e,r,n){let o;null===t?o=null:t&&"function"==typeof t.map?(o=t.map((t=>u(t,n))),"function"==typeof o.toArray&&(o=o.toArray())):o=[u(t,n)],(0,i.sM)(r,o,e)}function p(t,e,r){return 0!==r&&Array.isArray(t)?t.map((t=>p(t,e,r-1))):u(t,e)}},67867:(t,e,r)=>{r.d(e,{R:()=>n});class n{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach((t=>{this._handles.push(t.observe(this._observer))})),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},88620:(t,e,r)=>{r.d(e,{AH:()=>l,h1:()=>a,oY:()=>i,qg:()=>f,yh:()=>s});var n=r(36563),o=r(4718);function i(t){return t.__accessor__??null}function s(t,e){return null!=t?.metadata?.[e]}function a(t,e,r){return c(t,e,r?{policy:r,path:""}:null)}function c(t,e,r){return e?Object.keys(e).reduce(((t,n)=>{const i=n;let s=null,a="merge";if(r&&(s=r.path?`${r.path}.${n}`:n,a=r.policy(s)),"replace"===a)return t[i]=e[i],t;if("replace-arrays"===a&&Array.isArray(t[i]))return t[i]=e[i],t;if(void 0===t[i])return t[i]=(0,o.o8)(e[i]),t;let l=t[i],u=e[i];if(l===u)return t;if(Array.isArray(u)||Array.isArray(t))l=l?Array.isArray(l)?t[i]=l.slice():t[i]=[l]:t[i]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((t=>{l.includes(t)||l.push(t)})));else if(u&&"object"==typeof u)if(r){const e=r.path;r.path=s,t[i]=c(l,u,r),r.path=e}else t[i]=c(l,u,null);else t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||(t[i]=u);return t}),t||{}):t}function l(t){return Array.isArray(t)?t:t.split(".")}function u(t){return t.includes(",")?t.split(",").map((t=>t.trim())):[t.trim()]}function f(t,e,r,o){const i=function(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...u(r));return e}return u(t)}(e);if(1!==i.length){const e=i.map((e=>o(t,e,r)));return(0,n.vE)(e)}return o(t,i[0],r)}},90237:(t,e,r)=>{function n(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function o(t,e,r){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}r.d(e,{_:()=>n,b:()=>o,c:()=>s});var i="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var r,n=0;return function o(){for(;r=t.stack.pop();)try{if(!r.async&&1===n)return n=0,t.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,(function(t){return e(t),o()}))}else n|=1}catch(t){e(t)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},90360:(t,e,r)=>{r.d(e,{C:()=>u,v:()=>l});var n=r(53966),o=r(93637),i=r(67076),s=r(96156),a=r(15903);const c=()=>n.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(t,e,r){t&&(!r&&!e.read||e.read?.reader||!1===e.read?.enabled||function(t){return"types"in t?g(t.types):y(t.type)}(t)&&(0,o.sM)("read.reader",u(t),e))}function u(t){const e=t.ndimArray??0;if(e>1)return function(t){const e=f(t),r=h.bind(null,e),n=t.ndimArray??0;return(t,e,o)=>{if(null==t)return t;t=r(t,o,n);let i=n,s=t;for(;i>0&&Array.isArray(s);)i--,s=s[0];if(void 0!==s)for(let e=0;e<i;e++)t=[t];return t}}(t);if(1===e)return p(t);if("type"in t&&d(t.type)){const e=t.type.prototype?.itemType?.Type,r=p("function"==typeof e?{type:e}:{types:e});return(e,n,o)=>{const i=r(e,n,o);return i?new t.type(i):i}}return f(t)}function f(t){return"type"in t?function(t){return t.prototype.read?(e,r,n)=>{if(null==e)return e;const o=typeof e;if("object"!==o)return void c().error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${o}'`);const i=new t;return i.read(e,n),i}:t.fromJSON}(t.type):function(t){let e=null;const r=t.errorContext??"type",n=t.validate;return(o,a,l)=>{if(null==o)return o;const u=typeof o;if("object"!==u)return void c().error(`Expected JSON value of type 'object' to deserialize, but got '${u}'`);e||(e=function(t){const e={};for(const r in t.typeMap){const n=t.typeMap[r],o=(0,s.tD)(n.prototype);if("function"==typeof t.key)continue;const i=o[t.key];if(!i)continue;if(i.json?.type&&Array.isArray(i.json.type)&&1===i.json.type.length&&"string"==typeof i.json.type[0]){e[i.json.type[0]]=n;continue}const a=i.json?.write;if(!a?.writer){e[r]=n;continue}const c=a.target,l="string"==typeof c?c:t.key,u={};a.writer(r,u,l),u[l]&&(e[u[l]]=n)}return e}(t));const f=t.key;if("string"!=typeof f)return;const h=o[f],p=h?e[h]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!p){const t=`Type '${h||"unknown"}' is not supported`;return l?.messages&&o&&l.messages.push(new i.A(`${r}:unsupported`,t,{definition:o,context:l})),void c().error(t)}const d=new p;return d.read(o,l),n?n(d):d}}(t.types)}function h(t,e,r,n){return 0!==n&&Array.isArray(e)?e.map((e=>h(t,e,r,n-1))):t(e,void 0,r)}function p(t){const e=f(t);return(t,r,n)=>{if(null==t)return t;if(Array.isArray(t)){const r=[];for(const o of t){const t=e(o,void 0,n);void 0!==t&&r.push(t)}return r}const o=e(t,void 0,n);return void 0!==o?[o]:void 0}}function d(t){if(!(0,a.P)(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&("function"==typeof e.Type?y(e.Type):g(e.Type))}function y(t){return!Array.isArray(t)&&!!t&&t.prototype&&("read"in t.prototype||"fromJSON"in t||d(t))}function g(t){for(const e in t.typeMap)if(!y(t.typeMap[e]))return!1;return!0}},93687:(t,e,r)=>{r.d(e,{A:()=>n});class n{constructor(t,e,r,n=1,o=0){this._ctor=t,this._acquireFunction=e,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(o),this._initialSize=o;for(let t=0;t<o;t++)this._pool[t]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let e;if(n.test.disabled)e=new this._ctor;else{if(0===this._pool.length){const t=this.allocationSize;for(let e=0;e<t;e++)this._pool[e]=new this._ctor}e=this._pool.pop()}return this._acquireFunction?this._acquireFunction(e,...t):function(t){return t?.acquire&&"function"==typeof t.acquire}(e)&&e.acquire(...t),e}release(t){var e;t&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(t):(e=t,e?.release&&"function"==typeof e.release&&t.release()),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let e=t;e<this._pool.length;++e){const t=this._pool[e];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}static{this.test={disabled:!1}}}},96156:(t,e,r)=>{r.d(e,{CX:()=>a,tD:()=>i,z4:()=>s});var n=r(4718),o=r(88620);function i(t){let e=t.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(t.constructor,"__accessorMetadata__");if(e){if(!r){e=Object.create(e);for(const t in e)e[t]=(0,n.o8)(e[t]);Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0})}}else e={},Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0});return t.constructor.__accessorMetadata__}function s(t,e){const r=i(t);let n=r[e];return n||(n=r[e]={}),n}function a(t,e){return(0,o.h1)(t,e,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(t){return c.test(t)?"replace":"merge"}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6650],{69052:(e,t,i)=>{i.d(t,{ie:()=>l});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+o(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=o(e,t-n):n>i&&(n-=o(e,n-i)),r&&n===i&&(n=t),n+s}function o(e,t,i=0){return Math.ceil((t-i)/e)*e+i}new s(0,2*Math.PI),new s(-Math.PI,Math.PI);const l=new s(0,360)},96650:(e,t,i)=>{i.r(t),i.d(t,{default:()=>q});var n=i(90237),s=i(65176),r=i(69540),o=i(69052),l=i(25482),a=i(97768),u=i(10107),h=i(79901),d=(i(44208),i(87811),i(40608)),p=i(56507),c=i(86738);let w=class extends(l.A.JSONSupportMixin(r.A)){constructor(e){super(e),this.observer=null,this.farDistance=1e3,this.heading=0,this.tilt=90,this.horizontalFieldOfView=45,this.verticalFieldOfView=45,this.feature=null}get valid(){return null!=this.observer&&this.farDistance>0}equals(e){return(0,a.CM)(this.observer,e.observer)&&this.farDistance===e.farDistance&&this.heading===e.heading&&this.tilt===e.tilt&&this.horizontalFieldOfView===e.horizontalFieldOfView&&this.verticalFieldOfView===e.verticalFieldOfView&&(0,s.xH)(this.feature,e.feature)}};(0,n._)([(0,u.MZ)({type:c.A,json:{write:{isRequired:!0}}})],w.prototype,"observer",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0},json:{write:{isRequired:!0}}})],w.prototype,"farDistance",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,h.w)((e=>o.ie.normalize((0,p.GB)(e),void 0,!0)))],w.prototype,"heading",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],w.prototype,"tilt",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:360},json:{write:{isRequired:!0}}})],w.prototype,"horizontalFieldOfView",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],w.prototype,"verticalFieldOfView",void 0),(0,n._)([(0,u.MZ)(s.N1)],w.prototype,"feature",void 0),(0,n._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"valid",null),w=(0,n._)([(0,d.$)("esri.analysis.Viewshed")],w);const y=w;var m=i(45475),v=i(5503),f=i(62885),M=i(34727),g=i(36708),x=(i(53966),i(5443)),_=i(80586);const b=v.A.ofType(y);let O=class extends m.A{constructor(e){super(e),this.type="viewshed",this._extent=null}initialize(){this.addHandles((0,g.wB)((()=>this._computeExtent()),(e=>{null==e.pending&&(this._extent=e.extent)}),g.pc))}get viewsheds(){return this._get("viewsheds")||new b}set viewsheds(e){this._set("viewsheds",(0,f.V)(e,this.viewsheds,b))}get spatialReference(){for(const e of this.viewsheds)if(null!=e.observer)return e.observer.spatialReference;return null}get extent(){return this._extent}get valid(){return this.viewsheds.every((e=>e.valid))}async waitComputeExtent(){const e=this._computeExtent();null!=e.pending&&await e.pending}_computeExtent(){const{spatialReference:e}=this;if(null==e)return{pending:null,extent:null};const t=this.viewsheds.filter((e=>null!=e.observer)),i=t.map((e=>e.observer)).toArray(),n=(0,_.projectOrLoadMany)(i,e);return null!=n.pending?{pending:n.pending,extent:null}:{pending:null,extent:n.geometries.map(((e,i)=>{const n=t.at(i);return null!=e&&null!=n?this._computeViewshedExtent(this.viewsheds.at(i),e):null})).filter((e=>null!=e)).reduce(((e,t)=>function(e,t){return null==e?t:null==t?e:e.union(t)}(e,t)),null)}}_computeViewshedExtent(e,t){const{farDistance:i,heading:n,tilt:s,horizontalFieldOfView:r,verticalFieldOfView:l}=e,{spatialReference:a}=t,u=r/2,h=l/2,d=i/a.metersPerUnit,p=[o.ie.normalize(n-u),n,o.ie.normalize(n+u)],c=x.A.fromPoint(t),w=e=>{const t=p.map((t=>o.ie.normalize(t-e)));if(t[0]>t[2]||360===r)return d;const i=t.map((e=>Math.abs(e>180?360-e:e))).reduce(((e,t)=>e>t?t:e));return i>90?0:d*Math.cos((0,M.kU)(i))};c.xmax+=w(90),c.xmin-=w(-90),c.ymax+=w(0),c.ymin-=w(180);const y=t.z;if(null!=y){let e=y,t=y;const n=s-90,r=(0,M.qE)(n+h,-90,90),o=(0,M.qE)(n-h,-90,90),l=a?.isGeographic?i:d;e+=l*V(r),t+=l*V(o);const p=Z(h)*l,w=V(n)*p*(1-Z(u));s<90&&(e-=w),s>90&&(t-=w),c.zmax=Math.max(e,y),c.zmin=Math.min(t,y)}return c}clear(){this.viewsheds.removeAll()}};function Z(e){return Math.cos((0,M.kU)(e))}function V(e){return Math.sin((0,M.kU)(e))}(0,n._)([(0,u.MZ)({type:["viewshed"]})],O.prototype,"type",void 0),(0,n._)([(0,u.MZ)({cast:f.H,type:b,nonNullable:!0})],O.prototype,"viewsheds",null),(0,n._)([(0,u.MZ)({readOnly:!0})],O.prototype,"spatialReference",null),(0,n._)([(0,u.MZ)()],O.prototype,"_extent",void 0),(0,n._)([(0,u.MZ)()],O.prototype,"extent",null),(0,n._)([(0,u.MZ)({readOnly:!0})],O.prototype,"valid",null),O=(0,n._)([(0,d.$)("esri.analysis.ViewshedAnalysis")],O);const z=O;var R=i(92071),N=i(43937),A=i(4146),E=i(16131);let j=class extends((0,E.q)((0,R.P)(A.A))){constructor(e){super(e),this.type="viewshed",this.operationalLayerType="ViewshedLayer",this.source=new z,this.opacity=1}initialize(){this.addHandles((0,g.wB)((()=>this.source),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),g.pc))}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get fullExtent(){return this.source.extent}releaseAnalysis(e){this.source===e&&(this.source=new z)}get analysis(){return this.source}set analysis(e){this.source=e}get viewsheds(){return this.source.viewsheds}set viewsheds(e){this.source.viewsheds=e}writeViewsheds(e,t,i,n){t.viewsheds=e.filter((e=>e.valid)).map((e=>e.toJSON(n))).toJSON()}};(0,n._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],j.prototype,"type",void 0),(0,n._)([(0,u.MZ)({type:["ViewshedLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n._)([(0,u.MZ)({type:z,nonNullable:!0})],j.prototype,"source",void 0),(0,n._)([(0,u.MZ)({readOnly:!0})],j.prototype,"spatialReference",null),(0,n._)([(0,u.MZ)({readOnly:!0})],j.prototype,"fullExtent",null),(0,n._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,n._)([(0,u.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,n._)([(0,u.MZ)({type:v.A.ofType(y),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],j.prototype,"viewsheds",null),(0,n._)([(0,N.K)("web-scene","viewsheds")],j.prototype,"writeViewsheds",null),j=(0,n._)([(0,d.$)("esri.layers.ViewshedLayer")],j);const q=j}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6650],{69052:(e,t,i)=>{i.d(t,{ie:()=>l});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+o(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=o(e,t-n):n>i&&(n-=o(e,n-i)),r&&n===i&&(n=t),n+s}function o(e,t,i=0){return Math.ceil((t-i)/e)*e+i}new s(0,2*Math.PI),new s(-Math.PI,Math.PI);const l=new s(0,360)},96650:(e,t,i)=>{i.r(t),i.d(t,{default:()=>q});var n=i(90237),s=i(65176),r=i(69540),o=i(69052),l=i(25482),a=i(97768),u=i(10107),h=i(79901),d=(i(44208),i(87811),i(40608)),p=i(56507),c=i(86738);let w=class extends(l.A.JSONSupportMixin(r.A)){constructor(e){super(e),this.observer=null,this.farDistance=1e3,this.heading=0,this.tilt=90,this.horizontalFieldOfView=45,this.verticalFieldOfView=45,this.feature=null}get valid(){return null!=this.observer&&this.farDistance>0}equals(e){return(0,a.CM)(this.observer,e.observer)&&this.farDistance===e.farDistance&&this.heading===e.heading&&this.tilt===e.tilt&&this.horizontalFieldOfView===e.horizontalFieldOfView&&this.verticalFieldOfView===e.verticalFieldOfView&&(0,s.xH)(this.feature,e.feature)}};(0,n._)([(0,u.MZ)({type:c.A,json:{write:{isRequired:!0}}})],w.prototype,"observer",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0},json:{write:{isRequired:!0}}})],w.prototype,"farDistance",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,h.w)((e=>o.ie.normalize((0,p.GB)(e),void 0,!0)))],w.prototype,"heading",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],w.prototype,"tilt",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:360},json:{write:{isRequired:!0}}})],w.prototype,"horizontalFieldOfView",void 0),(0,n._)([(0,u.MZ)({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],w.prototype,"verticalFieldOfView",void 0),(0,n._)([(0,u.MZ)(s.N1)],w.prototype,"feature",void 0),(0,n._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"valid",null),w=(0,n._)([(0,d.$)("esri.analysis.Viewshed")],w);const y=w;var m=i(79608),v=i(5503),f=i(62885),M=i(34727),g=i(36708),x=(i(53966),i(5443)),_=i(80586);const b=v.A.ofType(y);let O=class extends m.A{constructor(e){super(e),this.type="viewshed",this._extent=null}initialize(){this.addHandles((0,g.wB)((()=>this._computeExtent()),(e=>{null==e.pending&&(this._extent=e.extent)}),g.pc))}get viewsheds(){return this._get("viewsheds")||new b}set viewsheds(e){this._set("viewsheds",(0,f.V)(e,this.viewsheds,b))}get spatialReference(){for(const e of this.viewsheds)if(null!=e.observer)return e.observer.spatialReference;return null}get extent(){return this._extent}get valid(){return this.viewsheds.every((e=>e.valid))}async waitComputeExtent(){const e=this._computeExtent();null!=e.pending&&await e.pending}_computeExtent(){const{spatialReference:e}=this;if(null==e)return{pending:null,extent:null};const t=this.viewsheds.filter((e=>null!=e.observer)),i=t.map((e=>e.observer)).toArray(),n=(0,_.projectOrLoadMany)(i,e);return null!=n.pending?{pending:n.pending,extent:null}:{pending:null,extent:n.geometries.map(((e,i)=>{const n=t.at(i);return null!=e&&null!=n?this._computeViewshedExtent(this.viewsheds.at(i),e):null})).filter((e=>null!=e)).reduce(((e,t)=>function(e,t){return null==e?t:null==t?e:e.union(t)}(e,t)),null)}}_computeViewshedExtent(e,t){const{farDistance:i,heading:n,tilt:s,horizontalFieldOfView:r,verticalFieldOfView:l}=e,{spatialReference:a}=t,u=r/2,h=l/2,d=i/a.metersPerUnit,p=[o.ie.normalize(n-u),n,o.ie.normalize(n+u)],c=x.A.fromPoint(t),w=e=>{const t=p.map((t=>o.ie.normalize(t-e)));if(t[0]>t[2]||360===r)return d;const i=t.map((e=>Math.abs(e>180?360-e:e))).reduce(((e,t)=>e>t?t:e));return i>90?0:d*Math.cos((0,M.kU)(i))};c.xmax+=w(90),c.xmin-=w(-90),c.ymax+=w(0),c.ymin-=w(180);const y=t.z;if(null!=y){let e=y,t=y;const n=s-90,r=(0,M.qE)(n+h,-90,90),o=(0,M.qE)(n-h,-90,90),l=a?.isGeographic?i:d;e+=l*V(r),t+=l*V(o);const p=Z(h)*l,w=V(n)*p*(1-Z(u));s<90&&(e-=w),s>90&&(t-=w),c.zmax=Math.max(e,y),c.zmin=Math.min(t,y)}return c}clear(){this.viewsheds.removeAll()}};function Z(e){return Math.cos((0,M.kU)(e))}function V(e){return Math.sin((0,M.kU)(e))}(0,n._)([(0,u.MZ)({type:["viewshed"]})],O.prototype,"type",void 0),(0,n._)([(0,u.MZ)({cast:f.H,type:b,nonNullable:!0})],O.prototype,"viewsheds",null),(0,n._)([(0,u.MZ)({readOnly:!0})],O.prototype,"spatialReference",null),(0,n._)([(0,u.MZ)()],O.prototype,"_extent",void 0),(0,n._)([(0,u.MZ)()],O.prototype,"extent",null),(0,n._)([(0,u.MZ)({readOnly:!0})],O.prototype,"valid",null),O=(0,n._)([(0,d.$)("esri.analysis.ViewshedAnalysis")],O);const z=O;var R=i(92071),N=i(43937),A=i(4146),E=i(16131);let j=class extends((0,E.q)((0,R.P)(A.A))){constructor(e){super(e),this.type="viewshed",this.operationalLayerType="ViewshedLayer",this.source=new z,this.opacity=1}initialize(){this.addHandles((0,g.wB)((()=>this.source),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),g.pc))}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get fullExtent(){return this.source.extent}releaseAnalysis(e){this.source===e&&(this.source=new z)}get analysis(){return this.source}set analysis(e){this.source=e}get viewsheds(){return this.source.viewsheds}set viewsheds(e){this.source.viewsheds=e}writeViewsheds(e,t,i,n){t.viewsheds=e.filter((e=>e.valid)).toJSON(n)}};(0,n._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],j.prototype,"type",void 0),(0,n._)([(0,u.MZ)({type:["ViewshedLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n._)([(0,u.MZ)({type:z,nonNullable:!0})],j.prototype,"source",void 0),(0,n._)([(0,u.MZ)({readOnly:!0})],j.prototype,"spatialReference",null),(0,n._)([(0,u.MZ)({readOnly:!0})],j.prototype,"fullExtent",null),(0,n._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,n._)([(0,u.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,n._)([(0,u.MZ)({type:v.A.ofType(y),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],j.prototype,"viewsheds",null),(0,n._)([(0,N.K)("web-scene","viewsheds")],j.prototype,"writeViewsheds",null),j=(0,n._)([(0,d.$)("esri.layers.ViewshedLayer")],j);const q=j}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(91829),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(92800),l(74081),l(98619),l(62602),l(22393),l(59469),l(25618),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(60517),l(14113);var s=l(28491)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(91829),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(85417),l(74081),l(98619),l(62602),l(22393),l(59469),l(25618),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(60517),l(14113);var s=l(28491)}}]);