@arcgis/core 5.1.0-next.67 → 5.1.0-next.68

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 (132) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{2e1aecdf59ad3421bbad.js → 0e2e4cb34ac6aac88ebf.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{38816f95e801f1c5bbad.js → 1c742bfe3b0aa51823d1.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{27262083d37fe623ca9c.js → 210629f3c28d4339c655.js} +1 -1
  5. package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +1 -0
  6. package/assets/esri/core/workers/chunks/29878b52aa12b3815230.js +1 -0
  7. package/assets/esri/core/workers/chunks/{7fb9a5bc22d7581f1d20.js → 29b1a4ce7646b403008e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{eb7392799a01c2a8497a.js → 2da62687ff678b690839.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2fd4220131bfc3f5e2dd.js +1 -0
  10. package/assets/esri/core/workers/chunks/{a118de5a163ae42bee60.js → 333a0038d782d8a34d58.js} +1 -1
  11. package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +1 -0
  12. package/assets/esri/core/workers/chunks/{e268e5be096392c2e69b.js → 3eef3c2e94aa2a00d76a.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{a5b395e518e4c5fc95d0.js → 40d6ad030614099155cd.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{427183ea93e759943a78.js → 43678e08a3d9d51c2a6d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{af007ec833ab49e4c958.js → 453280ea87a696a4df81.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{921c30b7f4dfc3e018d9.js → 4605a68e40c5c3ac6e3e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{abd5c1d4b7b91d9ea1eb.js → 478879ba965798f61bf3.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{aa69cbaa38b49677ddff.js → 499b899bf88aaf29230d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{8a0f254d45d00b293479.js → 49fb9c47070641bce9a9.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f8eb14170f927aecfbc8.js → 4f9d027055f3a616173c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4e7b084f7104deea1ddb.js → 53b797e384be9628fc94.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{ff0cb1eec14d34214f12.js → 5fe97253f80c797fad7f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{2f8ed1e7c1b10cb30972.js → 678c9f15712cf3d3bb9e.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{4005d37d03c834da7629.js → 68a313155ddc29bd024d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{684ea7f75a7a5fb52cde.js → 6a21c9a4aeebe806ea39.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{0f196ec93925dfefc69a.js → 6bb090f3e5c18604cb39.js} +1 -1
  27. package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +1 -0
  28. package/assets/esri/core/workers/chunks/{79df97e3f5975b42dc4d.js → 75669912cddcb5db52c8.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{749c368f5cc2366716f1.js → 7bd1d624f4f4a11a31e8.js} +1 -1
  30. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1515824f11ef5ab95378.js → 7d0350f459844162d3a7.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{4d069a0ebadb9c53b550.js → 7e39e9d4d68843b60e4c.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8d5bc17557a31ed79ed8.js → 81750c5177d8d52a3e05.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{7d73472696ec76458758.js → 81b2985b83be8f8f1090.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{a8ef9ed9b59de95f2b23.js → 823127b23bec07e1f9d0.js} +2 -2
  36. package/assets/esri/core/workers/chunks/{b8bf3e8b8b870f69f231.js → 8969788c57bcc11bf77b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{4e7bb224bde9e5039263.js → 8b8f391f27774aec6db9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{0e90e9ea1ad587eb3495.js → 8ea4584e07ccc85caabd.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{6c40b3c2b9071edb758d.js → 8fb336c2066113300d0d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{b5648a0b92cf1a2c81ad.js → 915a5e8aecf25f3bc72b.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{7ffcd308087c35adda04.js → 9bd713d96502ddc2ce25.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{9622a83b29acb768fcb5.js → a25acccda8febac71a3d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +1 -0
  44. package/assets/esri/core/workers/chunks/{90cef6f96df7dc27db39.js → a43decc8ede8b4910553.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{dd26e3a29161ea411e41.js → a94bd20551c1179c7ec5.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{fa7ae035472540999721.js → b2120c4c56656be941ae.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{a59db907ec1e31002100.js → b85c9ceeece1bae67a16.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{c4e936879c6cb25cf586.js → b8a11d32a4847513619b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +1 -0
  50. package/assets/esri/core/workers/chunks/{cb9185ed31109781fe59.js → bc887bd62579dba81e2b.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{7e9b790fe01b89acdf6d.js → bcefdf9753d9d2f6f1be.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{927773ed23b1fc245bf7.js → be61ea8e1883b915bbb1.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +1 -0
  54. package/assets/esri/core/workers/chunks/{9a95c28d4a3b3b4b2c50.js → c49c078be08c38a6088d.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d94dfb2ce31e59b3306b.js → c79827f879d1d58d3f1b.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{56036327e721f9c42b33.js → c7ca47f5d4b2f3885239.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{d83ac66478a419e08af6.js → d3d9d40556c847bba1a7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{789357e0f79823f145dd.js → d4e55eb75fa4d3ac1e84.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{fee31d9297648219375d.js → d8d7331600d93bbca2b4.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{e907acaec4c62adac2f2.js → e0fe23019410dea8236b.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{4f847a426973bd350c11.js → e5801b0f3893d4d4f5b0.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{6ab8ed12d162d79a8c55.js → e62d08f5488a74cbda82.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{b4fb4484fa39eede1f62.js → e66b9d00d02fc08cbb2d.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{69520cad347947b09f21.js → ecb7ede6a8e6c05e4c6c.js} +1 -1
  65. package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +1 -0
  66. package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +1 -0
  67. package/assets/esri/core/workers/chunks/f11ea0d3de93ec0392af.js +1 -0
  68. package/assets/esri/core/workers/chunks/{cc8e6d1eb90221103023.js → f1e5626a0cc1631a1efb.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{afea4a4b072c329d3749.js → fc64ae69581e4c38fa8a.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{3f8e8f83ebda07d29ca8.js → fd6bbe47773bbd9f7dd9.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{8418ad9ad7b6481ebe82.js → ffb70e9358c0b171a315.js} +1 -1
  72. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  73. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  74. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  75. package/chunks/arcgis-knowledge-client-core.js +1 -1
  76. package/config.js +1 -1
  77. package/core/string.js +1 -1
  78. package/geometry/support/lineSegment.js +1 -1
  79. package/kernel.js +1 -1
  80. package/layers/GroupLayer.js +1 -1
  81. package/layers/SceneLayer.js +1 -1
  82. package/layers/VoxelWasmPerSceneView.js +1 -1
  83. package/layers/mixins/OperationalLayer.js +1 -1
  84. package/layers/support/arcgisLayers.js +1 -1
  85. package/layers/support/layersCreator.js +1 -1
  86. package/layers/support/{lazyLayerLoader.js → layersLoader.js} +1 -1
  87. package/layers/support/layersMapping.js +2 -0
  88. package/package.json +2 -2
  89. package/popup/Feature.d.ts +3 -3
  90. package/popup/Features.d.ts +1 -13
  91. package/popup/Features.js +1 -1
  92. package/popup/actionUtils.js +1 -1
  93. package/portal/support/portalLayers.js +1 -1
  94. package/rest/knowledgeGraph/GraphQueryResultHeader.js +1 -1
  95. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  96. package/support/revision.js +1 -1
  97. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  98. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  99. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  101. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  102. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  103. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  104. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  105. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  106. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  107. package/views/3d/webgl.js +1 -1
  108. package/views/SelectionManager.d.ts +1 -1
  109. package/views/VideoView.js +1 -1
  110. package/views/draw/DrawManipulator.js +1 -1
  111. package/views/draw/DrawManipulator3D.js +2 -0
  112. package/views/draw/DrawTool.js +1 -1
  113. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  114. package/webscene/spec-certification/api.js +1 -1
  115. package/widgets/Compass/CompassViewModel.d.ts +1 -0
  116. package/widgets/Compass/CompassViewModel.js +1 -1
  117. package/widgets/Compass.js +1 -1
  118. package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +0 -1
  119. package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +0 -1
  120. package/assets/esri/core/workers/chunks/1984c0f037065acd21d3.js +0 -1
  121. package/assets/esri/core/workers/chunks/4fd1bf82939e3bb9bc03.js +0 -1
  122. package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +0 -1
  123. package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +0 -1
  124. package/assets/esri/core/workers/chunks/6f079f1fd6d00d2d174c.js +0 -1
  125. package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +0 -1
  126. package/assets/esri/core/workers/chunks/a80eb704e75d13732878.js +0 -1
  127. package/assets/esri/core/workers/chunks/c72e90a952543d06d84b.js +0 -1
  128. package/assets/esri/core/workers/chunks/e9f2b573f482718306e6.js +0 -1
  129. package/assets/esri/core/workers/chunks/f62e42659b406435573d.js +0 -1
  130. package/layers/mixins/operationalLayerModuleMap.js +0 -2
  131. package/layers/mixins/operationalLayers.js +0 -2
  132. /package/assets/esri/core/workers/chunks/{a8ef9ed9b59de95f2b23.js.LICENSE.txt → 823127b23bec07e1f9d0.js.LICENSE.txt} +0 -0
@@ -1411,4 +1411,4 @@ return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
1411
1411
  calculateOcclusionAndOutputHighlight();
1412
1412
  ${(0,a.If)(v,"outputObjectAndLayerIdColor();")}
1413
1413
  }
1414
- `)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q)}},66211(e,t,r){function i(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/n),e.constants.add("floatBlendInputScale","float",n))}r.d(t,{H:()=>i,m:()=>n});const n=16},14239(e,t,r){r.d(t,{OG:()=>We,gP:()=>Ve});var i=r(5482),n=r(69540),o=r(91429);let s=class extends n.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"row",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"column",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"rows",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"columns",void 0),s=(0,i.Cg)([(0,o.$K)("esri.CameraLayout")],s);const a=s;var c=r(69052),l=r(25482),u=r(34727),d=r(56507),h=r(86738),m=r(43937),p=r(36005);let f=class extends((0,n.OU)(l.o)){constructor(...e){super(...e),this.position=new h.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,d.GB)(e.x||0),n.y=(0,d.GB)(e.y||0),n.z=e.hasZ?(0,d.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new h.A;return r.read(e,t),r.x=(0,d.GB)(r.x||0),r.y=(0,d.GB)(r.y||0),r.z=r.hasZ?(0,d.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,i.Cg)([(0,o.MZ)({type:h.A,json:{write:{isRequired:!0}}})],f.prototype,"position",void 0),(0,i.Cg)([(0,m.K)("position")],f.prototype,"writePosition",null),(0,i.Cg)([(0,p.w)("position")],f.prototype,"readPosition",null),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,o.wg)(e=>c.ie.normalize((0,d.GB)(e)))],f.prototype,"heading",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,o.wg)(e=>(0,u.qE)((0,d.GB)(e),-180,180))],f.prototype,"tilt",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,o.wg)(e=>(0,u.qE)((0,d.GB)(e,55),1,170))],f.prototype,"fov",void 0),(0,i.Cg)([(0,o.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"layout",void 0),f=(0,i.Cg)([(0,o.$K)("esri.Camera")],f);var g=r(9093),v=r(35522),_=r(51850),x=r(16930),b=(r(48353),r(9762),r(65806)),w=r(27993),y=r(73941),T=(r(19419),r(71351)),M=r(69622),S=r(53966),C=r(90629),E=r(58083),A=r(37585),R=r(48163),I=r(78955),O=r(91829),P=r(82919),D=r(44280);function F(e,t,r){e.worldUpAtPosition(t,N),(0,v.Re)(B,r,t);const i=(0,v.Bw)(B);return 0===i?0:(0,u.XM)((0,v.Om)(B,N)/i)}const N=(0,_.vt)(),B=(0,_.vt)();var H;let L=H=class extends M.A{constructor(e){super(e),this._ray=(0,T.vt)(),this._viewport=(0,O.fA)(0,0,1,1),this._padding=(0,O.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,R.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,g.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,g.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,g.vt)(),this._frustumDirty=!0,this._frustum=(0,P.vt)(),this._fullViewport=(0,O.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,_.vt)(),this._up=(0,_.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,v.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,E.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,I.hs)((0,O.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,I.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,I.hs)((0,O.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,I.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,I.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,I.C)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,E.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,E.B8)((0,g.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,g.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,v.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,E.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,E.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,s=-i/2+this.column*o,a=s+o,c=-r/2+this.row*n,l=c+n,u=(0,E.$h)((0,g.vt)(),s*(1+2*this._padding[3]/e),a*(1+2*this._padding[1]/e),c*(1+2*this._padding[2]/t),l*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,E.aI)(d,u)?d:u}copyFrom(e){(0,v.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,I.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,I.C)(this._padding,e.padding),this.notifyChange("_padding"),(0,A.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,E.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,P.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,E.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,I.C)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new H).copyFrom(this)}equals(e){return(0,v.t2)(this.eye,e.eye)&&(0,v.t2)(this.center,e.center)&&(0,v.t2)(this.up,e.up)&&(0,I.t2)(this._viewport,e.viewport)&&(0,I.t2)(this._padding,e.padding)&&(0,A.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,I.hG)(e.screenPadding,this.screenPadding)>=t||(0,I.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,v.jb)(G,e.eye,e.center),(0,v.jb)(j,this.eye,this.center);const r=(0,v.Om)(G,j),i=(0,v.uE)(G),n=(0,v.uE)(j),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,v.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,D.gr)(this.viewForward,(0,v.Re)(G,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,C.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==z&&(0,v.C)(z,e),z[3]=1,(0,I.Z0)(z,z,this.projectionMatrix);const r=Math.abs(z[3]);(0,v.hs)(z,z,1/r);const i=this.fullViewport;t[0]=(0,u.Cc)(0,i[0]+i[2],.5+.5*z[0]),t[1]=(0,u.Cc)(0,i[1]+i[3],.5+.5*z[1]),t[2]=.5*(z[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;z[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],z[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],z[2]=(2*e[2]-1)*e[3],z[3]=e[3],null!=this.inverseProjectionMatrix&&((0,I.Z0)(z,z,this.inverseProjectionMatrix),t[0]=z[0],t[1]=z[1],t[2]=z[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,V),this.renderToScreen(V,t),t}projectToRenderScreen(e,t){if(z[0]=e[0],z[1]=e[1],z[2]=e[2],z[3]=1,(0,I.Z0)(z,z,this.viewProjectionMatrix),0===z[3])return null;const r=z;(0,v.hs)(r,r,1/Math.abs(z[3]));const i=this.fullViewport,n=(0,u.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,u.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,V),t)}unprojectFromRenderScreen(e,t){if((0,E.lw)(U,this.projectionMatrix,this.viewMatrix),!(0,E.B8)(U,U))return null;const r=this.fullViewport;return z[0]=2*(e[0]-r[0])/r[2]-1,z[1]=2*(e[1]-r[1])/r[3]-1,z[2]=2*e[2]-1,z[3]=1,(0,I.Z0)(z,z,U),0===z[3]?null:(t[0]=z[0]/z[3],t[1]=z[1]/z[3],t[2]=z[2]/z[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,s=Math.max(n-r/2,0),a=Math.max(this.fullHeight-o-i/2,0),c=-Math.min(n-r/2,0),l=-Math.min(this.fullHeight-o-i/2,0),u=r-c- -Math.min(this.fullWidth-n-r/2,0),d=i-l- -Math.min(o-i/2,0);return[Math.round(s),Math.round(a),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-F(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,v.Re)(G,this.center,this.eye);const e=(0,v.Bw)(this.center);e<1?(0,v.t2)(this._up,_.Cb)&&((0,v.C)(this._up,_.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,v.Om)(G,this.center))>.9999*(0,v.Bw)(G)*e||((0,v.$A)(j,G,this.center),(0,v.$A)(j,j,G),(0,v.S8)(j,j),(0,v.t2)(this._up,j)||((0,v.C)(this._up,j),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,v.oW)(G,this.eye,this.center),Math.abs(G[2])<=.9999&&((0,v.hs)(G,G,G[2]),(0,v.hZ)(G,-G[0],-G[1],1-G[2]),(0,v.S8)(G,G),(0,v.t2)(this._up,G)||((0,v.C)(this._up,G),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,v.t2)(e,t)||((0,v.C)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):S.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,P.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,E.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewport",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_padding",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_fov",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_nearFar",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewDirty",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewMatrix",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_pixelRatio",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"pixelRatio",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"row",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"column",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_rows",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"rows",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_columns",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"columns",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"eye",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"center",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_center",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"up",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_up",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewForward",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewUp",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewRight",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"nearFar",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"near",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"far",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewport",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"screenViewport",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"screenPadding",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"x",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"y",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"width",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"height",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fullWidth",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fullHeight",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"_aspect",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"padding",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"projectionMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"inverseProjectionMatrix",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fov",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fovX",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fovY",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewInverseTransposeMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"_projectionMatrixInternal",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"relativeElevation",void 0),L=H=(0,i.Cg)([(0,o.$K)("esri.views.3d.webgl.RenderCamera")],L);const z=(0,O.vt)(),U=(0,g.vt)(),G=(0,_.vt)(),j=(0,_.vt)(),V=(0,C.r_)();r(49718),r(6867),r(16396),(0,_.vt)(),(0,_.vt)(),(0,_.vt)();var k=r(5443),W=r(39829),$=r(95108);function Z(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,s)=>{if(t[r]<i&&s[r]<i)return 1===n?0:1;if(t[r]>i&&s[r]>i)return 1===n?1:0;const a=(s[o]-t[o])/(s[r]-t[r]),c=t[o]+a*(i-t[r]);return e[r]=i,e[o]=c,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(Y,t[0],t[0])&&q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(Y,t[r],i)){case 1:q(e,i);break;case 3:q(e,(0,R.o8)(Y));break;case 2:q(e,(0,R.o8)(Y)),q(e,i)}}}}function q(e,t){0!==e.length&&(0,A.aI)(e.at(-1),t)||e.push(t)}const Y=(0,R.vt)();var X=r(11964),K=r(27921);const J=(0,_.vt)(),Q=(0,_.vt)();function ee(){return{direction:(0,_.vt)(),up:(0,_.vt)()}}function te(e,t,r,i,n){let o=(0,v.S8)(J,e),s=(0,v.Om)(o,i);const a=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,v.Om)(t,i)),s<.99?((0,v.C)(o,t),a&&(0,v.hs)(o,o,-1)):o=null);let c=0;if(o){(0,v.hs)(Q,i,(0,v.Om)(i,o)),(0,v.Re)(o,o,Q);const e=(0,v.Om)(o,n)/((0,v.Bw)(o)*(0,v.Bw)(n));(0,v.$A)(Q,o,n),c=((0,v.Om)(Q,i)>0?1:-1)*(0,u.KJ)((0,u.XM)(e))}const l=(0,u.KJ)((0,u.XM)(-(0,v.Om)(i,e)/(0,v.Bw)(e)));return r?(r.heading=c,r.tilt=l,r):{heading:c,tilt:l}}function re(e,t,r,i){(0,v.Re)(ie,r,t),(0,K.T7)(i,(0,X.LV)(t,ie),e)||e===r||(0,v.C)(e,r)}const ie=(0,_.vt)(),ne=(0,_.fA)(0,1,0),oe=(0,_.fA)(0,0,1),se=(0,g.vt)(),ae=(0,_.vt)(),ce=(0,_.vt)();function le(e,t,r,i=ee()){const{direction:n,up:o}=i;return(0,E.N9)(se,-(0,u.kU)(t)),(0,E.eL)(se,se,(0,u.kU)(r)),(0,v.Z0)(n,oe,se),(0,v.hs)(n,n,-1),(0,v.Z0)(o,ne,se),i}function ue(e,t,r,i,n){const o=t.lines[11].direction,s=(n-r.getAltitude(i))/o[2];(0,v.Ln)(e,i,o,s)}const de=(0,_.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return te(t,r,i,oe,ne)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=le(0,r,i),o=(0,_.vt)();return(0,v.hs)(o,n.direction,-t),(0,v.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,u.kU)(e)},headingTiltToDirectionUp:le,lookAtTiltToEyeTilt:function(e){return(0,u.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,s=e.state.camera.eye,a=[],c=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,T.LV)(t.origin,t.direction),n,de)||ue(de,r,i,t.endpoint,n),re(de,s,de,c),a.push((0,R.fA)(de[0],de[1]))}return function(e,t,r){const i=e.map(e=>((0,v.hZ)(de,e[0],e[1],0),t.fromRenderCoords(de,de,r),[de[0],de[1]]));return i.length<=2?new W.A({spatialReference:r}):(i.push(i[0].slice()),(0,$.$3)(i)||i.reverse(),new W.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return Z(r,e,t,0),Z(i,r,t,1),Z(r,i,t,2),Z(i,r,t,3),i}(a,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,s=e.spatialReference??t.spatialReference;return(0,b.g)(t,ae,o),(0,b.g)(t,ce,o),ae[0]-=r/2,ce[0]+=r/2,ae[1]-=i/2,ce[1]+=i/2,(0,w.F)(ae,o,ae,s),(0,w.F)(ce,o,ce,s),n?(n.xmin=ae[0],n.ymin=ae[1],n.xmax=ce[0],n.ymax=ce[1],n.spatialReference=s):n=new k.A(ae[0],ae[1],ce[0],ce[1],s),n}},Symbol.toStringTag,{value:"Module"}));var he=r(34304),me=r(17136),pe=r(94008),fe=r(28735);class ge{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,P.vt)(),this._points=(0,P.Qy)(),this.lines=new Array(12),this._origin=(0,_.vt)(),this._direction=(0,_.vt)(),this._boundingSphere=new pe.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,_.vt)(),endpoint:null}}update(e){(0,P.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,v.C)(this._origin,e.eye),(0,v.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,v.C)(this._points[t],e[t]);(0,P.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,P.m7)(this.frustum,e)}intersectsRay(e){return(0,P.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,P.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,P.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;ve(this.lines[t],e[t],e[r]),ve(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),ve(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=xe;(0,v.S8)(t,this.direction);const r=_e;(0,v.jb)(r,this.points[4],e);const i=.5*(0,v.Om)(r,r)/(0,v.Om)(t,r),n=this._boundingSphere,o=(0,v.Ln)(be,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=P.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function ve(e,t,r){e.origin=t,e.endpoint=r,(0,v.oW)(e.direction,t,r)}const _e=(0,_.vt)(),xe=(0,_.vt)(),be=(0,_.vt)();r(86211);const we=(0,_.fA)(5802e-9,13558e-9,331e-7),ye=(0,_.fA)(65e-8*3,5643e-9,255e-9);(0,_.fA)(we[0]+ye[0],we[1]+ye[1],we[2]+ye[2]);class Te{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Te(0,0)}static{this.Infinite=new Te}}(0,_.vt)(),(0,_.vt)(),new pe.iy,(0,T.vt)(),new k.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Me=r(32728);const Se=(0,_.fA)(0,0,1),Ce=(0,v.S8)((0,_.vt)(),(0,_.fA)(1,1,1)),Ee=(0,g.vt)(),Ae=(0,_.vt)(),Re=(0,_.vt)();function Ie(e,t,r,i=ee()){(0,v.$A)(Ae,e,Se),0===(0,v.Om)(Ae,Ae)&&(0,v.$A)(Ae,e,Ce),(0,E.$0)(Ee,-(0,u.kU)(t),e),(0,E.e$)(Ee,Ee,-(0,u.kU)(r),Ae);const{up:n,direction:o}=i;return(0,v.$A)(n,Ae,e),(0,v.S8)(n,n),(0,v.Z0)(n,n,Ee),(0,v.S8)(o,e),(0,v.ze)(o,o),(0,v.Z0)(o,o,Ee),i}function Oe(e){const t=e[1];e[1]=-e[2],e[2]=t}function Pe(e,t){const r=Ie(t,e.heading,e.tilt);return e.up=r.up,e}function De(e,t){const r=[],i=[],n=(0,he.FD)();for(let o=0;o<e.length;o++){const s=e[o],a=o===e.length-1?e[0]:e[o+1],c=(0,X.Cr)(s,a,Ge),l=(0,K.vE)(t,c.origin,c.vector,0,ze);switch(l){case 2:r.push(s);break;case 3:i.push(s);break;case 0:case 1:{const[e,o,a]=0===l?[1,r,i]:[-1,i,r],c=(0,K.Qj)(t),u=(0,v.Ln)((0,_.vt)(),ze,c,e*n),d=(0,v.Ln)((0,_.vt)(),ze,c,e*-n);o.push(s),o.push(u),a.push(d)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Fe={minCurvature:(0,u.kU)(5),maxCurvature:(0,u.kU)(50),minSamples:1,maxSamples:6},Ne=(0,_.fA)(1,0,0),Be=(0,_.fA)(0,1,0),He=(0,_.vt)(),Le=(0,_.vt)(),ze=(0,_.vt)(),Ue=new pe.iy,Ge=(0,X.vt)(),je=(0,O.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Ae,o=Re;return(0,v.S8)(n,e),(0,v.$A)(Re,n,Se),0===(0,v.Om)(Re,Re)&&(0,v.$A)(Re,n,Ce),(0,v.$A)(o,Re,n),te(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,_.vt)(),up:null,tilt:i,heading:r},o=Ae;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,a=(0,u.kU)(r),c=(0,u.kU)(i),l=Math.sin(a),d=Math.cos(a),h=Math.sin(c),m=Math.cos(c),p=(0,v.Bw)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,u.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const g=m*s,x=s*s*(h*h),b=d*d*x,w=f-g,y=w*w,T=b*(b+y-o[1]*o[1]);if(T<0)return(0,v.hs)(n.eye,o,f/p),n.tilt=0,Pe(n,e);const M=Math.sqrt(T),S=o[1]*w,C=b+y;let E;if(E=d>0?-M+S:M+S,Math.abs(C)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,v.hs)(n.eye,o,f/p),n.tilt=0,Oe(n.eye),Pe(n,e);n.eye[1]=E/C;const A=l*l*x,R=h*s,I=d*R*n.eye[1],O=n.eye[1]*n.eye[1],P=1-O,D=Math.sqrt(P),F=b*O+A-2*I*D*w+P*y;return Math.abs(F)<1e-8?((0,v.hs)(n.eye,o,f/p),n.tilt=0,Oe(n.eye),Pe(n,e)):(n.eye[0]=(P*(f*o[0]-g*o[0])-R*D*(o[0]*n.eye[1]*d+o[2]*l))/F,n.eye[2]=(P*(f*o[2]-g*o[2])-R*D*(o[2]*n.eye[1]*d-o[0]*l))/F,(0,v.hs)(n.eye,n.eye,f),Oe(n.eye),Pe(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,u.kU)(e),n=(0,v.Bw)(t);return(0,u.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Ie,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,v.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,u.YN)(r/(n/Math.sin(e)));return(0,u.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ge(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,a=r.referenceEllipsoid.radius,c=i.eye,l=1+(0,v.Io)(c,t)/(a+o),d=Math.sqrt(l*l-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=Fe,g=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return Ue.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(Ue,t)}(e),x=(0,u.qE)((d-h)/(m-h),0,1),b=Math.round((0,u.Cc)(p,f,x)),w=i.aboveGround,y=n.planes[5],M=[],S=(0,K.O_)(_.uY,Ne,(0,K.vt)()),C=(0,K.O_)(_.uY,Be,(0,K.vt)());(0,I.hZ)(je,0,0,0,0);const E=e=>{};for(let e=0;e<4;e++){const t=1===e&&!w||3===e&&w?1-g:0,i=1===e&&w||3===e&&!w?g:1,s=n.lines[e],a=n.lines[3===e?0:e+1];for(let n=0;n<b;n++){const l=n/b,d=0===n?0:(0,u.Cc)(t,i,1===e?1-(1-l)**2:3===e?l**2:l),h=(0,v.Cc)(Le,s.origin,a.origin,d),m=(0,Me.nu)(s.direction,a.direction,d,He);r.intersectManifoldClosestSilhouette((0,T.LV)(h,m),o,ze),re(ze,c,ze,y),M.push((0,_.o8)(ze)),0!==M.length&&E((0,v.lo)(M.at(-1),ze));const p=((0,K.Tj)(S,ze)?1:0)|((0,K.Tj)(C,ze)?2:0);je[p]=1}}M.length>2&&(0,v.lo)(M[0],M.at(-1));const A=function(e,t,r){const i=2*(0,he.FD)();return e.map(e=>{const n=[];let o=!1;for(const s of e)t.fromRenderCoords(s,ze,r),Math.abs(s[0])<i&&Math.abs(s[1])<i?(n.push([null,ze[1]]),n.push([null,ze[1]]),o=!0):n.push([ze[0],ze[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,$.$3)(n)||n.reverse(),n})}((0,I.m3)(je)>1?function(e,t){const r=[];for(const i of e)r.push(...De(i,t));return r}(De(M,S),C):[M],r,s);return new W.A({rings:A,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,a,l;const d=t.latitude,h=(0,y.tO)(e.spatialReference).radius,m=t.longitude,p=function(e,t,r){const i=t/r,n=(0,u.kU)(e),o=Math.sin(i/2),s=Math.cos(n),a=2*(0,u.YN)(Math.sqrt(o*o/(s*s)));return(0,u.KJ)(a)}(d,r,h)/2;o=m-p,s=m+p;const f=(0,u.kU)(d),g=(1+Math.sin(f))/(1-Math.sin(f)),v=(g+1)*Math.tan(i/h/2),_=v*v;function b(e){const t=Math.PI/2;return(e=c.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(a=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*g+_))),l=a+i/h,a=b(a),l=b(l),l<a){const e=l;l=a,a=e}if(a=Math.max((0,u.KJ)(a),-90),l=Math.min((0,u.KJ)(l),90),s=me.Y_.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:x.A.WGS84;return n?(n.xmin=o,n.ymin=a,n.xmax=s,n.ymax=l,n.spatialReference=w):n=new k.A(o,a,s,l,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,fe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ve={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},ke=[Ve.FINAL,Ve.COMPOSITE,Ve.OPAQUE,Ve.TRANSPARENT],We={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GROUND_DEPTH:"ground-depth",PRE_TRANSPARENT:"pre-transparent",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_ENVIRONMENT:"opaque-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_HIGHLIGHT:"shadow-highlight",TRANSPARENT_ENVIRONMENT:"transparent-environment",VIEWSHED:"viewshed"};Array.from(Object.values(We)).concat(ke),(0,_.vt)()},94401(e,t,r){r.d(t,{A:()=>D});var i=r(5482),n=r(69622),o=r(49186),s=r(36708),a=r(10107),c=r(64108),l=r(14239),u=r(44208),d=r(53966),h=(r(17676),r(94656)),m=r(63907);r(93637),r(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,u.A)("esri-tests-disable-gpu-memory-measurements"),(0,h.en)();(0,h.en)();r(90644);var p=r(76284),f=r(97768),g=r(48852),v=r(42293);const _=!!(0,u.A)("esri-tests-disable-gpu-memory-measurements");class x{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(m.vt.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:n,internalFormat:o,multisampled:s}=t;s?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return _?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,v.MW)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(m.vt.Renderbuffer,this),this._context=null)}}class b{constructor(e,t,r){if(this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(m.vt.FramebufferObject,this),null!=t){const r=function(e,t){return w(t)||y(t)?t:T(t)?new p.A(e,t):function(e){return 3===M(e)||null!=e&&"samples"in e}(t)?new x(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(m.r6,r),w(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(m.r6)}if(null!=r)if(function(e){return w(e)||T(e)}(r))this._depthStencilTexture=w(r)?r:new p.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=y(r)?r:new x(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}get glName(){return this._glName}get colorTexture(){const e=this._colorAttachments.get(m.r6);return w(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(m.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(m.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((e,[t,r])=>e+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&w(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=m.r6){if(!e)return;this._validateColorAttachmentPoint(t);const{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=m.r6){const t=this._colorAttachments.get(e);if(!t)return;const r=w(t);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,e);else{const t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._initialized){const t=this._context.gl;this._context.temporaryBindFramebufferObject(this,()=>{e.forEach(e=>{w(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=m.r6,r=0){const i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,0,r):this._framebufferTexture2D(i.glName,t,e,36160,0))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041===r||6402===r?34041!==r||i===m.ld.UNSIGNED_INT_24_8?6402!==r||i===m.ld.UNSIGNED_INT||i===m.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){const{_context:t}=this,r=t.boundFramebuffer;t.bindFramebuffer(this);const{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){const{_context:t}=this;t.temporaryBindFramebufferObject(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,s){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const a=s.descriptor;3553!==s.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||e+r>this.width||t+i>this.height||n+r>a.width||o+i>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,l=c.bindTexture(s,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),c.bindTexture(l,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,s){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,s)}async readPixelsAsync(e,t,r,i,n,o,s){const{gl:a}=this._context,c=g.g.createPixelPack(this._context,35041,s.byteLength);this._context.bindBuffer(c);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),a.readPixels(e,t,r,i,n,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};if(S(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(S(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,h.en)())){const{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){const{gl:t}=this._context;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();if(t.bindFramebuffer(e,r),this._colorAttachments.forEach((t,r)=>{if(w(t)){const i=C(t);35866===i?this._framebufferTextureLayer(t.glName,r,e,0,0):this._framebufferTexture2D(t.glName,r,i,e)}else if(y(t)){const i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,C(this._depthStencilTexture),e)}(0,h.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=m.r6,r=3553,i=36160,n=0){this._context.gl.framebufferTexture2D(i,t,r,e,n)}_framebufferTextureLayer(e,t=m.r6,r=36160,i=0,n=0){this._context.gl.framebufferTextureLayer(r,t,e,i,n)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,f.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,f.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),S(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){S(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case m.SB.DEPTH_COMPONENT16:case m.SB.DEPTH_COMPONENT24:case m.SB.DEPTH_COMPONENT32F:return m.xL;case m.iE.DEPTH24_STENCIL8:case m.iE.DEPTH32F_STENCIL8:return m.nI;case 36168:return m.uH;default:return m.r6}}_validateColorAttachmentPoint(e){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:e}=this._context;b._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}const t=e-m.r6;t+1>b._MAX_COLOR_ATTACHMENTS&&d.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function w(e){return 1===M(e)}function y(e){return 2===M(e)}function T(e){return 0===M(e)}function M(e){return null!=e&&"type"in e?e.type:null}function S(e,t){const r=Math.max(e.width,e.height);if(r>t){d.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function C(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function E(e){return 6402===e?m.xL:m.nI}r(67171),r(21818),r(69397);var A=r(85079),R=r(74038);const I=[new R._("position",2,m.pe.UNSIGNED_SHORT,0,4)];new R._("a_pos",2,m.pe.BYTE,0,2),new R._("a_pos",2,m.pe.BYTE,0,4),new R._("a_tex",2,m.pe.BYTE,2,4),(0,A.Xk)(I),r(66289);const O=new Image;O.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",O.width=5,O.height=5,O.decode();let P=class extends n.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=l.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,s.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new o.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){var t;e.initializeAndBind(),this.gl.drawBuffers((t=e)?t.colorAttachments.length>0?t.colorAttachments:[m.$0]:[m.C5])}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,i.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,i.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},48852(e,t,r){r.d(t,{g:()=>d});var i=r(4576),n=r(44208),o=r(53966),s=r(34275),a=r(94656),c=r(63907);const l=()=>o.A.getLogger("esri.views.webgl.BufferObject"),u=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class d{static createIndex(e,t,r){return new d(e,34963,t,r)}static createUniform(e,t,r){return new d(e,35345,t,r)}static createPixelPack(e,t=35041,r){const i=new d(e,35051,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=35040,r){return new d(e,35052,t,r)}static createTransformFeedback(e,t=35044,r){const i=new d(e,35982,t);return i.setSize(r),i}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(c.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,a.Y2)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case c.pe.UNSIGNED_INT:return this._sizeBytes/4;case c.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case c.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return u?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(c.vt.BufferObject,this),this._context=null):this._glName&&l().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(34963===this.bufferType&&null!=t)switch(this._indexType=t,t){case c.pe.UNSIGNED_SHORT:e*=2;break;case c.pe.UNSIGNED_INT:e*=4;case c.pe.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;const t=e.byteLength;34963===this.bufferType&&((0,s.mg)(e)?this._indexType=c.pe.UNSIGNED_BYTE:(0,s.jq)(e)?this._indexType=c.pe.UNSIGNED_SHORT:(0,s.XJ)(e)&&(this._indexType=c.pe.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){34963===this.bufferType&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;null!=t?i.bufferData(this.bufferType,t,this.usage):i.bufferData(this.bufferType,e,this.usage),(0,a.Y2)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:o}=this._context;o.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r),(0,a.Y2)(o),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,n){if(r<0||n<0)return;const o=function(e){return(0,i.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(n??0))>e.byteLength)return;t+o*(n??0)>this.usedMemory&&l().warn("Potential problem getting subdata: requested data exceeds buffer size!");const s=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),s.getBufferSubData(35982,t,e,r,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),s.getBufferSubData(36662,t,e,r,n),this._context.unbindBuffer(36662))}async getSubDataAsync(e,t=0,r,i){await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)}}},65786(e,t,r){r.d(t,{Y:()=>i});const i=class{};new i},14113(e,t,r){r.d(t,{N5:()=>a});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class a extends s{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new h,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),s=n.code.generateSource(),a=n.main.generateSource(t),c=this.debugName?`// ${this.debugName}\n`:"",l="vertex"===e?v:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${c}\n${l}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${s.join("\n")}\n${a.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let s=0;s<i;++s)r[s](e,o,t,n)}}}class c{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class l{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class d extends s{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new f(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class f{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=f._numberToFloatStr(r);break;case"int":i=f._numberToIntStr(r);break;case"uint":i=f._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])}, ${f._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])}, ${f._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])}, ${f._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>f._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},76284(e,t,r){r.d(t,{A:()=>M});var i=r(49186),n=r(44208),o=r(53966),s=r(97768),a=r(93637),c=r(17676),l=r(94656),u=r(63907),d=r(67171);const h=()=>o.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:n}=e;if(n&&(p(n)||f(n))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:n}=e;n&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,a.a4)(u.SB,e)}function f(e){return(0,a.a4)(u.iE,e)}function g(e){return null!=e&&"type"in e&&"compressed"===e.type}function v(e){return null!=e&&!g(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let n=Math.max(t,r);return 32879===e&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function b(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case u.ld.FLOAT:switch(e.pixelFormat){case 6408:return u.H0.RGBA32F;case 6407:return u.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case u.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return u.H0.RGBA8;case 6407:return u.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?u.iE.DEPTH24_STENCIL8:6402===t?u.SB.DEPTH_COMPONENT24:t,e.internalFormat}class w extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new w(e,t)}}const y=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements"),T=()=>o.A.getLogger("esri/views/webgl/Texture");class M{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=w.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return y?0:(0,d.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!g(e)&&this._descriptor.internalFormat&&(0,a.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!g(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,n,o,s,a=0){s||T().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||T().error("An attempt to update uninitialized texture!");const c=this._descriptor;c.internalFormat=b(c);const{context:l,pixelFormat:u,dataType:d,target:h,isImmutable:m}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=l.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+n>c.width||r+o>c.height)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=l;a&&(n&&o||T().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,a)),v(s)?f.texSubImage2D(h,e,t,r,n,o,u,d,s):g(s)?f.compressedTexSubImage2D(h,e,t,r,n,o,c.internalFormat,s.levels[e]):f.texSubImage2D(h,e,t,r,n,o,u,d,s),a&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),l.bindTexture(p,M.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,n,o,s,a,c){c||T().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||T().error("An attempt to update an uninitialized texture!");const l=this._descriptor;l.internalFormat=b(l);const{context:u,pixelFormat:d,dataType:h,isImmutable:m,target:p}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||T().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||n<0||t+o>l.width||r+s>l.height||n+a>l.depth)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:v}=u;if(g(c))c=c.levels[e],v.compressedTexSubImage3D(p,e,t,r,n,o,s,a,l.internalFormat,c);else{const i=c;v.texSubImage3D(p,e,t,r,n,o,s,a,d,h,i)}u.bindTexture(f,M.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,M.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,n=r.context?.gl;if(!n)return;(0,l.Y2)(n),this.hasWebGLTextureObject||(this._glName=n.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),m(r);const o=r.context.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,l.Y2)(n);const s=t??r.target,c=_(s);if(v(e))this._setDataFromTexImageSource(e,s);else{const{width:t,height:o,depth:d}=r;if(null==t||null==o)throw new i.A("texture:missing-size","Width and height must be specified!");if(c&&null==d)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=b(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,o,d),g(e)){if(!function(e){return null!=e&&(0,a.a4)(u.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,o,d,e),(0,l.Y2)(n),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,l.Y2)(n),r.context.bindTexture(o,M.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=b(i);const n=_(t),{width:o,height:s,depth:a}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=o),i.height||(i.height=s),n&&i.depth,n&&(i.depth=a),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,s,a),this._texImage(t,0,i.internalFormat,o,s,a,e),(0,l.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,l.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:n,height:o,depth:s}=i,a=e.levels,c=x(r,n,o,s),l=Math.min(c,a.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,l),this._forEachMipmapLevel((e,i,n,o)=>{const s=a[Math.min(e,a.length-1)];this._compressedTexImage(r,e,t,i,n,o,s)},l)}_texStorage(e,t,r,n,o,s){const{gl:a}=this._descriptor.context;if(!function(e){return u.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?x(e,n,o,s):1;if(_(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");a.texStorage3D(e,c,t,n,o,s)}else a.texStorage2D(e,c,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,o,s,a){const c=this._descriptor.context.gl,l=_(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,n,o,s,d,h,r)}else c.texSubImage2D(e,t,0,0,n,o,d,h,r)}}else{const u=a;if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,n,o,s,0,d,h,u)}else c.texImage2D(e,t,r,n,o,0,d,h,u)}}_compressedTexImage(e,t,r,n,o,s,a){const c=this._descriptor.context.gl,l=_(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,n,o,s,r,a)}else c.compressedTexSubImage2D(e,t,0,0,n,o,r,a)}else if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,n,o,s,0,a)}else c.compressedTexImage2D(e,t,r,n,o,0,a)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:n,preMultiplyAlpha:o,hasMipmap:s}=this._descriptor,a=this._descriptor.compress?.compressionTracker,l=this._descriptor.compress?.compressionCallback,{compressedTextureETC:u,compressedTextureS3TC:d}=i.capabilities;if(!M.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!u&&!d)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,a?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:n?"flipY":"none"}),(0,c.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:o,hasMipmap:s,hasETC:!!u,hasS3TC:!!d},a=await M.compressionWorkerHandle.invoke(i,h.signal,1);if((0,c.Te)(h),a.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=a.internalFormat,this._setData(a.compressedTexture),l?.(e-this.usedMemory)}}catch(e){(0,c.zf)(e)||T().error("Texture compression failed!")}finally{a?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:s,target:a}=this._descriptor;const c=32879===a;if(null==r||null==n||c&&null==o)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),s&&(1!==r||1!==n||c&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),c&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,l.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>o,e:()=>s});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.MW)(e.internalFormat))*(34067===e.target?6:1))}},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},42293(e,t,r){r.d(t,{MW:()=>c,wH:()=>a,yu:()=>s});var i=r(94656),n=r(63907);const o=new Set([n.pe.BYTE,n.pe.SHORT,n.pe.INT,n.pe.UNSIGNED_BYTE,n.pe.UNSIGNED_SHORT,n.pe.UNSIGNED_INT]);function s(e,t,r,n=0){const s=e.gl;e.bindBuffer(r);for(const a of r.layout){const r=t.get(a.name);if(null==r){console.warn(`There is no location for vertex attribute '${a.name}' defined.`);continue}const c=n*a.stride;if(a.count<=4)a.integer&&o.has(a.type)?s.vertexAttribIPointer(r,a.count,a.type,a.stride,a.offset+c):s.vertexAttribPointer(r,a.count,a.type,a.normalized,a.stride,a.offset+c),s.enableVertexAttribArray(r),a.divisor>0&&s.vertexAttribDivisor(r,a.divisor);else if(9===a.count)for(let e=0;e<3;e++)s.vertexAttribPointer(r+e,3,a.type,a.normalized,a.stride,a.offset+12*e+c),s.enableVertexAttribArray(r+e),a.divisor>0&&s.vertexAttribDivisor(r+e,a.divisor);else if(16===a.count)for(let e=0;e<4;e++)s.vertexAttribPointer(r+e,4,a.type,a.normalized,a.stride,a.offset+16*e+c),s.enableVertexAttribArray(r+e),a.divisor>0&&s.vertexAttribDivisor(r+e,a.divisor);else console.error("Unsupported vertex attribute element count: "+a.count);if((0,i.en)()){const t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${a.name}" with baseInstanceOffset ${c}:`,t,a)}}}function a(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function c(e){switch(e){case 6406:case 6409:case 6403:case 36244:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:case n.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case n.H0.RGBA4:case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.RG8:case n.H0.RG8I:case n.H0.RG8UI:case n.H0.RG8_SNORM:case n.H0.RGB565:case n.H0.RGB5_A1:case n.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case n.H0.RGB8:case n.H0.RGB8I:case n.H0.RGB8UI:case n.H0.RGB8_SNORM:case n.H0.SRGB8:case n.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case n.H0.RGBA8:case n.H0.R32F:case n.H0.R11F_G11F_B10F:case n.H0.RG16F:case n.H0.R32I:case n.H0.R32UI:case n.H0.RG16I:case n.H0.RG16UI:case n.H0.RGBA8I:case n.H0.RGBA8UI:case n.H0.RGBA8_SNORM:case n.H0.SRGB8_ALPHA8:case n.H0.RGB9_E5:case n.H0.RGB10_A2UI:case n.H0.RGB10_A2:case n.SB.DEPTH_COMPONENT32F:case n.iE.DEPTH24_STENCIL8:return 4;case n.iE.DEPTH32F_STENCIL8:return 5;case n.H0.RGB16F:case n.H0.RGB16I:case n.H0.RGB16UI:return 6;case n.H0.RG32F:case n.H0.RG32I:case n.H0.RG32UI:case n.H0.RGBA16F:case n.H0.RGBA16I:case n.H0.RGBA16UI:return 8;case n.H0.RGB32F:case n.H0.RGB32I:case n.H0.RGB32UI:return 12;case n.H0.RGBA32F:case n.H0.RGBA32I:case n.H0.RGBA32UI:return 16;case n.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case n.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case n.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case n.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case n.CQ.COMPRESSED_R11_EAC:case n.CQ.COMPRESSED_SIGNED_R11_EAC:case n.CQ.COMPRESSED_RGB8_ETC2:case n.CQ.COMPRESSED_SRGB8_ETC2:case n.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case n.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case n.CQ.COMPRESSED_RG11_EAC:case n.CQ.COMPRESSED_SIGNED_RG11_EAC:case n.CQ.COMPRESSED_RGBA8_ETC2_EAC:case n.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},85079(e,t,r){r.d(t,{Sk:()=>s,Xk:()=>n,_u:()=>o});var i=r(21818);function n(e){let t=0;return(0,i.z)(new Map(e.map(({name:e,count:r})=>{const i=[e,t];return 16===r?t+=4:9===r?t+=3:++t,i})))}function o(e){const t=new Map;let r=0;return e.forEach(e=>e.forEach(({name:e,count:i})=>{t.set(e,r),16===i?r+=4:9===i?r+=3:++r})),t}function s(e){return o(Array.from(e.values()).map(({layout:e})=>e))}},66289(e,t,r){r.d(t,{R:()=>n});var i=r(48852);class n extends i.g{constructor(e,t,r,i=35044){super(e,34962,i,r),this.layout=t}}},74038(e,t,r){r.d(t,{_:()=>i});class i{constructor(e,t,r,i,n,o=!1,s=0,a=!1){this.name=e,this.count=t,this.type=r,this.offset=i,this.stride=n,this.normalized=o,this.divisor=s,this.integer=a}}},94656(e,t,r){r.d(t,{Y2:()=>l,en:()=>c,u1:()=>s});var i=r(49186),n=r(44208),o=r(53966);function s(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const a=!!(0,n.A)("enable-feature:webgl-debug");function c(){return a}function l(e,t=c()){if(t){const t=s(e);if(t){const e=(new Error).stack;o.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},63907(e,t,r){r.d(t,{$0:()=>h,C5:()=>d,CQ:()=>v,H0:()=>o,SB:()=>c,WR:()=>i,XN:()=>s,iE:()=>a,ld:()=>l,nI:()=>p,pe:()=>n,r6:()=>m,uH:()=>g,vt:()=>u,xL:()=>f});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},s=Object.values(o),a={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},c={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},l={FLOAT:n.FLOAT,UNSIGNED_BYTE:n.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:n.BYTE,UNSIGNED_SHORT:n.UNSIGNED_SHORT,SHORT:n.SHORT,UNSIGNED_INT:n.UNSIGNED_INT,INT:n.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},d=1029,h=0,m=36064,p=33306,f=36096,g=36128,v={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}r.d(t,{Ey:()=>w,RC:()=>s,T8:()=>a,Uy:()=>d,Xt:()=>u,iD:()=>o,kn:()=>h,p3:()=>n}),r(4718);const o=i(0,771),s=(i(1,0),i(1,1),i(1,771)),a=n(770,1,771,771),c=(n(0,0,768,1),{face:1029,mode:2305}),l={face:1028,mode:2305},u=e=>2===e?c:1===e?l:null,d={zNear:0,zFar:1},h={r:!0,g:!0,b:!0,a:!0};function m(e){return M.intern(e)}function p(e){return C.intern(e)}function f(e){return A.intern(e)}function g(e){return I.intern(e)}function v(e){return P.intern(e)}function _(e){return F.intern(e)}function x(e){return B.intern(e)}function b(e){return L.intern(e)}function w(e){return U.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function T(e){return"["+e.join(",")+"]"}const M=new y(S,e=>({__tag:"Blending",...e}));function S(e){return e?T([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const C=new y(E,e=>({__tag:"Culling",...e}));function E(e){return e?T([e.face,e.mode]):null}const A=new y(R,e=>({__tag:"PolygonOffset",...e}));function R(e){return e?T([e.factor,e.units]):null}const I=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?T([e.func]):null}const P=new y(D,e=>({__tag:"StencilTest",...e}));function D(e){return e?T([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const F=new y(N,e=>({__tag:"DepthWrite",...e}));function N(e){return e?T([e.zNear,e.zFar]):null}const B=new y(H,e=>({__tag:"ColorWrite",...e}));function H(e){return e?T([e.r,e.g,e.b,e.a]):null}const L=new y(z,e=>({__tag:"StencilWrite",...e}));function z(e){return e?T([e.mask]):null}const U=new y(function(e){return e?T([S(e.blending),E(e.culling),R(e.polygonOffset),O(e.depthTest),D(e.stencilTest),N(e.depthWrite),H(e.colorWrite),z(e.stencilWrite)]):null},e=>({blending:m(e.blending),culling:p(e.culling),polygonOffset:f(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:_(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:b(e.stencilWrite)}))},49788(e,t,r){r.d(t,{Q:()=>i});const i=1/255.5}}]);
1414
+ `)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q)}},66211(e,t,r){function i(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/n),e.constants.add("floatBlendInputScale","float",n))}r.d(t,{H:()=>i,m:()=>n});const n=16},14239(e,t,r){r.d(t,{OG:()=>We,gP:()=>Ve});var i=r(5482),n=r(69540),o=r(91429);let s=class extends n.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"row",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"column",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"rows",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],s.prototype,"columns",void 0),s=(0,i.Cg)([(0,o.$K)("esri.CameraLayout")],s);const a=s;var c=r(69052),l=r(25482),u=r(34727),d=r(56507),h=r(86738),m=r(43937),p=r(36005);let f=class extends((0,n.OU)(l.o)){constructor(...e){super(...e),this.position=new h.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,d.GB)(e.x||0),n.y=(0,d.GB)(e.y||0),n.z=e.hasZ?(0,d.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new h.A;return r.read(e,t),r.x=(0,d.GB)(r.x||0),r.y=(0,d.GB)(r.y||0),r.z=r.hasZ?(0,d.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,i.Cg)([(0,o.MZ)({type:h.A,json:{write:{isRequired:!0}}})],f.prototype,"position",void 0),(0,i.Cg)([(0,m.K)("position")],f.prototype,"writePosition",null),(0,i.Cg)([(0,p.w)("position")],f.prototype,"readPosition",null),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,o.wg)(e=>c.ie.normalize((0,d.GB)(e)))],f.prototype,"heading",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,o.wg)(e=>(0,u.qE)((0,d.GB)(e),-180,180))],f.prototype,"tilt",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,o.wg)(e=>(0,u.qE)((0,d.GB)(e,55),1,170))],f.prototype,"fov",void 0),(0,i.Cg)([(0,o.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"layout",void 0),f=(0,i.Cg)([(0,o.$K)("esri.Camera")],f);var g=r(9093),v=r(35522),_=r(51850),x=r(16930),b=(r(48353),r(9762),r(65806)),w=r(27993),y=r(73941),T=(r(19419),r(71351)),M=r(69622),S=r(53966),C=r(90629),E=r(58083),A=r(37585),R=r(48163),I=r(78955),O=r(91829),P=r(82919),D=r(44280);function F(e,t,r){e.worldUpAtPosition(t,N),(0,v.Re)(B,r,t);const i=(0,v.Bw)(B);return 0===i?0:(0,u.XM)((0,v.Om)(B,N)/i)}const N=(0,_.vt)(),B=(0,_.vt)();var H;let L=H=class extends M.A{constructor(e){super(e),this._ray=(0,T.vt)(),this._viewport=(0,O.fA)(0,0,1,1),this._padding=(0,O.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,R.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,g.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,g.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,g.vt)(),this._frustumDirty=!0,this._frustum=(0,P.vt)(),this._fullViewport=(0,O.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,_.vt)(),this._up=(0,_.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,v.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,E.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,v.hZ)((0,_.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,I.hs)((0,O.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,I.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,I.hs)((0,O.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,I.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,I.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,I.C)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,E.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,E.B8)((0,g.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,g.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,v.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,E.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,E.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,s=-i/2+this.column*o,a=s+o,c=-r/2+this.row*n,l=c+n,u=(0,E.$h)((0,g.vt)(),s*(1+2*this._padding[3]/e),a*(1+2*this._padding[1]/e),c*(1+2*this._padding[2]/t),l*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,E.aI)(d,u)?d:u}copyFrom(e){(0,v.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,I.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,I.C)(this._padding,e.padding),this.notifyChange("_padding"),(0,A.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,E.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,P.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,E.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,I.C)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new H).copyFrom(this)}equals(e){return(0,v.t2)(this.eye,e.eye)&&(0,v.t2)(this.center,e.center)&&(0,v.t2)(this.up,e.up)&&(0,I.t2)(this._viewport,e.viewport)&&(0,I.t2)(this._padding,e.padding)&&(0,A.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,I.hG)(e.screenPadding,this.screenPadding)>=t||(0,I.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,v.jb)(G,e.eye,e.center),(0,v.jb)(j,this.eye,this.center);const r=(0,v.Om)(G,j),i=(0,v.uE)(G),n=(0,v.uE)(j),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,v.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,D.gr)(this.viewForward,(0,v.Re)(G,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,C.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==z&&(0,v.C)(z,e),z[3]=1,(0,I.Z0)(z,z,this.projectionMatrix);const r=Math.abs(z[3]);(0,v.hs)(z,z,1/r);const i=this.fullViewport;t[0]=(0,u.Cc)(0,i[0]+i[2],.5+.5*z[0]),t[1]=(0,u.Cc)(0,i[1]+i[3],.5+.5*z[1]),t[2]=.5*(z[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;z[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],z[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],z[2]=(2*e[2]-1)*e[3],z[3]=e[3],null!=this.inverseProjectionMatrix&&((0,I.Z0)(z,z,this.inverseProjectionMatrix),t[0]=z[0],t[1]=z[1],t[2]=z[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,V),this.renderToScreen(V,t),t}projectToRenderScreen(e,t){if(z[0]=e[0],z[1]=e[1],z[2]=e[2],z[3]=1,(0,I.Z0)(z,z,this.viewProjectionMatrix),0===z[3])return null;const r=z;(0,v.hs)(r,r,1/Math.abs(z[3]));const i=this.fullViewport,n=(0,u.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,u.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,V),t)}unprojectFromRenderScreen(e,t){if((0,E.lw)(U,this.projectionMatrix,this.viewMatrix),!(0,E.B8)(U,U))return null;const r=this.fullViewport;return z[0]=2*(e[0]-r[0])/r[2]-1,z[1]=2*(e[1]-r[1])/r[3]-1,z[2]=2*e[2]-1,z[3]=1,(0,I.Z0)(z,z,U),0===z[3]?null:(t[0]=z[0]/z[3],t[1]=z[1]/z[3],t[2]=z[2]/z[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,s=Math.max(n-r/2,0),a=Math.max(this.fullHeight-o-i/2,0),c=-Math.min(n-r/2,0),l=-Math.min(this.fullHeight-o-i/2,0),u=r-c- -Math.min(this.fullWidth-n-r/2,0),d=i-l- -Math.min(o-i/2,0);return[Math.round(s),Math.round(a),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-F(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,v.Re)(G,this.center,this.eye);const e=(0,v.Bw)(this.center);e<1?(0,v.t2)(this._up,_.Cb)&&((0,v.C)(this._up,_.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,v.Om)(G,this.center))>.9999*(0,v.Bw)(G)*e||((0,v.$A)(j,G,this.center),(0,v.$A)(j,j,G),(0,v.S8)(j,j),(0,v.t2)(this._up,j)||((0,v.C)(this._up,j),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,v.oW)(G,this.eye,this.center),Math.abs(G[2])<=.9999&&((0,v.hs)(G,G,G[2]),(0,v.hZ)(G,-G[0],-G[1],1-G[2]),(0,v.S8)(G,G),(0,v.t2)(this._up,G)||((0,v.C)(this._up,G),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,v.t2)(e,t)||((0,v.C)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):S.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,P.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,E.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewport",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_padding",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_fov",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_nearFar",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewDirty",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_viewMatrix",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_pixelRatio",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"pixelRatio",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"row",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"column",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_rows",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"rows",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_columns",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"columns",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"eye",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"center",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_center",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"up",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"_up",void 0),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewForward",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewUp",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"viewRight",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"nearFar",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"near",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"far",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewport",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"screenViewport",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"screenPadding",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"x",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"y",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"width",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"height",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fullWidth",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fullHeight",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"_aspect",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"padding",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"projectionMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"inverseProjectionMatrix",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fov",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fovX",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"fovY",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"viewInverseTransposeMatrix",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],L.prototype,"_projectionMatrixInternal",null),(0,i.Cg)([(0,o.MZ)()],L.prototype,"relativeElevation",void 0),L=H=(0,i.Cg)([(0,o.$K)("esri.views.3d.webgl.RenderCamera")],L);const z=(0,O.vt)(),U=(0,g.vt)(),G=(0,_.vt)(),j=(0,_.vt)(),V=(0,C.r_)();r(49718),r(6867),r(16396),(0,_.vt)(),(0,_.vt)(),(0,_.vt)();var k=r(5443),W=r(39829),$=r(95108);function Z(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,s)=>{if(t[r]<i&&s[r]<i)return 1===n?0:1;if(t[r]>i&&s[r]>i)return 1===n?1:0;const a=(s[o]-t[o])/(s[r]-t[r]),c=t[o]+a*(i-t[r]);return e[r]=i,e[o]=c,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(Y,t[0],t[0])&&q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(Y,t[r],i)){case 1:q(e,i);break;case 3:q(e,(0,R.o8)(Y));break;case 2:q(e,(0,R.o8)(Y)),q(e,i)}}}}function q(e,t){0!==e.length&&(0,A.aI)(e.at(-1),t)||e.push(t)}const Y=(0,R.vt)();var X=r(11964),K=r(27921);const J=(0,_.vt)(),Q=(0,_.vt)();function ee(){return{direction:(0,_.vt)(),up:(0,_.vt)()}}function te(e,t,r,i,n){let o=(0,v.S8)(J,e),s=(0,v.Om)(o,i);const a=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,v.Om)(t,i)),s<.99?((0,v.C)(o,t),a&&(0,v.hs)(o,o,-1)):o=null);let c=0;if(o){(0,v.hs)(Q,i,(0,v.Om)(i,o)),(0,v.Re)(o,o,Q);const e=(0,v.Om)(o,n)/((0,v.Bw)(o)*(0,v.Bw)(n));(0,v.$A)(Q,o,n),c=((0,v.Om)(Q,i)>0?1:-1)*(0,u.KJ)((0,u.XM)(e))}const l=(0,u.KJ)((0,u.XM)(-(0,v.Om)(i,e)/(0,v.Bw)(e)));return r?(r.heading=c,r.tilt=l,r):{heading:c,tilt:l}}function re(e,t,r,i){(0,v.Re)(ie,r,t),(0,K.T7)(i,(0,X.LV)(t,ie),e)||e===r||(0,v.C)(e,r)}const ie=(0,_.vt)(),ne=(0,_.fA)(0,1,0),oe=(0,_.fA)(0,0,1),se=(0,g.vt)(),ae=(0,_.vt)(),ce=(0,_.vt)();function le(e,t,r,i=ee()){const{direction:n,up:o}=i;return(0,E.N9)(se,-(0,u.kU)(t)),(0,E.eL)(se,se,(0,u.kU)(r)),(0,v.Z0)(n,oe,se),(0,v.hs)(n,n,-1),(0,v.Z0)(o,ne,se),i}function ue(e,t,r,i,n){const o=t.lines[11].direction,s=(n-r.getAltitude(i))/o[2];(0,v.Ln)(e,i,o,s)}const de=(0,_.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return te(t,r,i,oe,ne)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=le(0,r,i),o=(0,_.vt)();return(0,v.hs)(o,n.direction,-t),(0,v.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,u.kU)(e)},headingTiltToDirectionUp:le,lookAtTiltToEyeTilt:function(e){return(0,u.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,s=e.state.camera.eye,a=[],c=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,T.LV)(t.origin,t.direction),n,de)||ue(de,r,i,t.endpoint,n),re(de,s,de,c),a.push((0,R.fA)(de[0],de[1]))}return function(e,t,r){const i=e.map(e=>((0,v.hZ)(de,e[0],e[1],0),t.fromRenderCoords(de,de,r),[de[0],de[1]]));return i.length<=2?new W.A({spatialReference:r}):(i.push(i[0].slice()),(0,$.$3)(i)||i.reverse(),new W.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return Z(r,e,t,0),Z(i,r,t,1),Z(r,i,t,2),Z(i,r,t,3),i}(a,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,s=e.spatialReference??t.spatialReference;return(0,b.g)(t,ae,o),(0,b.g)(t,ce,o),ae[0]-=r/2,ce[0]+=r/2,ae[1]-=i/2,ce[1]+=i/2,(0,w.F)(ae,o,ae,s),(0,w.F)(ce,o,ce,s),n?(n.xmin=ae[0],n.ymin=ae[1],n.xmax=ce[0],n.ymax=ce[1],n.spatialReference=s):n=new k.A(ae[0],ae[1],ce[0],ce[1],s),n}},Symbol.toStringTag,{value:"Module"}));var he=r(34304),me=r(17136),pe=r(94008),fe=r(28735);class ge{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,P.vt)(),this._points=(0,P.Qy)(),this.lines=new Array(12),this._origin=(0,_.vt)(),this._direction=(0,_.vt)(),this._boundingSphere=new pe.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,_.vt)(),endpoint:null}}update(e){(0,P.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,v.C)(this._origin,e.eye),(0,v.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,v.C)(this._points[t],e[t]);(0,P.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,P.m7)(this.frustum,e)}intersectsRay(e){return(0,P.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,P.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,P.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;ve(this.lines[t],e[t],e[r]),ve(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),ve(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=xe;(0,v.S8)(t,this.direction);const r=_e;(0,v.jb)(r,this.points[4],e);const i=.5*(0,v.Om)(r,r)/(0,v.Om)(t,r),n=this._boundingSphere,o=(0,v.Ln)(be,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=P.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function ve(e,t,r){e.origin=t,e.endpoint=r,(0,v.oW)(e.direction,t,r)}const _e=(0,_.vt)(),xe=(0,_.vt)(),be=(0,_.vt)();r(86211);const we=(0,_.fA)(5802e-9,13558e-9,331e-7),ye=(0,_.fA)(65e-8*3,5643e-9,255e-9);(0,_.fA)(we[0]+ye[0],we[1]+ye[1],we[2]+ye[2]);class Te{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Te(0,0)}static{this.Infinite=new Te}}(0,_.vt)(),(0,_.vt)(),new pe.iy,(0,T.vt)(),new k.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Me=r(32728);const Se=(0,_.fA)(0,0,1),Ce=(0,v.S8)((0,_.vt)(),(0,_.fA)(1,1,1)),Ee=(0,g.vt)(),Ae=(0,_.vt)(),Re=(0,_.vt)();function Ie(e,t,r,i=ee()){(0,v.$A)(Ae,e,Se),0===(0,v.Om)(Ae,Ae)&&(0,v.$A)(Ae,e,Ce),(0,E.$0)(Ee,-(0,u.kU)(t),e),(0,E.e$)(Ee,Ee,-(0,u.kU)(r),Ae);const{up:n,direction:o}=i;return(0,v.$A)(n,Ae,e),(0,v.S8)(n,n),(0,v.Z0)(n,n,Ee),(0,v.S8)(o,e),(0,v.ze)(o,o),(0,v.Z0)(o,o,Ee),i}function Oe(e){const t=e[1];e[1]=-e[2],e[2]=t}function Pe(e,t){const r=Ie(t,e.heading,e.tilt);return e.up=r.up,e}function De(e,t){const r=[],i=[],n=(0,he.FD)();for(let o=0;o<e.length;o++){const s=e[o],a=o===e.length-1?e[0]:e[o+1],c=(0,X.Cr)(s,a,Ge),l=(0,K.vE)(t,c.origin,c.vector,0,ze);switch(l){case 2:r.push(s);break;case 3:i.push(s);break;case 0:case 1:{const[e,o,a]=0===l?[1,r,i]:[-1,i,r],c=(0,K.Qj)(t),u=(0,v.Ln)((0,_.vt)(),ze,c,e*n),d=(0,v.Ln)((0,_.vt)(),ze,c,e*-n);o.push(s),o.push(u),a.push(d)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Fe={minCurvature:(0,u.kU)(5),maxCurvature:(0,u.kU)(50),minSamples:1,maxSamples:6},Ne=(0,_.fA)(1,0,0),Be=(0,_.fA)(0,1,0),He=(0,_.vt)(),Le=(0,_.vt)(),ze=(0,_.vt)(),Ue=new pe.iy,Ge=(0,X.vt)(),je=(0,O.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Ae,o=Re;return(0,v.S8)(n,e),(0,v.$A)(Re,n,Se),0===(0,v.Om)(Re,Re)&&(0,v.$A)(Re,n,Ce),(0,v.$A)(o,Re,n),te(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,_.vt)(),up:null,tilt:i,heading:r},o=Ae;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,a=(0,u.kU)(r),c=(0,u.kU)(i),l=Math.sin(a),d=Math.cos(a),h=Math.sin(c),m=Math.cos(c),p=(0,v.Bw)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,u.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const g=m*s,x=s*s*(h*h),b=d*d*x,w=f-g,y=w*w,T=b*(b+y-o[1]*o[1]);if(T<0)return(0,v.hs)(n.eye,o,f/p),n.tilt=0,Pe(n,e);const M=Math.sqrt(T),S=o[1]*w,C=b+y;let E;if(E=d>0?-M+S:M+S,Math.abs(C)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,v.hs)(n.eye,o,f/p),n.tilt=0,Oe(n.eye),Pe(n,e);n.eye[1]=E/C;const A=l*l*x,R=h*s,I=d*R*n.eye[1],O=n.eye[1]*n.eye[1],P=1-O,D=Math.sqrt(P),F=b*O+A-2*I*D*w+P*y;return Math.abs(F)<1e-8?((0,v.hs)(n.eye,o,f/p),n.tilt=0,Oe(n.eye),Pe(n,e)):(n.eye[0]=(P*(f*o[0]-g*o[0])-R*D*(o[0]*n.eye[1]*d+o[2]*l))/F,n.eye[2]=(P*(f*o[2]-g*o[2])-R*D*(o[2]*n.eye[1]*d-o[0]*l))/F,(0,v.hs)(n.eye,n.eye,f),Oe(n.eye),Pe(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,u.kU)(e),n=(0,v.Bw)(t);return(0,u.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Ie,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,v.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,u.YN)(r/(n/Math.sin(e)));return(0,u.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ge(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,a=r.referenceEllipsoid.radius,c=i.eye,l=1+(0,v.Io)(c,t)/(a+o),d=Math.sqrt(l*l-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=Fe,g=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return Ue.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(Ue,t)}(e),x=(0,u.qE)((d-h)/(m-h),0,1),b=Math.round((0,u.Cc)(p,f,x)),w=i.aboveGround,y=n.planes[5],M=[],S=(0,K.O_)(_.uY,Ne,(0,K.vt)()),C=(0,K.O_)(_.uY,Be,(0,K.vt)());(0,I.hZ)(je,0,0,0,0);const E=e=>{};for(let e=0;e<4;e++){const t=1===e&&!w||3===e&&w?1-g:0,i=1===e&&w||3===e&&!w?g:1,s=n.lines[e],a=n.lines[3===e?0:e+1];for(let n=0;n<b;n++){const l=n/b,d=0===n?0:(0,u.Cc)(t,i,1===e?1-(1-l)**2:3===e?l**2:l),h=(0,v.Cc)(Le,s.origin,a.origin,d),m=(0,Me.nu)(s.direction,a.direction,d,He);r.intersectManifoldClosestSilhouette((0,T.LV)(h,m),o,ze),re(ze,c,ze,y),M.push((0,_.o8)(ze)),0!==M.length&&E((0,v.lo)(M.at(-1),ze));const p=((0,K.Tj)(S,ze)?1:0)|((0,K.Tj)(C,ze)?2:0);je[p]=1}}M.length>2&&(0,v.lo)(M[0],M.at(-1));const A=function(e,t,r){const i=2*(0,he.FD)();return e.map(e=>{const n=[];let o=!1;for(const s of e)t.fromRenderCoords(s,ze,r),Math.abs(s[0])<i&&Math.abs(s[1])<i?(n.push([null,ze[1]]),n.push([null,ze[1]]),o=!0):n.push([ze[0],ze[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,$.$3)(n)||n.reverse(),n})}((0,I.m3)(je)>1?function(e,t){const r=[];for(const i of e)r.push(...De(i,t));return r}(De(M,S),C):[M],r,s);return new W.A({rings:A,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,a,l;const d=t.latitude,h=(0,y.tO)(e.spatialReference).radius,m=t.longitude,p=function(e,t,r){const i=t/r,n=(0,u.kU)(e),o=Math.sin(i/2),s=Math.cos(n),a=2*(0,u.YN)(Math.sqrt(o*o/(s*s)));return(0,u.KJ)(a)}(d,r,h)/2;o=m-p,s=m+p;const f=(0,u.kU)(d),g=(1+Math.sin(f))/(1-Math.sin(f)),v=(g+1)*Math.tan(i/h/2),_=v*v;function b(e){const t=Math.PI/2;return(e=c.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(a=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*g+_))),l=a+i/h,a=b(a),l=b(l),l<a){const e=l;l=a,a=e}if(a=Math.max((0,u.KJ)(a),-90),l=Math.min((0,u.KJ)(l),90),s=me.Y_.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:x.A.WGS84;return n?(n.xmin=o,n.ymin=a,n.xmax=s,n.ymax=l,n.spatialReference=w):n=new k.A(o,a,s,l,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,fe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ve={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},ke=[Ve.FINAL,Ve.COMPOSITE,Ve.OPAQUE,Ve.TRANSPARENT],We={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_HIGHLIGHT:"shadow-highlight",TRANSPARENT_ENVIRONMENT:"transparent-environment",VOXEL:"voxel",VIEWSHED:"viewshed"};Array.from(Object.values(We)).concat(ke),(0,_.vt)()},94401(e,t,r){r.d(t,{A:()=>D});var i=r(5482),n=r(69622),o=r(49186),s=r(36708),a=r(10107),c=r(64108),l=r(14239),u=r(44208),d=r(53966),h=(r(17676),r(94656)),m=r(63907);r(93637),r(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,u.A)("esri-tests-disable-gpu-memory-measurements"),(0,h.en)();(0,h.en)();r(90644);var p=r(76284),f=r(97768),g=r(48852),v=r(42293);const _=!!(0,u.A)("esri-tests-disable-gpu-memory-measurements");class x{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(m.vt.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:n,internalFormat:o,multisampled:s}=t;s?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return _?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,v.MW)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(m.vt.Renderbuffer,this),this._context=null)}}class b{constructor(e,t,r){if(this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(m.vt.FramebufferObject,this),null!=t){const r=function(e,t){return w(t)||y(t)?t:T(t)?new p.A(e,t):function(e){return 3===M(e)||null!=e&&"samples"in e}(t)?new x(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(m.r6,r),w(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(m.r6)}if(null!=r)if(function(e){return w(e)||T(e)}(r))this._depthStencilTexture=w(r)?r:new p.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=y(r)?r:new x(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}get glName(){return this._glName}get colorTexture(){const e=this._colorAttachments.get(m.r6);return w(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(m.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(m.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((e,[t,r])=>e+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&w(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=m.r6){if(!e)return;this._validateColorAttachmentPoint(t);const{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=m.r6){const t=this._colorAttachments.get(e);if(!t)return;const r=w(t);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,e);else{const t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._initialized){const t=this._context.gl;this._context.temporaryBindFramebufferObject(this,()=>{e.forEach(e=>{w(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=m.r6,r=0){const i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,0,r):this._framebufferTexture2D(i.glName,t,e,36160,0))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041===r||6402===r?34041!==r||i===m.ld.UNSIGNED_INT_24_8?6402!==r||i===m.ld.UNSIGNED_INT||i===m.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){const{_context:t}=this,r=t.boundFramebuffer;t.bindFramebuffer(this);const{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){const{_context:t}=this;t.temporaryBindFramebufferObject(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,s){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const a=s.descriptor;3553!==s.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||e+r>this.width||t+i>this.height||n+r>a.width||o+i>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,l=c.bindTexture(s,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),c.bindTexture(l,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,s){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,s)}async readPixelsAsync(e,t,r,i,n,o,s){const{gl:a}=this._context,c=g.g.createPixelPack(this._context,35041,s.byteLength);this._context.bindBuffer(c);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),a.readPixels(e,t,r,i,n,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};if(S(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(S(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,h.en)())){const{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){const{gl:t}=this._context;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();if(t.bindFramebuffer(e,r),this._colorAttachments.forEach((t,r)=>{if(w(t)){const i=C(t);35866===i?this._framebufferTextureLayer(t.glName,r,e,0,0):this._framebufferTexture2D(t.glName,r,i,e)}else if(y(t)){const i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,C(this._depthStencilTexture),e)}(0,h.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=m.r6,r=3553,i=36160,n=0){this._context.gl.framebufferTexture2D(i,t,r,e,n)}_framebufferTextureLayer(e,t=m.r6,r=36160,i=0,n=0){this._context.gl.framebufferTextureLayer(r,t,e,i,n)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,f.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,f.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),S(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){S(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case m.SB.DEPTH_COMPONENT16:case m.SB.DEPTH_COMPONENT24:case m.SB.DEPTH_COMPONENT32F:return m.xL;case m.iE.DEPTH24_STENCIL8:case m.iE.DEPTH32F_STENCIL8:return m.nI;case 36168:return m.uH;default:return m.r6}}_validateColorAttachmentPoint(e){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:e}=this._context;b._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}const t=e-m.r6;t+1>b._MAX_COLOR_ATTACHMENTS&&d.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function w(e){return 1===M(e)}function y(e){return 2===M(e)}function T(e){return 0===M(e)}function M(e){return null!=e&&"type"in e?e.type:null}function S(e,t){const r=Math.max(e.width,e.height);if(r>t){d.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function C(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function E(e){return 6402===e?m.xL:m.nI}r(67171),r(21818),r(69397);var A=r(85079),R=r(74038);const I=[new R._("position",2,m.pe.UNSIGNED_SHORT,0,4)];new R._("a_pos",2,m.pe.BYTE,0,2),new R._("a_pos",2,m.pe.BYTE,0,4),new R._("a_tex",2,m.pe.BYTE,2,4),(0,A.Xk)(I),r(66289);const O=new Image;O.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",O.width=5,O.height=5,O.decode();let P=class extends n.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=l.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,s.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new o.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){var t;e.initializeAndBind(),this.gl.drawBuffers((t=e)?t.colorAttachments.length>0?t.colorAttachments:[m.$0]:[m.C5])}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,i.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,i.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},48852(e,t,r){r.d(t,{g:()=>d});var i=r(4576),n=r(44208),o=r(53966),s=r(34275),a=r(94656),c=r(63907);const l=()=>o.A.getLogger("esri.views.webgl.BufferObject"),u=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class d{static createIndex(e,t,r){return new d(e,34963,t,r)}static createUniform(e,t,r){return new d(e,35345,t,r)}static createPixelPack(e,t=35041,r){const i=new d(e,35051,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=35040,r){return new d(e,35052,t,r)}static createTransformFeedback(e,t=35044,r){const i=new d(e,35982,t);return i.setSize(r),i}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(c.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,a.Y2)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case c.pe.UNSIGNED_INT:return this._sizeBytes/4;case c.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case c.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return u?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(c.vt.BufferObject,this),this._context=null):this._glName&&l().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(34963===this.bufferType&&null!=t)switch(this._indexType=t,t){case c.pe.UNSIGNED_SHORT:e*=2;break;case c.pe.UNSIGNED_INT:e*=4;case c.pe.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;const t=e.byteLength;34963===this.bufferType&&((0,s.mg)(e)?this._indexType=c.pe.UNSIGNED_BYTE:(0,s.jq)(e)?this._indexType=c.pe.UNSIGNED_SHORT:(0,s.XJ)(e)&&(this._indexType=c.pe.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){34963===this.bufferType&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;null!=t?i.bufferData(this.bufferType,t,this.usage):i.bufferData(this.bufferType,e,this.usage),(0,a.Y2)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:o}=this._context;o.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r),(0,a.Y2)(o),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,n){if(r<0||n<0)return;const o=function(e){return(0,i.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(n??0))>e.byteLength)return;t+o*(n??0)>this.usedMemory&&l().warn("Potential problem getting subdata: requested data exceeds buffer size!");const s=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),s.getBufferSubData(35982,t,e,r,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),s.getBufferSubData(36662,t,e,r,n),this._context.unbindBuffer(36662))}async getSubDataAsync(e,t=0,r,i){await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)}}},65786(e,t,r){r.d(t,{Y:()=>i});const i=class{};new i},14113(e,t,r){r.d(t,{N5:()=>a});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class a extends s{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new h,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),s=n.code.generateSource(),a=n.main.generateSource(t),c=this.debugName?`// ${this.debugName}\n`:"",l="vertex"===e?v:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${c}\n${l}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${s.join("\n")}\n${a.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let s=0;s<i;++s)r[s](e,o,t,n)}}}class c{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class l{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class d extends s{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new f(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class f{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=f._numberToFloatStr(r);break;case"int":i=f._numberToIntStr(r);break;case"uint":i=f._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])}, ${f._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])}, ${f._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])}, ${f._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>f._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},76284(e,t,r){r.d(t,{A:()=>M});var i=r(49186),n=r(44208),o=r(53966),s=r(97768),a=r(93637),c=r(17676),l=r(94656),u=r(63907),d=r(67171);const h=()=>o.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:n}=e;if(n&&(p(n)||f(n))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:n}=e;n&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,a.a4)(u.SB,e)}function f(e){return(0,a.a4)(u.iE,e)}function g(e){return null!=e&&"type"in e&&"compressed"===e.type}function v(e){return null!=e&&!g(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let n=Math.max(t,r);return 32879===e&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function b(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case u.ld.FLOAT:switch(e.pixelFormat){case 6408:return u.H0.RGBA32F;case 6407:return u.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case u.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return u.H0.RGBA8;case 6407:return u.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?u.iE.DEPTH24_STENCIL8:6402===t?u.SB.DEPTH_COMPONENT24:t,e.internalFormat}class w extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new w(e,t)}}const y=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements"),T=()=>o.A.getLogger("esri/views/webgl/Texture");class M{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=w.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return y?0:(0,d.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!g(e)&&this._descriptor.internalFormat&&(0,a.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!g(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,n,o,s,a=0){s||T().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||T().error("An attempt to update uninitialized texture!");const c=this._descriptor;c.internalFormat=b(c);const{context:l,pixelFormat:u,dataType:d,target:h,isImmutable:m}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=l.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+n>c.width||r+o>c.height)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=l;a&&(n&&o||T().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,a)),v(s)?f.texSubImage2D(h,e,t,r,n,o,u,d,s):g(s)?f.compressedTexSubImage2D(h,e,t,r,n,o,c.internalFormat,s.levels[e]):f.texSubImage2D(h,e,t,r,n,o,u,d,s),a&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),l.bindTexture(p,M.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,n,o,s,a,c){c||T().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||T().error("An attempt to update an uninitialized texture!");const l=this._descriptor;l.internalFormat=b(l);const{context:u,pixelFormat:d,dataType:h,isImmutable:m,target:p}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||T().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||n<0||t+o>l.width||r+s>l.height||n+a>l.depth)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:v}=u;if(g(c))c=c.levels[e],v.compressedTexSubImage3D(p,e,t,r,n,o,s,a,l.internalFormat,c);else{const i=c;v.texSubImage3D(p,e,t,r,n,o,s,a,d,h,i)}u.bindTexture(f,M.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,M.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,n=r.context?.gl;if(!n)return;(0,l.Y2)(n),this.hasWebGLTextureObject||(this._glName=n.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),m(r);const o=r.context.bindTexture(this,M.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(M.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,l.Y2)(n);const s=t??r.target,c=_(s);if(v(e))this._setDataFromTexImageSource(e,s);else{const{width:t,height:o,depth:d}=r;if(null==t||null==o)throw new i.A("texture:missing-size","Width and height must be specified!");if(c&&null==d)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=b(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,o,d),g(e)){if(!function(e){return null!=e&&(0,a.a4)(u.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,o,d,e),(0,l.Y2)(n),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,l.Y2)(n),r.context.bindTexture(o,M.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=b(i);const n=_(t),{width:o,height:s,depth:a}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=o),i.height||(i.height=s),n&&i.depth,n&&(i.depth=a),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,s,a),this._texImage(t,0,i.internalFormat,o,s,a,e),(0,l.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,l.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:n,height:o,depth:s}=i,a=e.levels,c=x(r,n,o,s),l=Math.min(c,a.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,l),this._forEachMipmapLevel((e,i,n,o)=>{const s=a[Math.min(e,a.length-1)];this._compressedTexImage(r,e,t,i,n,o,s)},l)}_texStorage(e,t,r,n,o,s){const{gl:a}=this._descriptor.context;if(!function(e){return u.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?x(e,n,o,s):1;if(_(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");a.texStorage3D(e,c,t,n,o,s)}else a.texStorage2D(e,c,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,o,s,a){const c=this._descriptor.context.gl,l=_(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,n,o,s,d,h,r)}else c.texSubImage2D(e,t,0,0,n,o,d,h,r)}}else{const u=a;if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,n,o,s,0,d,h,u)}else c.texImage2D(e,t,r,n,o,0,d,h,u)}}_compressedTexImage(e,t,r,n,o,s,a){const c=this._descriptor.context.gl,l=_(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,n,o,s,r,a)}else c.compressedTexSubImage2D(e,t,0,0,n,o,r,a)}else if(l){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,n,o,s,0,a)}else c.compressedTexImage2D(e,t,r,n,o,0,a)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:n,preMultiplyAlpha:o,hasMipmap:s}=this._descriptor,a=this._descriptor.compress?.compressionTracker,l=this._descriptor.compress?.compressionCallback,{compressedTextureETC:u,compressedTextureS3TC:d}=i.capabilities;if(!M.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!u&&!d)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,a?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:n?"flipY":"none"}),(0,c.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:o,hasMipmap:s,hasETC:!!u,hasS3TC:!!d},a=await M.compressionWorkerHandle.invoke(i,h.signal,1);if((0,c.Te)(h),a.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=a.internalFormat,this._setData(a.compressedTexture),l?.(e-this.usedMemory)}}catch(e){(0,c.zf)(e)||T().error("Texture compression failed!")}finally{a?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:s,target:a}=this._descriptor;const c=32879===a;if(null==r||null==n||c&&null==o)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),s&&(1!==r||1!==n||c&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),c&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,l.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>o,e:()=>s});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.MW)(e.internalFormat))*(34067===e.target?6:1))}},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},42293(e,t,r){r.d(t,{MW:()=>c,wH:()=>a,yu:()=>s});var i=r(94656),n=r(63907);const o=new Set([n.pe.BYTE,n.pe.SHORT,n.pe.INT,n.pe.UNSIGNED_BYTE,n.pe.UNSIGNED_SHORT,n.pe.UNSIGNED_INT]);function s(e,t,r,n=0){const s=e.gl;e.bindBuffer(r);for(const a of r.layout){const r=t.get(a.name);if(null==r){console.warn(`There is no location for vertex attribute '${a.name}' defined.`);continue}const c=n*a.stride;if(a.count<=4)a.integer&&o.has(a.type)?s.vertexAttribIPointer(r,a.count,a.type,a.stride,a.offset+c):s.vertexAttribPointer(r,a.count,a.type,a.normalized,a.stride,a.offset+c),s.enableVertexAttribArray(r),a.divisor>0&&s.vertexAttribDivisor(r,a.divisor);else if(9===a.count)for(let e=0;e<3;e++)s.vertexAttribPointer(r+e,3,a.type,a.normalized,a.stride,a.offset+12*e+c),s.enableVertexAttribArray(r+e),a.divisor>0&&s.vertexAttribDivisor(r+e,a.divisor);else if(16===a.count)for(let e=0;e<4;e++)s.vertexAttribPointer(r+e,4,a.type,a.normalized,a.stride,a.offset+16*e+c),s.enableVertexAttribArray(r+e),a.divisor>0&&s.vertexAttribDivisor(r+e,a.divisor);else console.error("Unsupported vertex attribute element count: "+a.count);if((0,i.en)()){const t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${a.name}" with baseInstanceOffset ${c}:`,t,a)}}}function a(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function c(e){switch(e){case 6406:case 6409:case 6403:case 36244:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:case n.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case n.H0.RGBA4:case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.RG8:case n.H0.RG8I:case n.H0.RG8UI:case n.H0.RG8_SNORM:case n.H0.RGB565:case n.H0.RGB5_A1:case n.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case n.H0.RGB8:case n.H0.RGB8I:case n.H0.RGB8UI:case n.H0.RGB8_SNORM:case n.H0.SRGB8:case n.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case n.H0.RGBA8:case n.H0.R32F:case n.H0.R11F_G11F_B10F:case n.H0.RG16F:case n.H0.R32I:case n.H0.R32UI:case n.H0.RG16I:case n.H0.RG16UI:case n.H0.RGBA8I:case n.H0.RGBA8UI:case n.H0.RGBA8_SNORM:case n.H0.SRGB8_ALPHA8:case n.H0.RGB9_E5:case n.H0.RGB10_A2UI:case n.H0.RGB10_A2:case n.SB.DEPTH_COMPONENT32F:case n.iE.DEPTH24_STENCIL8:return 4;case n.iE.DEPTH32F_STENCIL8:return 5;case n.H0.RGB16F:case n.H0.RGB16I:case n.H0.RGB16UI:return 6;case n.H0.RG32F:case n.H0.RG32I:case n.H0.RG32UI:case n.H0.RGBA16F:case n.H0.RGBA16I:case n.H0.RGBA16UI:return 8;case n.H0.RGB32F:case n.H0.RGB32I:case n.H0.RGB32UI:return 12;case n.H0.RGBA32F:case n.H0.RGBA32I:case n.H0.RGBA32UI:return 16;case n.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case n.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case n.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case n.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case n.CQ.COMPRESSED_R11_EAC:case n.CQ.COMPRESSED_SIGNED_R11_EAC:case n.CQ.COMPRESSED_RGB8_ETC2:case n.CQ.COMPRESSED_SRGB8_ETC2:case n.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case n.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case n.CQ.COMPRESSED_RG11_EAC:case n.CQ.COMPRESSED_SIGNED_RG11_EAC:case n.CQ.COMPRESSED_RGBA8_ETC2_EAC:case n.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},85079(e,t,r){r.d(t,{Sk:()=>s,Xk:()=>n,_u:()=>o});var i=r(21818);function n(e){let t=0;return(0,i.z)(new Map(e.map(({name:e,count:r})=>{const i=[e,t];return 16===r?t+=4:9===r?t+=3:++t,i})))}function o(e){const t=new Map;let r=0;return e.forEach(e=>e.forEach(({name:e,count:i})=>{t.set(e,r),16===i?r+=4:9===i?r+=3:++r})),t}function s(e){return o(Array.from(e.values()).map(({layout:e})=>e))}},66289(e,t,r){r.d(t,{R:()=>n});var i=r(48852);class n extends i.g{constructor(e,t,r,i=35044){super(e,34962,i,r),this.layout=t}}},74038(e,t,r){r.d(t,{_:()=>i});class i{constructor(e,t,r,i,n,o=!1,s=0,a=!1){this.name=e,this.count=t,this.type=r,this.offset=i,this.stride=n,this.normalized=o,this.divisor=s,this.integer=a}}},94656(e,t,r){r.d(t,{Y2:()=>l,en:()=>c,u1:()=>s});var i=r(49186),n=r(44208),o=r(53966);function s(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const a=!!(0,n.A)("enable-feature:webgl-debug");function c(){return a}function l(e,t=c()){if(t){const t=s(e);if(t){const e=(new Error).stack;o.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},63907(e,t,r){r.d(t,{$0:()=>h,C5:()=>d,CQ:()=>v,H0:()=>o,SB:()=>c,WR:()=>i,XN:()=>s,iE:()=>a,ld:()=>l,nI:()=>p,pe:()=>n,r6:()=>m,uH:()=>g,vt:()=>u,xL:()=>f});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},s=Object.values(o),a={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},c={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},l={FLOAT:n.FLOAT,UNSIGNED_BYTE:n.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:n.BYTE,UNSIGNED_SHORT:n.UNSIGNED_SHORT,SHORT:n.SHORT,UNSIGNED_INT:n.UNSIGNED_INT,INT:n.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},d=1029,h=0,m=36064,p=33306,f=36096,g=36128,v={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}r.d(t,{Ey:()=>w,RC:()=>s,T8:()=>a,Uy:()=>d,Xt:()=>u,iD:()=>o,kn:()=>h,p3:()=>n}),r(4718);const o=i(0,771),s=(i(1,0),i(1,1),i(1,771)),a=n(770,1,771,771),c=(n(0,0,768,1),{face:1029,mode:2305}),l={face:1028,mode:2305},u=e=>2===e?c:1===e?l:null,d={zNear:0,zFar:1},h={r:!0,g:!0,b:!0,a:!0};function m(e){return M.intern(e)}function p(e){return C.intern(e)}function f(e){return A.intern(e)}function g(e){return I.intern(e)}function v(e){return P.intern(e)}function _(e){return F.intern(e)}function x(e){return B.intern(e)}function b(e){return L.intern(e)}function w(e){return U.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function T(e){return"["+e.join(",")+"]"}const M=new y(S,e=>({__tag:"Blending",...e}));function S(e){return e?T([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const C=new y(E,e=>({__tag:"Culling",...e}));function E(e){return e?T([e.face,e.mode]):null}const A=new y(R,e=>({__tag:"PolygonOffset",...e}));function R(e){return e?T([e.factor,e.units]):null}const I=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?T([e.func]):null}const P=new y(D,e=>({__tag:"StencilTest",...e}));function D(e){return e?T([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const F=new y(N,e=>({__tag:"DepthWrite",...e}));function N(e){return e?T([e.zNear,e.zFar]):null}const B=new y(H,e=>({__tag:"ColorWrite",...e}));function H(e){return e?T([e.r,e.g,e.b,e.a]):null}const L=new y(z,e=>({__tag:"StencilWrite",...e}));function z(e){return e?T([e.mask]):null}const U=new y(function(e){return e?T([S(e.blending),E(e.culling),R(e.polygonOffset),O(e.depthTest),D(e.stencilTest),N(e.depthWrite),H(e.colorWrite),z(e.stencilWrite)]):null},e=>({blending:m(e.blending),culling:p(e.culling),polygonOffset:f(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:_(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:b(e.stencilWrite)}))},49788(e,t,r){r.d(t,{Q:()=>i});const i=1/255.5}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7464],{74660(e,t,i){i.r(t),i.d(t,{default:()=>T});var o=i(5482),r=i(69540),s=i(49186),n=i(53966),a=i(25728),l=i(17676),d=i(36708),p=i(91429),y=i(87024),h=i(4146),c=i(52136),u=i(18768),g=i(69208),f=i(16131),m=i(8303),v=i(25036),w=i(58947),S=i(10873),M=i(50805),_=i(58325),I=i(24212),C=i(97159),b=i(36005);let L=class extends((0,w.w6)((0,u.b)((0,f.q)((0,m.A)((0,v.j)((0,a.M)((0,g.d)((0,c.p)((0,r.OU)(h.A)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles((0,d.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,d.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,i){this._modificationsSource={url:(0,C.f)(e,i),context:i}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,l.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await _.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";(0,I.XF)(n.A.getLogger(this),(0,I.B)(t,"absolute-height",e)),(0,I.XF)(n.A.getLogger(this),(0,I.tW)(t,e))}};(0,o.Cg)([(0,p.MZ)({type:String,readOnly:!0})],L.prototype,"geometryType",void 0),(0,o.Cg)([(0,p.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,o.Cg)([(0,p.MZ)({type:["IntegratedMeshLayer"]})],L.prototype,"operationalLayerType",void 0),(0,o.Cg)([(0,p.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,o.Cg)([(0,p.MZ)({type:M.W4,readOnly:!0,clonable:!1})],L.prototype,"nodePages",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.uV],readOnly:!0,clonable:!1})],L.prototype,"materialDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.Ot],readOnly:!0,clonable:!1})],L.prototype,"textureSetDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.L0],readOnly:!0,clonable:!1})],L.prototype,"geometryDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({readOnly:!0})],L.prototype,"serviceUpdateTimeStamp",void 0),(0,o.Cg)([(0,p.MZ)({type:_.A,clonable:e=>e?.clone()??e}),(0,y.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],L.prototype,"modifications",void 0),(0,o.Cg)([(0,b.w)(["web-scene","portal-item"],"modifications")],L.prototype,"readModifications",null),(0,o.Cg)([(0,p.MZ)(S.Yj)],L.prototype,"elevationInfo",null),(0,o.Cg)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],L.prototype,"path",void 0),L=(0,o.Cg)([(0,p.$K)("esri.layers.IntegratedMeshLayer")],L);const T=L},73179(e,t,i){i.d(t,{b:()=>l,h:()=>d});var o=i(4718),r=i(53966),s=i(84952),n=i(60694),a=i(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:i}=e??{},s=(0,o.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,o,r){(0,n.LS)(this,e,i,t,r)}),{...s,set:function(e){if(null==e)return void this._set("url",e);const i=(0,n.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:r.A.getLogger(this)});this._set("url",i.url),null!=i.layerId&&this._set("layerId",i.layerId)}}}function d(e,t){const{separator:i}=t??{},o=(0,s.An)(e.url);return null!=o&&(null!=e.dynamicDataSource?o.path=(0,s.fj)(o.path,"dynamicLayer"):null!=e.layerId&&(o.path=(0,s.fj)(o.path,i??"",e.layerId.toString()))),o}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7464],{74660(e,t,i){i.r(t),i.d(t,{default:()=>T});var o=i(5482),r=i(69540),s=i(49186),n=i(53966),a=i(25728),l=i(17676),d=i(36708),p=i(91429),y=i(87024),h=i(4146),c=i(52136),u=i(18768),g=i(69208),f=i(34287),m=i(8303),v=i(25036),w=i(58947),S=i(10873),M=i(50805),_=i(58325),I=i(24212),C=i(97159),b=i(36005);let L=class extends((0,w.w6)((0,u.b)((0,f.q)((0,m.A)((0,v.j)((0,a.M)((0,g.d)((0,c.p)((0,r.OU)(h.A)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles((0,d.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,d.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,i){this._modificationsSource={url:(0,C.f)(e,i),context:i}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,l.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await _.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";(0,I.XF)(n.A.getLogger(this),(0,I.B)(t,"absolute-height",e)),(0,I.XF)(n.A.getLogger(this),(0,I.tW)(t,e))}};(0,o.Cg)([(0,p.MZ)({type:String,readOnly:!0})],L.prototype,"geometryType",void 0),(0,o.Cg)([(0,p.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,o.Cg)([(0,p.MZ)({type:["IntegratedMeshLayer"]})],L.prototype,"operationalLayerType",void 0),(0,o.Cg)([(0,p.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,o.Cg)([(0,p.MZ)({type:M.W4,readOnly:!0,clonable:!1})],L.prototype,"nodePages",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.uV],readOnly:!0,clonable:!1})],L.prototype,"materialDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.Ot],readOnly:!0,clonable:!1})],L.prototype,"textureSetDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.L0],readOnly:!0,clonable:!1})],L.prototype,"geometryDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({readOnly:!0})],L.prototype,"serviceUpdateTimeStamp",void 0),(0,o.Cg)([(0,p.MZ)({type:_.A,clonable:e=>e?.clone()??e}),(0,y.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],L.prototype,"modifications",void 0),(0,o.Cg)([(0,b.w)(["web-scene","portal-item"],"modifications")],L.prototype,"readModifications",null),(0,o.Cg)([(0,p.MZ)(S.Yj)],L.prototype,"elevationInfo",null),(0,o.Cg)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],L.prototype,"path",void 0),L=(0,o.Cg)([(0,p.$K)("esri.layers.IntegratedMeshLayer")],L);const T=L},73179(e,t,i){i.d(t,{b:()=>l,h:()=>d});var o=i(4718),r=i(53966),s=i(84952),n=i(60694),a=i(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:i}=e??{},s=(0,o.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,o,r){(0,n.LS)(this,e,i,t,r)}),{...s,set:function(e){if(null==e)return void this._set("url",e);const i=(0,n.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:r.A.getLogger(this)});this._set("url",i.url),null!=i.layerId&&this._set("layerId",i.layerId)}}}function d(e,t){const{separator:i}=t??{},o=(0,s.An)(e.url);return null!=o&&(null!=e.dynamicDataSource?o.path=(0,s.fj)(o.path,"dynamicLayer"):null!=e.layerId&&(o.path=(0,s.fj)(o.path,i??"",e.layerId.toString()))),o}}}]);