@arcgis/core 4.33.0-next.20250406 → 4.33.0-next.20250408

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 (251) hide show
  1. package/Color.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{69b5d0ef14fb521b0fd7.js → 04008648c59031bca8ea.js} +1 -1
  4. package/assets/esri/core/workers/chunks/07236fe57d76b1134cd4.js +1 -0
  5. package/assets/esri/core/workers/chunks/{6a8cf1f51cc4adc268d3.js → 0747c9542172241b52ab.js} +1 -1
  6. package/assets/esri/core/workers/chunks/083548c5eea5aca6404c.js +1 -0
  7. package/assets/esri/core/workers/chunks/0d37c6aa261c8d5e5b23.js +1 -0
  8. package/assets/esri/core/workers/chunks/0d7c1de47ae006277b76.js +1 -0
  9. package/assets/esri/core/workers/chunks/{9574896c90b39fa7ecb4.js → 10fd52bc5124fced5bcc.js} +1 -1
  10. package/assets/esri/core/workers/chunks/11b725421a823f6183a2.js +1 -0
  11. package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → 14d1a970e927ebfed9c8.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 1595f3def0ba0c4f0fe7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1263391920fbb8926ced.js → 19eb465f91d07862926a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1c8cdae7736b6c907d95.js +1 -0
  15. package/assets/esri/core/workers/chunks/1cc4fc3353d217632a1b.js +1 -0
  16. package/assets/esri/core/workers/chunks/{91439b59260b0fb04be9.js → 238df0aee97315623638.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7ea5bbb52e84be9a608e.js → 23cc33576da66b3c4366.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{358a3a9326615d5e6d3b.js → 2679da0c93f05ae956c6.js} +1 -1
  19. package/assets/esri/core/workers/chunks/26e0a0a13060cd3e4291.js +1 -0
  20. package/assets/esri/core/workers/chunks/{c2d0fc13f4b746318a38.js → 290f63304a2a81303c06.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{e6544e966f14fb410157.js → 2d5cb817e6e905103068.js} +1 -1
  22. package/assets/esri/core/workers/chunks/345f428dfcaa594ee617.js +1 -0
  23. package/assets/esri/core/workers/chunks/35dccd3883d2e466c42e.js +1 -0
  24. package/assets/esri/core/workers/chunks/{fc5ca7b08915177c5e33.js → 364860a42edc0c3b8d5b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/393fbd296817e813936c.js +1 -0
  26. package/assets/esri/core/workers/chunks/{82a58a405332d43a328f.js → 39fbac918ebd1b0e3a18.js} +1 -1
  27. package/assets/esri/core/workers/chunks/3a649aa78e25e3c8aa8c.js +1 -0
  28. package/assets/esri/core/workers/chunks/{4cc77769009901a112ec.js → 3b2bda2e8c08f486de27.js} +1 -1
  29. package/assets/esri/core/workers/chunks/3e1bb914aceb3a9af898.js +1 -0
  30. package/assets/esri/core/workers/chunks/3ee77b601fb0f3567e87.js +1 -0
  31. package/assets/esri/core/workers/chunks/40945669f5be487b340c.js +1 -0
  32. package/assets/esri/core/workers/chunks/43a3b1b78d214aadaaad.js +1 -0
  33. package/assets/esri/core/workers/chunks/49d03bdaa9c4476b69d6.js +1 -0
  34. package/assets/esri/core/workers/chunks/{1b87fa15470cce26feea.js → 49d6b56e21b1bc0d1948.js} +1 -1
  35. package/assets/esri/core/workers/chunks/4cbd5303f5a5a5fff391.js +1 -0
  36. package/assets/esri/core/workers/chunks/{40b33c9bd271cddbd837.js → 50ffb2620cdbcfd75723.js} +1 -1
  37. package/assets/esri/core/workers/chunks/544771f64a86b541d5bb.js +1 -0
  38. package/assets/esri/core/workers/chunks/55cc40d1b1853f779d82.js +1 -0
  39. package/assets/esri/core/workers/chunks/56e9dfd62102c32b9770.js +1 -0
  40. package/assets/esri/core/workers/chunks/576bed289aa7be03f319.js +1 -0
  41. package/assets/esri/core/workers/chunks/{b7a1185ac49480fc1410.js → 5c80452df87024fdaa75.js} +1 -1
  42. package/assets/esri/core/workers/chunks/5ef6acd36629eae225da.js +1 -0
  43. package/assets/esri/core/workers/chunks/{e592731ac12b9bc646ff.js → 60d3b329e69f3cddb7f4.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{43b19c58b2d16ae8e7cc.js → 6275114e8ed9dd31465d.js} +1 -1
  45. package/assets/esri/core/workers/chunks/63ce66da1a52d6d07ccb.js +1 -0
  46. package/assets/esri/core/workers/chunks/6447d373a43ef6cd46cd.js +1 -0
  47. package/assets/esri/core/workers/chunks/64824ee75c643cee2aa9.js +1 -0
  48. package/assets/esri/core/workers/chunks/{48fbf887da6d19838bf0.js → 6a067a6ce0968d893142.js} +1 -1
  49. package/assets/esri/core/workers/chunks/6a70b858e24d98845041.js +1 -0
  50. package/assets/esri/core/workers/chunks/{c589d32f8efcca6bf712.js → 6c65b966f4c952508fc1.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{cda6ae4c5cb67e22b454.js → 6d15d953baabccbbee01.js} +1 -1
  52. package/assets/esri/core/workers/chunks/6ecf2924f9f6aac61101.js +1 -0
  53. package/assets/esri/core/workers/chunks/{25a686f00479ac12a1ca.js → 6f9a17f62786af04b74e.js} +1 -1
  54. package/assets/esri/core/workers/chunks/77334c3fed1e3a06d307.js +1 -0
  55. package/assets/esri/core/workers/chunks/{7ef9bcd58af499a14a08.js → 79036c5d7569c4e94abe.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{2ab7d36409e9af3ac3da.js → 7b47b08f4a58898273b9.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{90442f47c9f31f26b453.js → 7f961954e59a232bfa88.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{ccb289911e7445b17763.js → 86b4920f5a99576399fb.js} +2 -2
  59. package/assets/esri/core/workers/chunks/877f665c7edb26c147ea.js +1 -0
  60. package/assets/esri/core/workers/chunks/{8aae03e347ab18ae6ee2.js → 89e7cc489156ff0ebdb6.js} +1 -1
  61. package/assets/esri/core/workers/chunks/8c5619fdf125a459281d.js +1 -0
  62. package/assets/esri/core/workers/chunks/8e64687ee76e70deeb29.js +1 -0
  63. package/assets/esri/core/workers/chunks/{400f95295bbfced31076.js → 8ef755e6a7b2b71f46e6.js} +1 -1
  64. package/assets/esri/core/workers/chunks/8fe36b06a7eceeb874e9.js +1 -0
  65. package/assets/esri/core/workers/chunks/{269531e770376ed9e4fd.js → 90874dfe23035d16660c.js} +1 -1
  66. package/assets/esri/core/workers/chunks/91bb715f5ee87e97f162.js +1 -0
  67. package/assets/esri/core/workers/chunks/{5c757e20c0543e6a49b3.js → 948a3c1419ae323cca10.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{7f31dbe0ca8974a10be8.js → 96cddbbeef61a4f33f29.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{27b7ef3442700f6d6123.js → 9a84ff99756c7247dd39.js} +97 -96
  70. package/assets/esri/core/workers/chunks/9fddd759c308d3d5801a.js +1 -0
  71. package/assets/esri/core/workers/chunks/a29e99328d75b6ceb74d.js +1 -0
  72. package/assets/esri/core/workers/chunks/{af9fda47d02c51a2c7da.js → a32e697547f8ac345dd7.js} +1 -1
  73. package/assets/esri/core/workers/chunks/a426152e7eb550b8f15f.js +1 -0
  74. package/assets/esri/core/workers/chunks/a6de903f22f76d875005.js +1 -0
  75. package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → aaf67ec3d580e1fee6c7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{d2c7067bb6654c0e2793.js → ac91bd1fee9ddadc270b.js} +1 -1
  77. package/assets/esri/core/workers/chunks/ae7c1e34ed1288773ec2.js +1 -0
  78. package/assets/esri/core/workers/chunks/ae9ebc0c0553e57e85ba.js +1 -0
  79. package/assets/esri/core/workers/chunks/{49ed3ab9bd6d7c52e864.js → af41dcc8006cd0f451c2.js} +1 -1
  80. package/assets/esri/core/workers/chunks/b199508eef1eeee72854.js +1 -0
  81. package/assets/esri/core/workers/chunks/b715fa857391931c04b9.js +1 -0
  82. package/assets/esri/core/workers/chunks/c144e00dfe6d63eaa2b1.js +1 -0
  83. package/assets/esri/core/workers/chunks/c150cd2a82260495e9de.js +1 -0
  84. package/assets/esri/core/workers/chunks/{2cbab0c078d0b844934c.js → c3c70dad8c8a93953237.js} +1 -1
  85. package/assets/esri/core/workers/chunks/c4425d5227f7e2379b0f.js +1 -0
  86. package/assets/esri/core/workers/chunks/c837379b36cf716d6215.js +1 -0
  87. package/assets/esri/core/workers/chunks/c849e3e151d78a061bf0.js +1 -0
  88. package/assets/esri/core/workers/chunks/{d2eb3802fa003c2d497e.js → caa5676636b06d743623.js} +1 -1
  89. package/assets/esri/core/workers/chunks/cb83fcfff8731c88c108.js +1 -0
  90. package/assets/esri/core/workers/chunks/cc366e4df91cf516d1b9.js +1 -0
  91. package/assets/esri/core/workers/chunks/ccd3f9b52006cd7dd11e.js +1 -0
  92. package/assets/esri/core/workers/chunks/d59aeb46bf2fb0931a9b.js +1 -0
  93. package/assets/esri/core/workers/chunks/{4ba34124054752b363c0.js → d65c30cd787b287833fb.js} +1 -1
  94. package/assets/esri/core/workers/chunks/d72d44df7e117e26e717.js +1 -0
  95. package/assets/esri/core/workers/chunks/e22cdfce2a0583f3cc50.js +1 -0
  96. package/assets/esri/core/workers/chunks/ee277dd58aa69281163f.js +1 -0
  97. package/assets/esri/core/workers/chunks/f086993f8744209d761f.js +1 -0
  98. package/assets/esri/core/workers/chunks/{8d49c79e549e90371303.js → fa2d836d4a844b26b84e.js} +1 -1
  99. package/assets/esri/core/workers/chunks/fb5b852d0f72df014377.js +1 -0
  100. package/assets/esri/core/workers/chunks/fb65796296b0422cf266.js +1 -0
  101. package/assets/esri/core/workers/chunks/fde544c090cc04581536.js +1 -0
  102. package/assets/esri/core/workers/chunks/fe2c48de24b25c45b3e7.js +1 -0
  103. package/chunks/CheckerBoard.glsl.js +3 -3
  104. package/chunks/ColorMaterial.glsl.js +3 -3
  105. package/chunks/ComponentShader.glsl.js +2 -2
  106. package/chunks/DefaultMaterial.glsl.js +5 -5
  107. package/chunks/ImageMaterial.glsl.js +1 -1
  108. package/chunks/LineMarker.glsl.js +4 -4
  109. package/chunks/Path.glsl.js +2 -2
  110. package/chunks/Pattern.glsl.js +3 -3
  111. package/chunks/Precipitation.glsl.js +1 -1
  112. package/chunks/RealisticTree.glsl.js +6 -6
  113. package/chunks/RibbonLine.glsl.js +1 -1
  114. package/chunks/ShadedColorMaterial.glsl.js +7 -7
  115. package/chunks/WaterSurface.glsl.js +3 -3
  116. package/chunks/vec32.js +1 -1
  117. package/colorUtils.js +1 -1
  118. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  119. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  120. package/core/libs/gl-matrix-2/vec3.js +1 -1
  121. package/geometry/support/float16.js +1 -1
  122. package/geometry/support/meshUtils/merge.js +1 -1
  123. package/identity/IdentityManagerBase.js +1 -1
  124. package/interfaces.d.ts +13 -6
  125. package/layers/effects/parser.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/package.json +2 -2
  128. package/support/revision.js +1 -1
  129. package/symbols/support/Symbol3DEmissive.js +5 -0
  130. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  131. package/symbols/support/Symbol3DMaterial.js +1 -1
  132. package/symbols/support/materialUtils.js +1 -1
  133. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  141. package/views/2d/layers/MediaLayerView2D.js +1 -1
  142. package/views/2d/layers/TileLayerView2D.js +1 -1
  143. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  144. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  145. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  146. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
  147. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  148. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  149. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  150. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  151. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  152. package/views/3d/layers/I3SMeshView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  155. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  156. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  157. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  160. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  161. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  162. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  163. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  164. package/views/3d/support/cameraUtils.js +1 -1
  165. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  166. package/views/3d/terrain/PatchRenderData.js +1 -1
  167. package/views/3d/terrain/SphericalPatch.js +1 -1
  168. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  169. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +6 -5
  170. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  171. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  172. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  173. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  175. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  176. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  177. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  178. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
  179. package/views/SceneView.js +1 -1
  180. package/views/VideoView.js +1 -1
  181. package/views/interactive/SegmentLabels.js +1 -1
  182. package/views/interactive/coordinateHelper.js +1 -1
  183. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  184. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  185. package/views/interactive/sketch/constraints.js +1 -1
  186. package/views/interactive/snapping/GridSnappingEngine.js +1 -1
  187. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  188. package/views/support/geometry3dUtils.js +1 -1
  189. package/views/webgl/FramebufferObject.js +1 -1
  190. package/views/webgl/RenderbufferDescriptor.js +1 -1
  191. package/views/webgl/RenderingContext.js +1 -1
  192. package/views/webgl/TextureDescriptor.js +1 -1
  193. package/assets/esri/core/workers/chunks/066844a51cd22cbef0e6.js +0 -1
  194. package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +0 -1
  195. package/assets/esri/core/workers/chunks/0a0e5d699ddb7052c5c0.js +0 -1
  196. package/assets/esri/core/workers/chunks/1014513c0ec85f9414a4.js +0 -1
  197. package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +0 -1
  198. package/assets/esri/core/workers/chunks/114599ed0752d9a70eef.js +0 -1
  199. package/assets/esri/core/workers/chunks/19e83b184d8b4d0b3007.js +0 -1
  200. package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +0 -1
  201. package/assets/esri/core/workers/chunks/25ef080163f3f795911a.js +0 -1
  202. package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +0 -1
  203. package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +0 -1
  204. package/assets/esri/core/workers/chunks/3b7284516a0e34a9e85e.js +0 -1
  205. package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +0 -1
  206. package/assets/esri/core/workers/chunks/4275dcec730a11173661.js +0 -1
  207. package/assets/esri/core/workers/chunks/4403b3f08907e88d0d91.js +0 -1
  208. package/assets/esri/core/workers/chunks/4523ba4a3c8987abca56.js +0 -1
  209. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
  210. package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +0 -1
  211. package/assets/esri/core/workers/chunks/4e3b60156bee3b8b3367.js +0 -1
  212. package/assets/esri/core/workers/chunks/519028f42b817d3e9933.js +0 -1
  213. package/assets/esri/core/workers/chunks/61737e442b1f8e86164e.js +0 -1
  214. package/assets/esri/core/workers/chunks/705c1ebb327f680f8519.js +0 -1
  215. package/assets/esri/core/workers/chunks/7099564a8853b81ba181.js +0 -1
  216. package/assets/esri/core/workers/chunks/72d7e45e7eb28f2cc0b0.js +0 -1
  217. package/assets/esri/core/workers/chunks/72f4cea853ce9fcf2cb6.js +0 -1
  218. package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +0 -1
  219. package/assets/esri/core/workers/chunks/7655be1470ce39f0e494.js +0 -1
  220. package/assets/esri/core/workers/chunks/796cf1c2ca9955595836.js +0 -1
  221. package/assets/esri/core/workers/chunks/7ccc02a4ec6d3552ecca.js +0 -1
  222. package/assets/esri/core/workers/chunks/80427cd9f0c2e07f21c3.js +0 -1
  223. package/assets/esri/core/workers/chunks/8221f2e540abe1e0f048.js +0 -1
  224. package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
  225. package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +0 -1
  226. package/assets/esri/core/workers/chunks/8f35416a5036897d6289.js +0 -1
  227. package/assets/esri/core/workers/chunks/8fecd1337d84c26c692b.js +0 -1
  228. package/assets/esri/core/workers/chunks/9050dad7e4f093568026.js +0 -1
  229. package/assets/esri/core/workers/chunks/9643a9516783e8c32180.js +0 -1
  230. package/assets/esri/core/workers/chunks/9e156e135f34f9b06032.js +0 -1
  231. package/assets/esri/core/workers/chunks/a3421383e48379012c9c.js +0 -1
  232. package/assets/esri/core/workers/chunks/a91f2d1deb950f46ad09.js +0 -1
  233. package/assets/esri/core/workers/chunks/b4a1f3f3a036226d6810.js +0 -1
  234. package/assets/esri/core/workers/chunks/bd0dbad694ce5531deab.js +0 -1
  235. package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
  236. package/assets/esri/core/workers/chunks/c68c68e918c72932b247.js +0 -1
  237. package/assets/esri/core/workers/chunks/cc307d34a68e44e3cbc5.js +0 -1
  238. package/assets/esri/core/workers/chunks/d3b0117ad9232e36f785.js +0 -1
  239. package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +0 -1
  240. package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +0 -1
  241. package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
  242. package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +0 -1
  243. package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
  244. package/assets/esri/core/workers/chunks/e5aff9b10877fb04d6de.js +0 -1
  245. package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +0 -1
  246. package/assets/esri/core/workers/chunks/eaead9e927ebadcf2cc3.js +0 -1
  247. package/assets/esri/core/workers/chunks/ed517687b3728fd2eb64.js +0 -1
  248. package/assets/esri/core/workers/chunks/f41a9ceb8e49baafe9fa.js +0 -1
  249. package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +0 -1
  250. package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +0 -1
  251. package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +0 -1
@@ -1,8 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3383],{11725:(e,t,r)=>{r.d(t,{im:()=>m,m$:()=>i});var i,n,o=r(51850),a=r(49255),s=r(69720),c=r(96672),l=r(39341),d=r(35256),u=r(43616),h=r(65786);class m extends s.J{constructor(e,t){super(),this.type=c.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=l.D,this._pp0=(0,o.fA)(0,0,1),this._pp1=(0,o.fA)(0,0,0),this._parameters=new t,(0,u.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}getConfiguration(e,t,r=new d.E){return r.output=e,r.hasHighlightMixTexture=e===a.V.Highlight&&null!=t.highlightMixTexture,r}intersectDraped(e,t,r,i,n,o){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",h.Y},11955:(e,t,r)=>{r.d(t,{S:()=>s}),r(69270),r(74333).n;var i=r(20304),n=r(31821),o=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===o.sf.Blend;s!==o.sf.Mask&&s!==o.sf.MaskBlend||i.uniforms.add(r),i.code.add(n.H`
2
- void discardOrAdjustAlpha(inout vec4 color) {
3
- ${s===o.sf.Opaque?"color.a = 1.0;":`if (color.a < ${c?n.H.float(a.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,n.If)(s===o.sf.Mask,"else { color.a = 1.0; }")}`}
4
- }
5
- `)}(e,t,new i.m("textureAlphaCutoff",(e=>e.textureAlphaCutoff)))}},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>u,kb:()=>d,vt:()=>c});var i=r(34727),n=r(4341),o=r(38954),a=r(51850),s=r(32114);function c(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function l(e,t,r=c()){return(0,o.c)(r.origin,e),(0,o.d)(r.vector,t,e),r}function d(e,t){const r=(0,o.d)(s.rq.get(),t,e.origin),n=(0,o.f)(e.vector,r),a=(0,o.f)(e.vector,e.vector),c=(0,i.qE)(n/a,0,1),l=(0,o.d)(s.rq.get(),(0,o.h)(s.rq.get(),e.vector,c),r);return(0,o.f)(l,l)}function u(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,n,a){const{vector:c,origin:l}=e,d=(0,o.d)(s.rq.get(),t,l),u=(0,o.f)(c,d)/(0,o.k)(c);return(0,o.h)(a,c,(0,i.qE)(u,r,n)),(0,o.g)(a,a,e.origin)}(0,a.vt)(),(0,a.vt)(),new n.I((()=>c()))},12791:(e,t,r)=>{r.d(t,{x:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"sampler2D",i.c.Bind,((r,i)=>r.bindTexture(e,t(i))))}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.HUD_MATERIAL=12]="HUD_MATERIAL",e[e.LABEL_MATERIAL=13]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=14]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=15]="LINE_CALLOUTS_HUD_DEPTH",e[e.OVERLAY=16]="OVERLAY",e[e.DRAPED_MATERIAL=17]="DRAPED_MATERIAL",e[e.DRAPED_WATER=18]="DRAPED_WATER",e[e.VOXEL=19]="VOXEL",e[e.MAX_SLOTS=20]="MAX_SLOTS"}(i||(i={}))},14113:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),n=(r(44208),r(53966)),o=r(69270);const a=()=>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 c extends s{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new p,this.extensions=new f,this.outputs=new v}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),i=this.attributes.generateSource(e),n=this.varyings.generateSource(e),o="vertex"===e?this.vertex:this.fragment,a=o.uniforms.generateSource(),s=o.code.generateSource(),c=o.main.generateSource(t),l="vertex"===e?x:_,d=o.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${l}\n${d.join("\n")}\n${a.join("\n")}\n${i.join("\n")}\n${n.join("\n")}\n${u.join("\n")}\n${s.join("\n")}\n${c.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[o.c.Bind];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[o.c.Bind];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[o.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[o.c.Pass];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[o.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[o.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{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 a().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 d{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 h extends s{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new d(this),this.code=new u(this),this.constants=new g(this)}get builder(){return this}}class m{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]};`))}}class p{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?a().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 ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`))),t}}class f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class v{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}):a().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:v.DEFAULT_NAME,type:v.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"uvec3":i=`uvec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"uvec4":i=`uvec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const _="#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#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n#endif",x="precision highp float;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n\n invariant gl_Position;\n "},14314:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec4",i.c.Bind,((r,i)=>r.setUniform4fv(e,t(i))))}}},15581:(e,t,r)=>{r.d(t,{S:()=>x,b:()=>v,g:()=>g});var i=r(37585),n=r(48163),o=r(82048),a=r(52540),s=r(34845),c=r(77108),l=r(47286),d=r(33094),u=r(20304),h=r(31821),m=r(63761),p=r(14113);const f=16;function v(){const e=new p.N5,t=e.fragment;return e.include(o.c),e.include(s.Ir),t.include(a.E),t.uniforms.add(new d.U("radius",(e=>g(e.camera)))).code.add(h.H`vec3 sphere[16] = vec3[16](
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3383],{11725:(e,t,r)=>{r.d(t,{im:()=>m,m$:()=>i});var i,o,n=r(51850),a=r(49255),s=r(69720),c=r(96672),l=r(39341),d=r(35256),u=r(43616),h=r(65786);class m extends s.J{constructor(e,t){super(),this.type=c.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=l.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=new t,(0,u.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}getConfiguration(e,t,r=new d.E){return r.output=e,r.hasHighlightMixTexture=e===a.V.Highlight&&null!=t.highlightMixTexture,r}intersectDraped(e,t,r,i,o,n){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,o)}}(o=i||(i={}))[o.None=0]="None",o[o.Occlude=1]="Occlude",o[o.Transparent=2]="Transparent",o[o.OccludeAndTransparent=4]="OccludeAndTransparent",o[o.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",o[o.Opaque=16]="Opaque",h.Y},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>u,kb:()=>d,vt:()=>c});var i=r(34727),o=r(4341),n=r(38954),a=r(51850),s=r(32114);function c(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function l(e,t,r=c()){return(0,n.c)(r.origin,e),(0,n.d)(r.vector,t,e),r}function d(e,t){const r=(0,n.d)(s.rq.get(),t,e.origin),o=(0,n.f)(e.vector,r),a=(0,n.f)(e.vector,e.vector),c=(0,i.qE)(o/a,0,1),l=(0,n.d)(s.rq.get(),(0,n.h)(s.rq.get(),e.vector,c),r);return(0,n.f)(l,l)}function u(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,o,a){const{vector:c,origin:l}=e,d=(0,n.d)(s.rq.get(),t,l),u=(0,n.f)(c,d)/(0,n.k)(c);return(0,n.h)(a,c,(0,i.qE)(u,r,o)),(0,n.g)(a,a,e.origin)}(0,a.vt)(),(0,a.vt)(),new o.I((()=>c()))},12791:(e,t,r)=>{r.d(t,{x:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Bind,((r,i)=>r.bindTexture(e,t(i))))}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.HUD_MATERIAL=12]="HUD_MATERIAL",e[e.LABEL_MATERIAL=13]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=14]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=15]="LINE_CALLOUTS_HUD_DEPTH",e[e.OVERLAY=16]="OVERLAY",e[e.DRAPED_MATERIAL=17]="DRAPED_MATERIAL",e[e.DRAPED_WATER=18]="DRAPED_WATER",e[e.VOXEL=19]="VOXEL",e[e.MAX_SLOTS=20]="MAX_SLOTS"}(i||(i={}))},14113:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),o=(r(44208),r(53966)),n=r(69270);const a=()=>o.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 c extends s{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new p,this.extensions=new f,this.outputs=new v}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),i=this.attributes.generateSource(e),o=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,a=n.uniforms.generateSource(),s=n.code.generateSource(),c=n.main.generateSource(t),l="vertex"===e?x:_,d=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${l}\n${d.join("\n")}\n${a.join("\n")}\n${i.join("\n")}\n${o.join("\n")}\n${u.join("\n")}\n${s.join("\n")}\n${c.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return t=>{for(let o=0;o<i;++o)r[o](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o)=>{for(let n=0;n<i;++n)r[n](e,t,o)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o,n)=>{for(let a=0;a<i;++a)r[a](e,n,t,o)}}}class l{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 a().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 d{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 h extends s{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new d(this),this.code=new u(this),this.constants=new g(this)}get builder(){return this}}class m{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]};`))}}class p{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?a().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 ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`))),t}}class f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class v{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}):a().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:v.DEFAULT_NAME,type:v.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"uvec3":i=`uvec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"uvec4":i=`uvec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const _="#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#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n#endif",x="precision highp float;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n\n invariant gl_Position;\n "},14314:(e,t,r)=>{r.d(t,{I:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec4",i.c.Bind,((r,i)=>r.setUniform4fv(e,t(i))))}}},15581:(e,t,r)=>{r.d(t,{S:()=>x,b:()=>v,g:()=>g});var i=r(37585),o=r(48163),n=r(82048),a=r(52540),s=r(34845),c=r(77108),l=r(47286),d=r(33094),u=r(20304),h=r(31821),m=r(63761),p=r(14113);const f=16;function v(){const e=new p.N5,t=e.fragment;return e.include(n.c),e.include(s.Ir),t.include(a.E),t.uniforms.add(new d.U("radius",(e=>g(e.camera)))).code.add(h.H`vec3 sphere[16] = vec3[16](
6
2
  vec3(0.186937, 0.0, 0.0),
7
3
  vec3(0.700542, 0.0, 0.0),
8
4
  vec3(-0.864858, -0.481795, -0.111713),
@@ -82,7 +78,7 @@ return fallOffFunction(vv, vn, 0.1);
82
78
  // Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
83
79
  A = (pow(A, 0.2) + 1.2 * A * A * A * A) / 2.2;
84
80
 
85
- fragOcclusion = A;`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,n.vt)(),x=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>T}),r(44208);var i=r(53966),n=r(34727),o=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(240),p=r(71351),f=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function x(e,t=_()){return T(e.origin,e.basis1,e.basis2,t)}function T(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),b(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,y(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(y(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function b(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function A(e,t,r){e!==r&&x(e,r);const i=(0,c.h)(v.rq.get(),y(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function E(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&N(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let o=Number.POSITIVE_INFINITY;for(const a of U){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(v.rq.get(),t.origin,l),i=Math.abs((0,n.XM)((0,c.f)(t.direction,e)));i<o&&(o=i,(0,c.c)(r,l))}}return o===Number.POSITIVE_INFINITY?w(e,t,r):r}function w(e,t,r){if(S(e,t,r))return r;const i=F.get(),n=F.get();D(e,t,i,n);let o=Number.POSITIVE_INFINITY;for(const a of U){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.gv)(i,s,l)){const e=(0,p.kb)(t,l);if(!(0,m.Tj)(n,l))continue;e<o&&(o=e,(0,c.c)(r,l))}}return R(e,t.origin)<o&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),n=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),o=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,c.d)(r,(0,c.g)(v.rq.get(),n,o),e.origin),r}function I(e,t,r){const{origin:i,basis1:n,basis2:o}=e,a=(0,c.d)(v.rq.get(),t,i),s=(0,f.gr)(n,a),l=(0,f.gr)(o,a),d=(0,f.gr)(y(e),a);return(0,c.i)(r,s,l,d)}function R(e,t){const r=I(e,t,v.rq.get()),{basis1:i,basis2:n}=e,o=(0,c.l)(i),a=(0,c.l)(n),s=Math.max(Math.abs(r[0])-o,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,f.gr)(y(e),t)-r}function y(e){return(0,m.Qj)(e.plane)}function N(e,t){const r=(0,c.d)(v.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),n=(0,c.k)(e.basis2),o=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-o-i<0&&o-i<0&&-a-n<0&&a-n<0}function P(e,t){const r=B.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:n,origin:o}=e,a=(0,c.h)(v.rq.get(),i,t.origin[0]),s=(0,c.h)(v.rq.get(),n,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,o);const l=(0,c.h)(v.rq.get(),i,t.direction[0]),d=(0,c.h)(v.rq.get(),n,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function D(e,t,r,i){const n=y(e);(0,m.mR)(n,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),n,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new o.I(m.vt),B=new o.I(h.vt),G=(0,l.vt)(),z=new o.I((()=>_())),U=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,y(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:w,closestPointOnSilhouette:M,copy:x,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(R(e,t))},distance2:R,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of U){const n=L(e,i,B.get()),o=(0,h.kb)(n,t);o>r&&(r=o)}return Math.sqrt(r)},elevate:A,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&N(e,t)},fromAABoundingRect:E,fromValues:T,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,o]=e.origin;return(0,d.fA)(n-r,o-i,n+r,o+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(v.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:y,projectPoint:C,projectPointLocal:I,rotate:function(e,t,r,i){return e!==i&&x(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),b(i),i},setAltitudeAt:function(e,t,r,i){const n=O(e,t),o=(0,c.h)(G,y(e),r-n);return(0,c.g)(i,t,o),i},setExtent:function(e,t,r){return E(t,r),A(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&x(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:b,wrap:function(e,t,r){const i=z.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),b(i),i}},Symbol.toStringTag,{value:"Module"}))},20304:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,n)=>r.setUniform1f(e,t(i,n))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>p,Nz:()=>x,NB:()=>f,S7:()=>_});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(23205),c=r(40710),l=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}function p(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",((e,t)=>(0,o.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new c.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,o.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,n.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function x(e){e.uniforms.add(new l.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function n(e){const t=e.fragment.code;t.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG)
81
+ fragOcclusion = A;`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,o.vt)(),x=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>T}),r(44208);var i=r(53966),o=r(34727),n=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(240),p=r(71351),f=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function x(e,t=_()){return T(e.origin,e.basis1,e.basis2,t)}function T(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),b(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,y(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(y(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function b(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function A(e,t,r){e!==r&&x(e,r);const i=(0,c.h)(v.rq.get(),y(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function E(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&N(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let n=Number.POSITIVE_INFINITY;for(const a of U){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(v.rq.get(),t.origin,l),i=Math.abs((0,o.XM)((0,c.f)(t.direction,e)));i<n&&(n=i,(0,c.c)(r,l))}}return n===Number.POSITIVE_INFINITY?w(e,t,r):r}function w(e,t,r){if(S(e,t,r))return r;const i=F.get(),o=F.get();D(e,t,i,o);let n=Number.POSITIVE_INFINITY;for(const a of U){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.gv)(i,s,l)){const e=(0,p.kb)(t,l);if(!(0,m.Tj)(o,l))continue;e<n&&(n=e,(0,c.c)(r,l))}}return R(e,t.origin)<n&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),o=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),n=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,c.d)(r,(0,c.g)(v.rq.get(),o,n),e.origin),r}function I(e,t,r){const{origin:i,basis1:o,basis2:n}=e,a=(0,c.d)(v.rq.get(),t,i),s=(0,f.gr)(o,a),l=(0,f.gr)(n,a),d=(0,f.gr)(y(e),a);return(0,c.i)(r,s,l,d)}function R(e,t){const r=I(e,t,v.rq.get()),{basis1:i,basis2:o}=e,n=(0,c.l)(i),a=(0,c.l)(o),s=Math.max(Math.abs(r[0])-n,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,f.gr)(y(e),t)-r}function y(e){return(0,m.Qj)(e.plane)}function N(e,t){const r=(0,c.d)(v.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),o=(0,c.k)(e.basis2),n=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-n-i<0&&n-i<0&&-a-o<0&&a-o<0}function P(e,t){const r=B.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:o,origin:n}=e,a=(0,c.h)(v.rq.get(),i,t.origin[0]),s=(0,c.h)(v.rq.get(),o,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,n);const l=(0,c.h)(v.rq.get(),i,t.direction[0]),d=(0,c.h)(v.rq.get(),o,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function D(e,t,r,i){const o=y(e);(0,m.mR)(o,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),o,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new n.I(m.vt),B=new n.I(h.vt),G=(0,l.vt)(),z=new n.I((()=>_())),U=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,y(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:w,closestPointOnSilhouette:M,copy:x,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(R(e,t))},distance2:R,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of U){const o=L(e,i,B.get()),n=(0,h.kb)(o,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:A,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&N(e,t)},fromAABoundingRect:E,fromValues:T,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[o,n]=e.origin;return(0,d.fA)(o-r,n-i,o+r,n+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(v.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:y,projectPoint:C,projectPointLocal:I,rotate:function(e,t,r,i){return e!==i&&x(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),b(i),i},setAltitudeAt:function(e,t,r,i){const o=O(e,t),n=(0,c.h)(G,y(e),r-o);return(0,c.g)(i,t,n),i},setExtent:function(e,t,r){return E(t,r),A(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&x(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:b,wrap:function(e,t,r){const i=z.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),b(i),i}},Symbol.toStringTag,{value:"Module"}))},20304:(e,t,r)=>{r.d(t,{m:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>p,Nz:()=>x,NB:()=>f,S7:()=>_});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(23205),c=r(40710),l=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}function p(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",((e,t)=>(0,n.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new c.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,n.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,o.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function x(e){e.uniforms.add(new l.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function o(e){const t=e.fragment.code;t.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG)
86
82
  {
87
83
  return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
88
84
  }`),t.add(i.H`float integratedRadiance(float cosTheta2, float roughness)
@@ -95,7 +91,7 @@ float intRadTheta = integratedRadiance(cosTheta2, roughness);
95
91
  float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
96
92
  float sky = 2.0 - ground;
97
93
  return (ground * ambientGround + sky * ambientSky) * 0.5;
98
- }`)}var o=r(59469),a=r(89786);function s(e,t){const r=e.fragment.code;e.include(a.p),t.pbrMode!==o.A9.Normal&&t.pbrMode!==o.A9.Schematic&&t.pbrMode!==o.A9.Simplified&&t.pbrMode!==o.A9.TerrainWithWater||(r.add(i.H`float normalDistribution(float NdotH, float roughness)
94
+ }`)}var n=r(59469),a=r(89786);function s(e,t){const r=e.fragment.code;e.include(a.p),t.pbrMode!==n.A9.Normal&&t.pbrMode!==n.A9.Schematic&&t.pbrMode!==n.A9.Simplified&&t.pbrMode!==n.A9.TerrainWithWater||(r.add(i.H`float normalDistribution(float NdotH, float roughness)
99
95
  {
100
96
  float a = NdotH * roughness;
101
97
  float b = roughness / (1.0 - NdotH * NdotH + a * a);
@@ -107,7 +103,7 @@ vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
107
103
  vec4 r = roughness * c0 + c1;
108
104
  float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
109
105
  return c2 * a004 + r.zw;
110
- }`)),t.pbrMode!==o.A9.Normal&&t.pbrMode!==o.A9.Schematic||(e.include(n),r.add(i.H`struct PBRShadingInfo
106
+ }`)),t.pbrMode!==n.A9.Normal&&t.pbrMode!==n.A9.Schematic||(e.include(o),r.add(i.H`struct PBRShadingInfo
111
107
  {
112
108
  float NdotV;
113
109
  float LdotH;
@@ -144,13 +140,14 @@ outColor.x = gamutMapChanel(inColor.x, p) ;
144
140
  outColor.y = gamutMapChanel(inColor.y, p) ;
145
141
  outColor.z = gamutMapChanel(inColor.z, p) ;
146
142
  return outColor;
147
- }`))}},22911:(e,t,r)=>{r.d(t,{NL:()=>m,ZX:()=>i});var i,n,o=r(49255),a=r(99208),s=r(40710),c=r(33079),l=r(31821),d=r(15976),u=r(63761),h=(r(25634),r(69270));function m(e,t){if(!(0,o.RN)(t.output))return;const{emissionSource:r,hasEmissiveTextureTransform:n,bindType:m}=t,p=r===i.Texture;p&&(e.include(a.r,t),e.fragment.uniforms.add(m===h.c.Pass?new u.N("texEmission",(e=>e.textureEmissive)):new d.o("texEmission",(e=>e.textureEmissive))));const f=r===i.Value||p;f&&e.fragment.uniforms.add(m===h.c.Pass?new c.t("emissionFactor",(e=>e.emissiveFactor)):new s.W("emissionFactor",(e=>e.emissiveFactor))),e.fragment.code.add(l.H`
148
- vec4 getEmissions() {
149
- vec4 emissions = ${f?"vec4(emissionFactor, 1.0)":"vec4(0.0)"};
150
- ${(0,l.If)(p,`emissions *= textureLookup(texEmission, ${n?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)}
143
+ }`))}},22911:(e,t,r)=>{r.d(t,{NL:()=>f,ZX:()=>i});var i,o,n=r(49255),a=r(99208),s=r(40710),c=r(33079),l=r(28421),d=r(20304),u=r(31821),h=r(15976),m=r(63761),p=(r(25634),r(69270));function f(e,t){if(!(0,n.RN)(t.output))return;const{emissionSource:r,hasEmissiveTextureTransform:o,bindType:f}=t,v=r===i.Texture;v&&(e.include(a.r,t),e.fragment.uniforms.add(f===p.c.Pass?new m.N("texEmission",(e=>e.textureEmissive)):new h.o("texEmission",(e=>e.textureEmissive))));const g=r===i.EmissiveColor||v;g&&e.fragment.uniforms.add(f===p.c.Pass?new c.t("emissiveBaseColor",(e=>e.emissiveBaseColor)):new s.W("emissiveBaseColor",(e=>e.emissiveBaseColor)));const _=r!==i.None;_&&e.fragment.uniforms.add(f===p.c.Pass?new d.m("emissiveStrength",(e=>e.emissiveStrength)):new l.J("emissiveStrength",(e=>e.emissiveStrength)));const x=r===i.SymbolColor;e.fragment.code.add(u.H`
144
+ vec4 getEmissions(vec3 symbolColor) {
145
+ vec4 emissions = ${g?"vec4(emissiveBaseColor, 1.0)":x?"vec4(symbolColor, 1.0)":"vec4(0.0)"};
146
+ ${(0,u.If)(v,`emissions *= textureLookup(texEmission, ${o?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)}
147
+ ${(0,u.If)(_,"emissions *= emissiveStrength;")}
151
148
  return emissions;
152
149
  }
153
- `)}(n=i||(i={}))[n.None=0]="None",n[n.Value=1]="Value",n[n.Texture=2]="Texture",n[n.COUNT=3]="COUNT"},23205:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec3",i.c.Bind,((r,i)=>r.setUniform3fv(e,t(i))))}}},25618:(e,t,r)=>{r.d(t,{Bz:()=>v,G:()=>f}),r(9093),r(51850);var i=r(52540),n=r(34845),o=r(80730),a=r(14314),s=r(31821),c=r(35818),l=r(69270),d=r(74333);class u extends d.n{constructor(e,t,r){super(e,"mat4",l.c.Draw,((r,i,n,o)=>r.setUniformMatrix4fv(e,t(i,n,o))),r)}}class h extends d.n{constructor(e,t,r){super(e,"mat4",l.c.Pass,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))),r)}}var m=r(12791),p=r(65786);function f(e,t){t.receiveShadows&&(e.fragment.uniforms.add(new h("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),g(e,t))}function v(e,t){t.receiveShadows&&(e.fragment.uniforms.add(new u("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),g(e,t))}function g(e,t){const{fragment:r}=e;r.include(o.U);const l=t.worldPositionFromDepthMap??!1;l&&(r.include(i.E),e.include(n.Ir)),r.uniforms.add(new m.x("shadowMap",(e=>e.shadowMap.depthTexture)),new c.W("numCascades",(e=>e.shadowMap.numCascades)),new a.I("cascadeDistances",(e=>e.shadowMap.cascadeDistances))),r.code.add(s.H`
150
+ `)}(o=i||(i={}))[o.None=0]="None",o[o.SymbolColor=1]="SymbolColor",o[o.EmissiveColor=2]="EmissiveColor",o[o.Texture=3]="Texture",o[o.COUNT=4]="COUNT"},23205:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec3",i.c.Bind,((r,i)=>r.setUniform3fv(e,t(i))))}}},25618:(e,t,r)=>{r.d(t,{Bz:()=>v,G:()=>f}),r(9093),r(51850);var i=r(52540),o=r(34845),n=r(80730),a=r(14314),s=r(31821),c=r(35818),l=r(69270),d=r(74333);class u extends d.n{constructor(e,t,r){super(e,"mat4",l.c.Draw,((r,i,o,n)=>r.setUniformMatrix4fv(e,t(i,o,n))),r)}}class h extends d.n{constructor(e,t,r){super(e,"mat4",l.c.Pass,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))),r)}}var m=r(12791),p=r(65786);function f(e,t){t.receiveShadows&&(e.fragment.uniforms.add(new h("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),g(e,t))}function v(e,t){t.receiveShadows&&(e.fragment.uniforms.add(new u("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),g(e,t))}function g(e,t){const{fragment:r}=e;r.include(n.U);const l=t.worldPositionFromDepthMap??!1;l&&(r.include(i.E),e.include(o.Ir)),r.uniforms.add(new m.x("shadowMap",(e=>e.shadowMap.depthTexture)),new c.W("numCascades",(e=>e.shadowMap.numCascades)),new a.I("cascadeDistances",(e=>e.shadowMap.cascadeDistances))),r.code.add(s.H`
154
151
  // Private
155
152
 
156
153
  int chooseCascade(float depth, out mat4 mat) {
@@ -274,20 +271,20 @@ return outColor;
274
271
 
275
272
  return filterShadow(uvzShadow, shadowMap);
276
273
  }
277
- `)}p.Y,p.Y},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),n=r(74887),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return o.Am.LOADED}}var s=r(65786);class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new d(this._texture?.glTexture??null,this._textureNormal?.glTexture??null,this._textureEmissive?.glTexture??null,this._textureOcclusion?.glTexture??null,this._textureMetallicRoughness?.glTexture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._acquire(e,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,n.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends s.Y{constructor(e=null){super(),this.textureEmissive=e}}class d extends l{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),n=r(69622),o=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),s=(0,i._)([(0,a.$)("esri.views.3d.support.debugFlags")],s);const c=new s},27950:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(66104),n=r(63365),o=r(31821);function a(e){e.include(n.a),e.code.add(o.H`
274
+ `)}p.Y,p.Y},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),o=r(74887),n=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return n.Am.LOADED}}var s=r(65786);class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?n.Am.LOADED:n.Am.LOADING}get textureBindParameters(){return new d(this._texture?.glTexture??null,this._textureNormal?.glTexture??null,this._textureEmissive?.glTexture??null,this._textureOcclusion?.glTexture??null,this._textureMetallicRoughness?.glTexture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._acquire(e,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,o.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends s.Y{constructor(e=null){super(),this.textureEmissive=e}}class d extends l{constructor(e,t,r,i,o,n,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=o,this.scale=n,this.normalTextureTransformMatrix=a}}},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),o=r(69622),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends o.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,n.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),s=(0,i._)([(0,a.$)("esri.views.3d.support.debugFlags")],s);const c=new s},27950:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(66104),o=r(63365),n=r(31821);function a(e){e.include(o.a),e.code.add(n.H`
278
275
  vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
279
276
  // workaround for artifacts in macOS using Intel Iris Pro
280
277
  // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
281
278
  vec3 internalMixed = internalColor * textureColor;
282
279
  vec3 allMixed = internalMixed * externalColor;
283
280
 
284
- if (mode == ${o.H.int(i.k5.Multiply)}) {
281
+ if (mode == ${n.H.int(i.k5.Multiply)}) {
285
282
  return allMixed;
286
283
  }
287
- if (mode == ${o.H.int(i.k5.Ignore)}) {
284
+ if (mode == ${n.H.int(i.k5.Ignore)}) {
288
285
  return internalMixed;
289
286
  }
290
- if (mode == ${o.H.int(i.k5.Replace)}) {
287
+ if (mode == ${n.H.int(i.k5.Replace)}) {
291
288
  return externalColor;
292
289
  }
293
290
 
@@ -304,20 +301,20 @@ return outColor;
304
301
  float internalMixed = internalOpacity * textureOpacity;
305
302
  float allMixed = internalMixed * externalOpacity;
306
303
 
307
- if (mode == ${o.H.int(i.k5.Ignore)}) {
304
+ if (mode == ${n.H.int(i.k5.Ignore)}) {
308
305
  return internalMixed;
309
306
  }
310
- if (mode == ${o.H.int(i.k5.Replace)}) {
307
+ if (mode == ${n.H.int(i.k5.Replace)}) {
311
308
  return externalOpacity;
312
309
  }
313
310
 
314
311
  // multiply or tint (or something invalid)
315
312
  return allMixed;
316
313
  }
317
- `)}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>z});var i=r(91829),n=r(46686),o=r(32680),a=r(49255),s=r(76591),c=r(76597),l=r(60864),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(54849),x=r(74081),T=r(98619),b=r(62602),A=r(22393),E=r(59469),S=r(25618),M=r(96598),w=r(51406),C=r(42398),I=r(11955),R=r(27950),O=r(20693),y=r(33079),N=r(71988),P=r(20304),L=r(31821),D=r(63761),H=r(46540),F=r(60517),B=r(14113),G=r(49788);function z(e){const t=new B.N5,{attributes:r,vertex:z,fragment:U,varyings:V}=t,{output:W,normalType:j,offsetBackfaces:k,instancedColor:$,spherical:q,receiveShadows:Y,snowCover:X,pbrMode:Z,textureAlphaPremultiplied:J,instancedDoublePrecision:K,hasVertexColors:Q,hasVertexTangents:ee,hasColorTexture:te,hasNormalTexture:re,hasNormalTextureTransform:ie,hasColorTextureTransform:ne}=e;if((0,O.NB)(z,e),r.add(H.r.POSITION,"vec3"),V.add("vpos","vec3",{invariant:!0}),t.include(C.A,e),t.include(l.B,e),t.include(f.G,e),t.include(w.q2,e),!(0,a.RN)(W))return t.include(v.E,e),t;t.include(w.Sx,e),t.include(w.MU,e),t.include(w.O1,e),t.include(w.QM,e),(0,O.yu)(z,e),t.include(d.Y,e),t.include(c.d,e);const oe=j===d.W.Attribute||j===d.W.Compressed;return oe&&k&&t.include(o.M),t.include(g.W,e),t.include(p.Mh,e),$&&t.attributes.add(H.r.INSTANCECOLOR,"vec4"),V.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(n.oD,e),t.include(u.K,e),t.include(m.c,e),z.uniforms.add(new N.E("externalColor",(e=>"ignore"===e.colorMixMode?i.Un:e.externalColor))),V.add("vcolorExt","vec4"),t.include(M.Z,e),z.main.add(L.H`
314
+ `)}},28421:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Draw,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>z});var i=r(91829),o=r(46686),n=r(32680),a=r(49255),s=r(76591),c=r(76597),l=r(60864),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(54849),x=r(74081),T=r(98619),b=r(62602),A=r(22393),E=r(59469),S=r(25618),M=r(96598),w=r(51406),C=r(42398),I=r(58614),R=r(27950),O=r(20693),y=r(33079),N=r(71988),P=r(20304),L=r(31821),D=r(63761),H=r(46540),F=r(60517),B=r(14113),G=r(49788);function z(e){const t=new B.N5,{attributes:r,vertex:z,fragment:U,varyings:V}=t,{output:W,normalType:j,offsetBackfaces:k,instancedColor:Y,spherical:$,receiveShadows:q,snowCover:X,pbrMode:Z,textureAlphaPremultiplied:J,instancedDoublePrecision:K,hasVertexColors:Q,hasVertexTangents:ee,hasColorTexture:te,hasNormalTexture:re,hasNormalTextureTransform:ie,hasColorTextureTransform:oe}=e;if((0,O.NB)(z,e),r.add(H.r.POSITION,"vec3"),V.add("vpos","vec3",{invariant:!0}),t.include(C.A,e),t.include(l.B,e),t.include(f.G,e),t.include(w.q2,e),!(0,a.RN)(W))return t.include(v.E,e),t;t.include(w.Sx,e),t.include(w.MU,e),t.include(w.O1,e),t.include(w.QM,e),(0,O.yu)(z,e),t.include(d.Y,e),t.include(c.d,e);const ne=j===d.W.Attribute||j===d.W.Compressed;return ne&&k&&t.include(n.M),t.include(g.W,e),t.include(p.Mh,e),Y&&t.attributes.add(H.r.INSTANCECOLOR,"vec4"),V.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(o.oD,e),t.include(u.K,e),t.include(m.c,e),z.uniforms.add(new N.E("externalColor",(e=>"ignore"===e.colorMixMode?i.Un:e.externalColor))),V.add("vcolorExt","vec4"),t.include(M.Z,e),z.main.add(L.H`
318
315
  forwardNormalizedVertexColor();
319
316
  vcolorExt = externalColor;
320
- ${(0,L.If)($,"vcolorExt *= instanceColor * 0.003921568627451;")}
317
+ ${(0,L.If)(Y,"vcolorExt *= instanceColor * 0.003921568627451;")}
321
318
  vcolorExt *= vvColor();
322
319
  vcolorExt *= getSymbolColor();
323
320
  forwardColorMixMode();
@@ -325,11 +322,11 @@ return outColor;
325
322
  vpos = getVertexInLocalOriginSpace();
326
323
  vPositionLocal = vpos - view[3].xyz;
327
324
  vpos = subtractOrigin(vpos);
328
- ${(0,L.If)(oe,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
325
+ ${(0,L.If)(ne,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
329
326
  vpos = addVerticalOffset(vpos, localOrigin);
330
327
  ${(0,L.If)(ee,"vTangent = dpTransformVertexTangent(tangent);")}
331
328
  gl_Position = transformPosition(proj, view, vpos);
332
- ${(0,L.If)(oe&&k,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
329
+ ${(0,L.If)(ne&&k,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
333
330
 
334
331
  forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
335
332
  forwardLinearDepth();
@@ -347,7 +344,7 @@ return outColor;
347
344
  discardBySlice(vpos);
348
345
  discardByTerrainDepth();
349
346
  ${te?L.H`
350
- vec4 texColor = texture(tex, ${ne?"colorUV":"vuv0"});
347
+ vec4 texColor = texture(tex, ${oe?"colorUV":"vuv0"});
351
348
  ${(0,L.If)(J,"texColor.rgb /= texColor.a;")}
352
349
  discardOrAdjustAlpha(texColor);`:L.H`vec4 texColor = vec4(1.0);`}
353
350
  shadingParams.viewDirection = normalize(vpos - cameraPosition);
@@ -359,13 +356,13 @@ return outColor;
359
356
  vec3 posWorld = vpos + localOrigin;
360
357
 
361
358
  float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
362
- float shadow = ${Y?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,L.If)(q,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
359
+ float shadow = ${q?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,L.If)($,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
363
360
 
364
361
  vec3 matColor = max(ambient, diffuse);
365
362
  vec3 albedo = mixExternalColor(${(0,L.If)(Q,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
366
363
  float opacity_ = layerOpacity * mixExternalOpacity(${(0,L.If)(Q,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, int(colorMixMode));
367
364
  ${re?`mat3 tangentSpace = computeTangentSpace(${ee?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${ie?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
368
- vec3 normalGround = ${q?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
365
+ vec3 normalGround = ${$?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
369
366
 
370
367
  ${(0,L.If)(X,L.H`
371
368
  float snow = smoothstep(0.5, 0.55, dot(normal, normalGround));
@@ -378,18 +375,18 @@ return outColor;
378
375
  ${Z===E.A9.Normal||Z===E.A9.Schematic?L.H`
379
376
  float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
380
377
  ${(0,L.If)(X,L.H`mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);`)}
381
- vec4 emission = ${X?"mix(getEmissions(), vec4(0.0), snow)":"getEmissions()"};
378
+ vec4 emission = ${X?"mix(getEmissions(albedo), vec4(0.0), snow)":"getEmissions(albedo)"};
382
379
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:L.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
383
380
  vec4 finalColor = vec4(shadedColor, opacity_);
384
- outputColorHighlightOID(finalColor, vpos);
385
- `),t}const U=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),n=r(38954),o=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:l}=r;(0,a.vA)(l.length%this._numIndexPerPrimitive==0),(0,a.vA)(l.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*l[this._numIndexPerPrimitive*e[0]];c.clear(),c.push(u);const h=(0,o.fA)(i[u],i[u+1],i[u+2]),m=(0,o.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*l[r+e],c.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const p=(0,n.m)((0,o.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let f=this.radius*this.radius;for(let e=0;e<c.length;++e){u=c.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],n=i[u+2]-p[2],o=t*t+r*r+n*n;if(o<=f)continue;const a=Math.sqrt(o),s=.5*(a-this.radius);this.radius=this.radius+s,f=this.radius*this.radius;const l=s/a;p[0]+=t*l,p[1]+=r*l,p[2]+=n*l}this.center=p,c.clear()}getChildren(){if(this._children||(0,n.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,n.m)((0,o.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:c,indices:l}=this.position;for(let n=0;n<t;++n){let t=0;const o=this._numIndexPerPrimitive*this.primitiveIndices[n];let s=c*l[o],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=c*l[o+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[n]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){c.prune()}}const c=new i.A({deallocator:null})},30164:(e,t,r)=>{r.d(t,{g:()=>T});var i,n,o=r(49186),a=(r(44208),r(53966)),s=r(97768),c=r(74887),l=r(94656),d=r(63907);(n=i||(i={}))[n.Texture=0]="Texture",n[n.Renderbuffer=1]="Renderbuffer";var u=r(67171);function h(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&a.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function m(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!m(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function f(e){return e===d.Ap.TEXTURE_3D||e===d.Ap.TEXTURE_2D_ARRAY}function v(e,t,r,i=1){let n=Math.max(t,r);return e===d.Ap.TEXTURE_3D&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function g(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case d.ld.FLOAT:switch(e.pixelFormat){case d.Ab.RGBA:return d.H0.RGBA32F;case d.Ab.RGB:return d.H0.RGB32F;default:throw new o.A("texture:unknown-format","Unable to derive format")}case d.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case d.Ab.RGBA:return d.H0.RGBA8;case d.Ab.RGB:return d.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=t===d.j7.DEPTH_STENCIL?d.iE.DEPTH24_STENCIL8:t===d.j7.DEPTH_COMPONENT?d.SB.DEPTH_COMPONENT24:t,e.internalFormat}class _ extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case d.H0.R16F:case d.H0.R32F:case d.H0.R8_SNORM:case d.H0.R8:this.pixelFormat=d.Ab.RED;break;case d.H0.R8I:case d.H0.R8UI:case d.H0.R16I:case d.H0.R16UI:case d.H0.R32I:case d.H0.R32UI:this.pixelFormat=d.Ab.RED_INTEGER}}static validate(e,t){return new _(e,t)}}const x=()=>a.A.getLogger("esri/views/webgl/Texture");let T=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=i.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=_.validate(e,t);if(!r)throw new o.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===d.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,u.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(d.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new o.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===d.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e,t){this._descriptor.compressionHandle=e,this._descriptor.compressionCallback=t}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(e){this.abortCompression(),!m(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in d.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),!m(e)&&this._descriptor.compressionHandle&&this._compressOnWorker(e)}updateData(t,r,i,n,a,s,c=0){s||x().error("An attempt to use uninitialized data!"),this._glName||x().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=g(l);const{context:d,pixelFormat:u,dataType:h,target:f,isImmutable:v}=l;if(v&&!this._wasImmutablyAllocated)throw new o.A("texture:uninitialized","Cannot update immutable texture before allocation!");const _=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+n>l.width||i+a>l.height)&&x().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=d;c&&(n&&a||x().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,c)),p(s)?T.texSubImage2D(f,t,r,i,n,a,u,h,s):m(s)?T.compressedTexSubImage2D(f,t,r,i,n,a,l.internalFormat,s.levels[t]):T.texSubImage2D(f,t,r,i,n,a,u,h,s),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),d.bindTexture(_,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,n,a,s,c,l){l||x().error("An attempt to use uninitialized data!"),this._glName||x().error("An attempt to update an uninitialized texture!");const d=this._descriptor;d.internalFormat=g(d);const{context:u,pixelFormat:h,dataType:p,isImmutable:v,target:_}=d;if(v&&!this._wasImmutablyAllocated)throw new o.A("texture:uninitialized","Cannot update immutable texture before allocation!");f(_)||x().warn("Attempting to set 3D texture data on a non-3D texture");const T=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||n<0||r+a>d.width||i+s>d.height||n+c>d.depth)&&x().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:b}=u;if(m(l))l=l.levels[t],b.compressedTexSubImage3D(_,t,r,i,n,a,s,c,d.internalFormat,l);else{const e=l;b.texSubImage3D(_,t,r,i,n,a,s,c,h,p,e)}u.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new o.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,h(t)}t.samplingMode===d.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=d.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===d.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=d.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new o.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,h(e)}e.samplingMode===d.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=d.Cj.LINEAR):e.samplingMode===d.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=d.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,h(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=(0,s.DC)(this._compressionAbortController))}_setData(t,r){const i=this._descriptor,n=i.context?.gl;if(!n)return;(0,l.Y2)(n),this._glName||(this._glName=n.createTexture(),i.context.instanceCounter.increment(d.vt.Texture,this)),h(i);const a=i.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);i.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,l.Y2)(n);const s=r??i.target,c=f(s);if(p(t))this._setDataFromTexImageSource(t,s);else{const{width:e,height:r,depth:a}=i;if(null==e||null==r)throw new o.A("texture:missing-size","Width and height must be specified!");if(c&&null==a)throw new o.A("texture:missing-depth","Depth must be specified!");if(i.internalFormat=g(i),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,i.internalFormat,i.hasMipmap,e,r,a),m(t)){if(!(i.internalFormat in d.CQ))throw new o.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,i.internalFormat,s)}else this._texImage(s,0,i.internalFormat,e,r,a,t),(0,l.Y2)(n),i.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,l.Y2)(n),i.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=d.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=d.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;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=g(i);const n=f(t),{width:o,height:a,depth:s}=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=a),n&&i.depth,n&&(i.depth=s),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,a,s),this._texImage(t,0,i.internalFormat,o,a,s,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:a}=i,s=e.levels,c=v(r,n,o,a),l=Math.min(c,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,d.H3.MAX_LEVEL,l),this._forEachMipmapLevel(((e,i,n,o)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,n,o,a)}),l)}_texStorage(e,t,r,i,n,a){const{gl:s}=this._descriptor.context;if(!(c=t,c in d.H0||function(e){return e in d.SB}(t)||function(e){return e in d.iE}(t)))throw new o.A("texture:missing-format","Immutable textures must have a sized internal format");var c;if(!this._descriptor.isImmutable)return;const l=r?v(e,i,n,a):1;if(f(e)){if(null==a)throw new o.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,i,n,a)}else s.texStorage2D(e,l,t,i,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,n,a,s){const c=this._descriptor.context.gl,l=f(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(l){if(null==a)throw new o.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,i,n,a,u,h,r)}else c.texSubImage2D(e,t,0,0,i,n,u,h,r)}}else{const d=s;if(l){if(null==a)throw new o.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,i,n,a,0,u,h,d)}else c.texImage2D(e,t,r,i,n,0,u,h,d)}}_compressedTexImage(e,t,r,i,n,a,s){const c=this._descriptor.context.gl,l=f(e);if(this._descriptor.isImmutable){if(null!=s)if(l){if(null==a)throw new o.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,i,n,a,r,s)}else c.compressedTexSubImage2D(e,t,0,0,i,n,r,s)}else if(l){if(null==a)throw new o.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,i,n,a,0,s)}else c.compressedTexImage2D(e,t,r,i,n,0,s)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const r=!!this._descriptor.context.capabilities.compressedTextureETC,i=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(r||i){const n=new AbortController;this._compressionAbortController=n;const o=this._descriptor.compressionHandle;o.increment();const a=this._descriptor.compressionCallback,s={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!r,hasS3TC:!!i};e.compressionWorkerHandle.invoke(s,this._compressionAbortController.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),a?.()),n===this._compressionAbortController&&(this._compressionAbortController=null),o.decrement()})).catch((e=>{(0,c.zf)(e)||n!==this._compressionAbortController||(this._compressionAbortController=null),o.decrement()}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:n,hasMipmap:a,target:s}=this._descriptor;const c=s===d.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==n)throw new o.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let o=0;e(o,r,i,n),a&&(1!==r||1!==i||c&&1!==n)&&!(o>=t);++o)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;r===d.Cj.LINEAR_MIPMAP_NEAREST||r===d.Cj.LINEAR_MIPMAP_LINEAR?(r=d.Cj.LINEAR,e.hasMipmap||(i=d.Cj.LINEAR)):r!==d.Cj.NEAREST_MIPMAP_NEAREST&&r!==d.Cj.NEAREST_MIPMAP_LINEAR||(r=d.Cj.NEAREST,e.hasMipmap||(i=d.Cj.NEAREST)),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))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},32680:(e,t,r)=>{r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
381
+ outputColorHighlightOID(finalColor, vpos, albedo);
382
+ `),t}const U=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),o=r(38954),n=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:l}=r;(0,a.vA)(l.length%this._numIndexPerPrimitive==0),(0,a.vA)(l.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*l[this._numIndexPerPrimitive*e[0]];c.clear(),c.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*l[r+e],c.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const p=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let f=this.radius*this.radius;for(let e=0;e<c.length;++e){u=c.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],o=i[u+2]-p[2],n=t*t+r*r+o*o;if(n<=f)continue;const a=Math.sqrt(n),s=.5*(a-this.radius);this.radius=this.radius+s,f=this.radius*this.radius;const l=s/a;p[0]+=t*l,p[1]+=r*l,p[2]+=o*l}this.center=p,c.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:c,indices:l}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=c*l[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=c*l[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){c.prune()}}const c=new i.A({deallocator:null})},32680:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(31821);function o(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
386
383
  vec3 camToVert = posWorld - camPosWorld;
387
384
  bool isBackface = dot(camToVert, normalWorld) > 0.0;
388
385
  if (isBackface) {
389
386
  posClip.z += 0.0000003 * posClip.w;
390
387
  }
391
388
  return posClip;
392
- }`)}},32976:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"bool",i.c.Bind,((r,i)=>r.setUniform1b(e,t(i))))}}},33524:(e,t,r)=>{r.d(t,{K_:()=>p,Yf:()=>l,aB:()=>m,ez:()=>c,m6:()=>f,xt:()=>u,z5:()=>d});var i=r(49255),n=r(59643),o=r(63907),a=r(90644);const s=(0,a.p3)(o.dn.ONE,o.dn.ZERO,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA);function c(e){return e===n.Y.FrontFace?null:s}function l(e){switch(e){case n.Y.NONE:return a.T8;case n.Y.ColorAlpha:return s;case n.Y.FrontFace:case n.Y.COUNT:return null}}function d(e){if(e.draped)return null;switch(e.oitPass){case n.Y.NONE:case n.Y.FrontFace:return e.writeDepth?a.Uy:null;case n.Y.ColorAlpha:case n.Y.COUNT:return null}}const u=5e5,h={factor:-1,units:-2};function m(e){return e?h:null}function p(e,t=o.MT.LESS){return e===n.Y.NONE||e===n.Y.FrontFace?t:o.MT.LEQUAL}function f(e,t){const r=(0,i.LG)(t);return e===n.Y.ColorAlpha?r?{buffers:[o.r6,o.yI,o.Fq]}:{buffers:[o.r6,o.yI]}:r?{buffers:[o.r6,o.yI]}:null}},33752:(e,t,r)=>{r.d(t,{EM:()=>g,dO:()=>v,em:()=>f});var i=r(29242),n=r(9093),o=r(51850),a=r(26425),s=r(40710),c=r(33079),l=r(31821),d=r(98353),u=r(35644),h=r(40095),m=r(46540),p=r(65786);function f(e,t){const{attributes:r,vertex:i,varyings:n,fragment:o}=e;i.include(a.u,t),r.add(m.r.POSITION,"vec3"),n.add("vPositionWorldCameraRelative","vec3"),n.add("vPosition_view","vec3",{invariant:!0}),i.uniforms.add(new c.t("transformWorldFromViewTH",(e=>e.transformWorldFromViewTH)),new c.t("transformWorldFromViewTL",(e=>e.transformWorldFromViewTL)),new u.k("transformViewFromCameraRelativeRS",(e=>e.transformViewFromCameraRelativeRS)),new h.X("transformProjFromView",(e=>e.transformProjFromView)),new d.h("transformWorldFromModelRS",(e=>e.transformWorldFromModelRS)),new s.W("transformWorldFromModelTH",(e=>e.transformWorldFromModelTH)),new s.W("transformWorldFromModelTL",(e=>e.transformWorldFromModelTL))),i.code.add(l.H`vec3 positionWorldCameraRelative() {
389
+ }`)}},32976:(e,t,r)=>{r.d(t,{o:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"bool",i.c.Bind,((r,i)=>r.setUniform1b(e,t(i))))}}},33524:(e,t,r)=>{r.d(t,{K_:()=>p,Yf:()=>l,aB:()=>m,ez:()=>c,m6:()=>f,xt:()=>u,z5:()=>d});var i=r(49255),o=r(59643),n=r(63907),a=r(90644);const s=(0,a.p3)(n.dn.ONE,n.dn.ZERO,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA);function c(e){return e===o.Y.FrontFace?null:s}function l(e){switch(e){case o.Y.NONE:return a.T8;case o.Y.ColorAlpha:return s;case o.Y.FrontFace:case o.Y.COUNT:return null}}function d(e){if(e.draped)return null;switch(e.oitPass){case o.Y.NONE:case o.Y.FrontFace:return e.writeDepth?a.Uy:null;case o.Y.ColorAlpha:case o.Y.COUNT:return null}}const u=5e5,h={factor:-1,units:-2};function m(e){return e?h:null}function p(e,t=n.MT.LESS){return e===o.Y.NONE||e===o.Y.FrontFace?t:n.MT.LEQUAL}function f(e,t){const r=(0,i.LG)(t);return e===o.Y.ColorAlpha?r?{buffers:[n.r6,n.yI,n.Fq]}:{buffers:[n.r6,n.yI]}:r?{buffers:[n.r6,n.yI]}:null}},33752:(e,t,r)=>{r.d(t,{EM:()=>g,dO:()=>v,em:()=>f});var i=r(29242),o=r(9093),n=r(51850),a=r(26425),s=r(40710),c=r(33079),l=r(31821),d=r(98353),u=r(35644),h=r(40095),m=r(46540),p=r(65786);function f(e,t){const{attributes:r,vertex:i,varyings:o,fragment:n}=e;i.include(a.u,t),r.add(m.r.POSITION,"vec3"),o.add("vPositionWorldCameraRelative","vec3"),o.add("vPosition_view","vec3",{invariant:!0}),i.uniforms.add(new c.t("transformWorldFromViewTH",(e=>e.transformWorldFromViewTH)),new c.t("transformWorldFromViewTL",(e=>e.transformWorldFromViewTL)),new u.k("transformViewFromCameraRelativeRS",(e=>e.transformViewFromCameraRelativeRS)),new h.X("transformProjFromView",(e=>e.transformProjFromView)),new d.h("transformWorldFromModelRS",(e=>e.transformWorldFromModelRS)),new s.W("transformWorldFromModelTH",(e=>e.transformWorldFromModelTH)),new s.W("transformWorldFromModelTL",(e=>e.transformWorldFromModelTL))),i.code.add(l.H`vec3 positionWorldCameraRelative() {
393
390
  vec3 rotatedModelPosition = transformWorldFromModelRS * position;
394
391
  vec3 transform_CameraRelativeFromModel = dpAdd(
395
392
  transformWorldFromModelTL,
@@ -408,13 +405,13 @@ return transform_CameraRelativeFromModel + rotatedModelPosition;
408
405
  vPosition_view = transformViewFromCameraRelativeRS * vPositionWorldCameraRelative;
409
406
  gl_Position = transformProjFromView * vec4(vPosition_view, 1.0);
410
407
  }
411
- `),o.uniforms.add(new c.t("transformWorldFromViewTL",(e=>e.transformWorldFromViewTL))),i.code.add(l.H`vec3 positionWorld() {
408
+ `),n.uniforms.add(new c.t("transformWorldFromViewTL",(e=>e.transformWorldFromViewTL))),i.code.add(l.H`vec3 positionWorld() {
412
409
  return transformWorldFromViewTL + vPositionWorldCameraRelative;
413
- }`),o.code.add(l.H`vec3 positionWorld() {
410
+ }`),n.code.add(l.H`vec3 positionWorld() {
414
411
  return transformWorldFromViewTL + vPositionWorldCameraRelative;
415
- }`)}class v extends p.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,o.vt)(),this.transformWorldFromViewTL=(0,o.vt)(),this.transformViewFromCameraRelativeRS=(0,i.vt)(),this.transformProjFromView=(0,n.vt)()}}class g extends p.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,i.vt)(),this.transformWorldFromModelTH=(0,o.vt)(),this.transformWorldFromModelTL=(0,o.vt)()}}},34845:(e,t,r)=>{r.d(t,{Ir:()=>d});var i=r(37585),n=r(48163),o=r(87317),a=r(91829),s=r(77108),c=r(14314),l=r(31821);function d(e){e.fragment.uniforms.add(new c.I("projInfo",(e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,o.s)(u,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,o.s)(u,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera)))),e.fragment.uniforms.add(new s.E("zScale",(e=>0===e.camera.projectionMatrix[11]?(0,i.hZ)(h,0,1):(0,i.hZ)(h,1,0)))),e.fragment.code.add(l.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
412
+ }`)}class v extends p.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,n.vt)(),this.transformWorldFromViewTL=(0,n.vt)(),this.transformViewFromCameraRelativeRS=(0,i.vt)(),this.transformProjFromView=(0,o.vt)()}}class g extends p.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,i.vt)(),this.transformWorldFromModelTH=(0,n.vt)(),this.transformWorldFromModelTL=(0,n.vt)()}}},34845:(e,t,r)=>{r.d(t,{Ir:()=>d});var i=r(37585),o=r(48163),n=r(87317),a=r(91829),s=r(77108),c=r(14314),l=r(31821);function d(e){e.fragment.uniforms.add(new c.I("projInfo",(e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,n.s)(u,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,n.s)(u,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera)))),e.fragment.uniforms.add(new s.E("zScale",(e=>0===e.camera.projectionMatrix[11]?(0,i.hZ)(h,0,1):(0,i.hZ)(h,1,0)))),e.fragment.code.add(l.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
416
413
  return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
417
- }`)}const u=(0,a.vt)(),h=(0,n.vt)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),n=r(49255),o=r(51976);class a extends o.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}var s=r(59643),c=r(69270);class l extends a{constructor(){super(...arguments),this.output=n.V.Color,this.oitPass=s.Y.NONE,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=c.c.Pass,this.writeDepth=!0}}(0,i._)([(0,o.W)({count:n.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,o.W)({count:s.Y.COUNT})],l.prototype,"oitPass",void 0),(0,i._)([(0,o.W)()],l.prototype,"hasSlicePlane",void 0),(0,i._)([(0,o.W)()],l.prototype,"hasHighlightMixTexture",void 0)},35640:(e,t,r)=>{r.d(t,{G:()=>l,V:()=>u});var i=r(87317),n=r(91829),o=r(52587),a=r(20693),s=r(71988),c=r(31821);function l(e,t){const r=e.vertex;t.hasVerticalOffset?(u(r),t.hasScreenSizePerspective&&(e.include(o.Y6),(0,o.OH)(r),(0,a.yu)(e.vertex,t)),r.code.add(c.H`
414
+ }`)}const u=(0,a.vt)(),h=(0,o.vt)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),o=r(49255),n=r(51976);class a extends n.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}var s=r(59643),c=r(69270);class l extends a{constructor(){super(...arguments),this.output=o.V.Color,this.oitPass=s.Y.NONE,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=c.c.Pass,this.writeDepth=!0}}(0,i._)([(0,n.W)({count:o.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,n.W)({count:s.Y.COUNT})],l.prototype,"oitPass",void 0),(0,i._)([(0,n.W)()],l.prototype,"hasSlicePlane",void 0),(0,i._)([(0,n.W)()],l.prototype,"hasHighlightMixTexture",void 0)},35640:(e,t,r)=>{r.d(t,{G:()=>l,V:()=>u});var i=r(87317),o=r(91829),n=r(52587),a=r(20693),s=r(71988),c=r(31821);function l(e,t){const r=e.vertex;t.hasVerticalOffset?(u(r),t.hasScreenSizePerspective&&(e.include(n.Y6),(0,n.OH)(r),(0,a.yu)(e.vertex,t)),r.code.add(c.H`
418
415
  vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
419
416
  float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
420
417
  ${t.spherical?c.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:c.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
@@ -430,12 +427,12 @@ return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale
430
427
  vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
431
428
  return worldPos + calculateVerticalOffset(worldPos, localOrigin);
432
429
  }
433
- `)):r.code.add(c.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const d=(0,n.vt)();function u(e){e.uniforms.add(new s.E("verticalOffset",((e,t)=>{const{minWorldLength:r,maxWorldLength:n,screenLength:o}=e.verticalOffset,a=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,i.s)(d,o*s,a,r,n)})))}},35818:(e,t,r)=>{r.d(t,{W:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"int",i.c.Bind,((r,i)=>r.setUniform1i(e,t(i))))}}},36782:(e,t,r)=>{r.d(t,{g:()=>a});var i=r(49255),n=r(31821),o=r(46540);function a(e,t){if(t.output!==i.V.ObjectAndLayerIdColor)return e.vertex.code.add(n.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(n.H`void outputObjectAndLayerIdColor() {}`);const r=t.objectAndLayerIdColorInstanced;e.varyings.add("objectAndLayerIdColorVarying","vec4"),e.attributes.add(r?o.r.INSTANCEOBJECTANDLAYERIDCOLOR:o.r.OLIDCOLOR,"vec4"),e.vertex.code.add(n.H`
430
+ `)):r.code.add(c.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const d=(0,o.vt)();function u(e){e.uniforms.add(new s.E("verticalOffset",((e,t)=>{const{minWorldLength:r,maxWorldLength:o,screenLength:n}=e.verticalOffset,a=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,i.s)(d,n*s,a,r,o)})))}},35818:(e,t,r)=>{r.d(t,{W:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"int",i.c.Bind,((r,i)=>r.setUniform1i(e,t(i))))}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.Renderbuffer=1]="Renderbuffer"}(i||(i={}))},36782:(e,t,r)=>{r.d(t,{g:()=>a});var i=r(49255),o=r(31821),n=r(46540);function a(e,t){if(t.output!==i.V.ObjectAndLayerIdColor)return e.vertex.code.add(o.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(o.H`void outputObjectAndLayerIdColor() {}`);const r=t.objectAndLayerIdColorInstanced;e.varyings.add("objectAndLayerIdColorVarying","vec4"),e.attributes.add(r?n.r.INSTANCEOBJECTANDLAYERIDCOLOR:n.r.OLIDCOLOR,"vec4"),e.vertex.code.add(o.H`
434
431
  void forwardObjectAndLayerIdColor() {
435
432
  objectAndLayerIdColorVarying = ${r?"instanceObjectAndLayerIdColor":"objectAndLayerIdColor"} * 0.003921568627451;
436
- }`),e.fragment.code.add(n.H`void outputObjectAndLayerIdColor() {
433
+ }`),e.fragment.code.add(o.H`void outputObjectAndLayerIdColor() {
437
434
  fragColor = objectAndLayerIdColorVarying;
438
- }`)}},39341:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(46540);const n=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.UVI,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OLIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},40095:(e,t,r)=>{r.d(t,{X:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"mat4",i.c.Pass,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}},40261:(e,t,r)=>{r.d(t,{E:()=>T});var i=r(46686),n=r(49255),o=r(76591),a=r(76597),s=r(96336),c=r(36782),l=r(53466),d=r(72824),u=r(80730),h=r(31821);function m(e,t){switch(t.output){case n.V.Shadow:case n.V.ShadowHighlight:case n.V.ShadowExcludeHighlight:case n.V.ViewshedShadow:e.outputs.add("oFragDepth","vec4",0),e.fragment.include(u.U),e.fragment.code.add(h.H`float _calculateFragDepth(const in float depth) {
435
+ }`)}},39341:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(46540);const o=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.UVI,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OLIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},40095:(e,t,r)=>{r.d(t,{X:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"mat4",i.c.Pass,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}},40261:(e,t,r)=>{r.d(t,{E:()=>T});var i=r(46686),o=r(49255),n=r(76591),a=r(76597),s=r(96336),c=r(36782),l=r(53466),d=r(72824),u=r(80730),h=r(31821);function m(e,t){switch(t.output){case o.V.Shadow:case o.V.ShadowHighlight:case o.V.ShadowExcludeHighlight:case o.V.ViewshedShadow:e.outputs.add("oFragDepth","vec4",0),e.fragment.include(u.U),e.fragment.code.add(h.H`float _calculateFragDepth(const in float depth) {
439
436
  const float SLOPE_SCALE = 2.0;
440
437
  const float BIAS = 20.0 * .000015259;
441
438
  float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
@@ -444,14 +441,14 @@ return depth + SLOPE_SCALE * m + BIAS;
444
441
  void outputDepth(float _linearDepth) {
445
442
  float fragDepth = _calculateFragDepth(_linearDepth);
446
443
  oFragDepth = floatToRgba4(fragDepth);
447
- }`)}}var p=r(42593),f=r(42398),v=r(11955),g=r(20693),_=r(63761),x=r(89192);function T(e,t){const{vertex:r,fragment:u,varyings:T}=e,{hasColorTexture:b,alphaDiscardMode:A}=t,E=b&&A!==x.sf.Opaque,{output:S,normalType:M,hasColorTextureTransform:w}=t;switch(S){case n.V.Depth:(0,g.NB)(r,t),e.include(a.d,t),u.include(o.HQ,t),e.include(l.U,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
444
+ }`)}}var p=r(42593),f=r(42398),v=r(58614),g=r(20693),_=r(63761),x=r(89192);function T(e,t){const{vertex:r,fragment:u,varyings:T}=e,{hasColorTexture:b,alphaDiscardMode:A}=t,E=b&&A!==x.sf.Opaque,{output:S,normalType:M,hasColorTextureTransform:w}=t;switch(S){case o.V.Depth:(0,g.NB)(r,t),e.include(a.d,t),u.include(n.HQ,t),e.include(l.U,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
448
445
  vpos = subtractOrigin(vpos);
449
446
  vpos = addVerticalOffset(vpos, localOrigin);
450
447
  gl_Position = transformPosition(proj, view, vpos);
451
448
  forwardTextureCoordinates();`),e.include(v.S,t),u.main.add(h.H`
452
449
  discardBySlice(vpos);
453
450
  ${(0,h.If)(E,h.H`vec4 texColor = texture(tex, ${w?"colorUV":"vuv0"});
454
- discardOrAdjustAlpha(texColor);`)}`);break;case n.V.Shadow:case n.V.ShadowHighlight:case n.V.ShadowExcludeHighlight:case n.V.ViewshedShadow:case n.V.ObjectAndLayerIdColor:(0,g.NB)(r,t),e.include(a.d,t),e.include(l.U,t),e.include(f.A,t),e.include(m,t),u.include(o.HQ,t),e.include(c.g,t),(0,i.xJ)(e),T.add("depth","float",{invariant:!0}),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
451
+ discardOrAdjustAlpha(texColor);`)}`);break;case o.V.Shadow:case o.V.ShadowHighlight:case o.V.ShadowExcludeHighlight:case o.V.ViewshedShadow:case o.V.ObjectAndLayerIdColor:(0,g.NB)(r,t),e.include(a.d,t),e.include(l.U,t),e.include(f.A,t),e.include(m,t),u.include(n.HQ,t),e.include(c.g,t),(0,i.xJ)(e),T.add("depth","float",{invariant:!0}),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
455
452
  vpos = subtractOrigin(vpos);
456
453
  vpos = addVerticalOffset(vpos, localOrigin);
457
454
  gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
@@ -460,13 +457,13 @@ forwardObjectAndLayerIdColor();`),e.include(v.S,t),u.main.add(h.H`
460
457
  discardBySlice(vpos);
461
458
  ${(0,h.If)(E,h.H`vec4 texColor = texture(tex, ${w?"colorUV":"vuv0"});
462
459
  discardOrAdjustAlpha(texColor);`)}
463
- ${S===n.V.ObjectAndLayerIdColor?h.H`outputObjectAndLayerIdColor();`:h.H`outputDepth(depth);`}`);break;case n.V.Normal:{(0,g.NB)(r,t),e.include(a.d,t),e.include(s.Y,t),e.include(d.Mh,t),e.include(l.U,t),e.include(f.A,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),M===s.W.ScreenDerivative&&T.add("vPositionView","vec3",{invariant:!0});const i=M===s.W.Attribute||M===s.W.Compressed;r.main.add(h.H`
460
+ ${S===o.V.ObjectAndLayerIdColor?h.H`outputObjectAndLayerIdColor();`:h.H`outputDepth(depth);`}`);break;case o.V.Normal:{(0,g.NB)(r,t),e.include(a.d,t),e.include(s.Y,t),e.include(d.Mh,t),e.include(l.U,t),e.include(f.A,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),M===s.W.ScreenDerivative&&T.add("vPositionView","vec3",{invariant:!0});const i=M===s.W.Attribute||M===s.W.Compressed;r.main.add(h.H`
464
461
  vpos = getVertexInLocalOriginSpace();
465
462
  ${i?h.H`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:h.H`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
466
463
  vpos = subtractOrigin(vpos);
467
464
  vpos = addVerticalOffset(vpos, localOrigin);
468
465
  gl_Position = transformPosition(proj, view, vpos);
469
- forwardTextureCoordinates();`),u.include(o.HQ,t),e.include(v.S,t),u.main.add(h.H`
466
+ forwardTextureCoordinates();`),u.include(n.HQ,t),e.include(v.S,t),u.main.add(h.H`
470
467
  discardBySlice(vpos);
471
468
  ${(0,h.If)(E,h.H`vec4 texColor = texture(tex, ${w?"colorUV":"vuv0"});
472
469
  discardOrAdjustAlpha(texColor);`)}
@@ -475,15 +472,15 @@ forwardObjectAndLayerIdColor();`),e.include(v.S,t),u.main.add(h.H`
475
472
  if (gl_FrontFacing == false){
476
473
  normal = -normal;
477
474
  }`}
478
- fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case n.V.Highlight:(0,g.NB)(r,t),e.include(a.d,t),e.include(l.U,t),e.include(f.A,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
475
+ fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case o.V.Highlight:(0,g.NB)(r,t),e.include(a.d,t),e.include(l.U,t),e.include(f.A,t),E&&u.uniforms.add(new _.N("tex",(e=>e.texture))),r.main.add(h.H`vpos = getVertexInLocalOriginSpace();
479
476
  vpos = subtractOrigin(vpos);
480
477
  vpos = addVerticalOffset(vpos, localOrigin);
481
478
  gl_Position = transformPosition(proj, view, vpos);
482
- forwardTextureCoordinates();`),u.include(o.HQ,t),e.include(v.S,t),e.include(p.Q,t),u.main.add(h.H`
479
+ forwardTextureCoordinates();`),u.include(n.HQ,t),e.include(v.S,t),e.include(p.Q,t),u.main.add(h.H`
483
480
  discardBySlice(vpos);
484
481
  ${(0,h.If)(E,h.H`vec4 texColor = texture(tex, ${w?"colorUV":"vuv0"});
485
482
  discardOrAdjustAlpha(texColor);`)}
486
- calculateOcclusionAndOutputHighlight();`)}}},42293:(e,t,r)=>{r.d(t,{IB:()=>n}),r(44208),r(94656);var i=r(63907);function n(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.Xo.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.SB.DEPTH_COMPONENT16:return 2;case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.SB.DEPTH_COMPONENT24:return 3;case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.SB.DEPTH_COMPONENT32F:case i.iE.DEPTH24_STENCIL8:return 4;case i.iE.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},42398:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(33079),n=r(71988),o=r(69270),a=r(74333);class s extends a.n{constructor(e,t,r){super(e,"vec4",o.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))),r)}}class c extends a.n{constructor(e,t,r){super(e,"float",o.c.Pass,((r,i,n)=>r.setUniform1fv(e,t(i,n))),r)}}var l=r(31821),d=r(35644),u=r(46540),h=r(78662);r(11725),h.Gd;const m=8;function p(e,t){const{vertex:r,attributes:o}=e;t.hasVvInstancing&&(t.vvSize||t.vvColor)&&o.add(u.r.INSTANCEFEATUREATTRIBUTE,"vec4"),t.vvSize?(r.uniforms.add(new i.t("vvSizeMinSize",(e=>e.vvSize.minSize))),r.uniforms.add(new i.t("vvSizeMaxSize",(e=>e.vvSize.maxSize))),r.uniforms.add(new i.t("vvSizeOffset",(e=>e.vvSize.offset))),r.uniforms.add(new i.t("vvSizeFactor",(e=>e.vvSize.factor))),r.uniforms.add(new i.t("vvSizeFallback",(e=>e.vvSize.fallback))),r.uniforms.add(new d.k("vvSymbolRotationMatrix",(e=>e.vvSymbolRotationMatrix))),r.uniforms.add(new i.t("vvSymbolAnchor",(e=>e.vvSymbolAnchor))),r.code.add(l.H`vec3 vvScale(vec4 _featureAttribute) {
483
+ calculateOcclusionAndOutputHighlight();`)}}},42293:(e,t,r)=>{r.d(t,{IB:()=>o}),r(44208),r(94656);var i=r(63907);function o(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.Xo.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.SB.DEPTH_COMPONENT16:return 2;case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.SB.DEPTH_COMPONENT24:return 3;case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.SB.DEPTH_COMPONENT32F:case i.iE.DEPTH24_STENCIL8:return 4;case i.iE.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},42398:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(33079),o=r(71988),n=r(69270),a=r(74333);class s extends a.n{constructor(e,t,r){super(e,"vec4",n.c.Pass,((r,i,o)=>r.setUniform4fv(e,t(i,o))),r)}}class c extends a.n{constructor(e,t,r){super(e,"float",n.c.Pass,((r,i,o)=>r.setUniform1fv(e,t(i,o))),r)}}var l=r(31821),d=r(35644),u=r(46540),h=r(78662);r(11725),h.Gd;const m=8;function p(e,t){const{vertex:r,attributes:n}=e;t.hasVvInstancing&&(t.vvSize||t.vvColor)&&n.add(u.r.INSTANCEFEATUREATTRIBUTE,"vec4"),t.vvSize?(r.uniforms.add(new i.t("vvSizeMinSize",(e=>e.vvSize.minSize))),r.uniforms.add(new i.t("vvSizeMaxSize",(e=>e.vvSize.maxSize))),r.uniforms.add(new i.t("vvSizeOffset",(e=>e.vvSize.offset))),r.uniforms.add(new i.t("vvSizeFactor",(e=>e.vvSize.factor))),r.uniforms.add(new i.t("vvSizeFallback",(e=>e.vvSize.fallback))),r.uniforms.add(new d.k("vvSymbolRotationMatrix",(e=>e.vvSymbolRotationMatrix))),r.uniforms.add(new i.t("vvSymbolAnchor",(e=>e.vvSymbolAnchor))),r.code.add(l.H`vec3 vvScale(vec4 _featureAttribute) {
487
484
  if (isnan(_featureAttribute.x)) {
488
485
  return vvSizeFallback;
489
486
  }
@@ -507,7 +504,7 @@ return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position +
507
504
  return vvTransformPosition(position, instanceFeatureAttribute);
508
505
  }`:""}
509
506
  `)):r.code.add(l.H`vec4 localPosition() { return vec4(position, 1.0); }
510
- vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(r.constants.add("vvColorNumber","int",m),r.uniforms.add(new c("vvColorValues",(e=>e.vvColor.values),m),new s("vvColorColors",(e=>e.vvColor.colors),m),new n.E("vvColorFallback",(e=>e.vvColor.fallback))),r.code.add(l.H`
507
+ vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(r.constants.add("vvColorNumber","int",m),r.uniforms.add(new c("vvColorValues",(e=>e.vvColor.values),m),new s("vvColorColors",(e=>e.vvColor.colors),m),new o.E("vvColorFallback",(e=>e.vvColor.fallback))),r.code.add(l.H`
511
508
  vec4 interpolateVVColor(float value) {
512
509
  if (isnan(value)) {
513
510
  return vvColorFallback;
@@ -534,7 +531,7 @@ vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(r.c
534
531
  vec4 vvColor() {
535
532
  return vvGetColor(instanceFeatureAttribute);
536
533
  }`:"vec4 vvColor() { return vec4(1.0); }"}
537
- `)):r.code.add(l.H`vec4 vvColor() { return vec4(1.0); }`)}},42593:(e,t,r)=>{r.d(t,{Q:()=>h});var i=r(31821);function n(e){const{fragment:t}=e;t.code.add(i.H`uint readChannelBits(uint channel, int highlightLevel) {
534
+ `)):r.code.add(l.H`vec4 vvColor() { return vec4(1.0); }`)}},42593:(e,t,r)=>{r.d(t,{Q:()=>h});var i=r(31821);function o(e){const{fragment:t}=e;t.code.add(i.H`uint readChannelBits(uint channel, int highlightLevel) {
538
535
  int llc = (highlightLevel & 3) << 1;
539
536
  return (channel >> llc) & 3u;
540
537
  }
@@ -544,7 +541,7 @@ return texel[lic];
544
541
  }
545
542
  uint readLevelBits(uvec2 texel, int highlightLevel) {
546
543
  return readChannelBits(readChannel(texel, highlightLevel), highlightLevel);
547
- }`)}var o=r(49255),a=r(69270),s=r(74333);class c extends s.n{constructor(e,t){super(e,"ivec2",a.c.Bind,((r,i)=>r.setUniform2iv(e,t(i))))}}var l=r(35818),d=r(12791);class u extends s.n{constructor(e,t){super(e,"usampler2D",a.c.Bind,((r,i)=>r.bindTexture(e,t(i))))}}function h(e,t){const{fragment:r}=e,{output:a,draped:s,hasHighlightMixTexture:h}=t;a===o.V.Highlight?(r.uniforms.add(new l.W("highlightLevel",(e=>e.highlightLevel??0)),new c("highlightMixOrigin",(e=>e.highlightMixOrigin))),e.outputs.add("fragHighlight","uvec2",0),e.include(n),h?r.uniforms.add(new u("highlightMixTexture",(e=>e.highlightMixTexture))).code.add(i.H`uvec2 getAccumulatedHighlight() {
544
+ }`)}var n=r(49255),a=r(69270),s=r(74333);class c extends s.n{constructor(e,t){super(e,"ivec2",a.c.Bind,((r,i)=>r.setUniform2iv(e,t(i))))}}var l=r(35818),d=r(12791);class u extends s.n{constructor(e,t){super(e,"usampler2D",a.c.Bind,((r,i)=>r.bindTexture(e,t(i))))}}function h(e,t){const{fragment:r}=e,{output:a,draped:s,hasHighlightMixTexture:h}=t;a===n.V.Highlight?(r.uniforms.add(new l.W("highlightLevel",(e=>e.highlightLevel??0)),new c("highlightMixOrigin",(e=>e.highlightMixOrigin))),e.outputs.add("fragHighlight","uvec2",0),e.include(o),h?r.uniforms.add(new u("highlightMixTexture",(e=>e.highlightMixTexture))).code.add(i.H`uvec2 getAccumulatedHighlight() {
548
545
  return texelFetch(highlightMixTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0).rg;
549
546
  }
550
547
  void outputHighlight(bool occluded) {
@@ -574,21 +571,21 @@ float sceneDepth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x;
574
571
  return gl_FragCoord.z > sceneDepth + 5e-7;
575
572
  }`),r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {
576
573
  outputHighlight(isHighlightOccluded());
577
- }`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},43616:(e,t,r)=>{r.d(t,{MB:()=>s,Um:()=>c,kE:()=>a});var i=r(4576),n=r(34727),o=r(77194);function a(e,t,r,i,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=(0,o.hs)(s,i,t,a));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function s(e,t){let r=!1;for(const n in t){const o=t[n];void 0!==o&&(Array.isArray(o)?Array.isArray(e[n])&&(0,i.aI)(o,e[n])||(e[n]=o.slice(),r=!0):e[n]!==o&&(r=!0,e[n]=o))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},46686:(e,t,r)=>{r.d(t,{i$:()=>l,oD:()=>d,xJ:()=>c});var i=r(49255),n=r(33752),o=r(77108),a=r(31821);function s(e){e.varyings.add("linearDepth","float",{invariant:!0})}function c(e){e.vertex.uniforms.add(new o.E("nearFar",(e=>e.camera.nearFar)))}function l(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
574
+ }`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},43616:(e,t,r)=>{r.d(t,{MB:()=>s,Um:()=>c,kE:()=>a});var i=r(4576),o=r(34727),n=r(77194);function a(e,t,r,i,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=(0,n.hs)(s,i,t,a));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,o.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function s(e,t){let r=!1;for(const o in t){const n=t[o];void 0!==n&&(Array.isArray(n)?Array.isArray(e[o])&&(0,i.aI)(n,e[o])||(e[o]=n.slice(),r=!0):e[o]!==n&&(r=!0,e[o]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},46686:(e,t,r)=>{r.d(t,{i$:()=>l,oD:()=>d,xJ:()=>c});var i=r(49255),o=r(33752),n=r(77108),a=r(31821);function s(e){e.varyings.add("linearDepth","float",{invariant:!0})}function c(e){e.vertex.uniforms.add(new n.E("nearFar",(e=>e.camera.nearFar)))}function l(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
578
575
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
579
- }`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.V.Color:case i.V.ColorEmission:if(t.receiveShadows)return s(e),void r.code.add(a.H`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.V.Shadow:case i.V.ShadowHighlight:case i.V.ShadowExcludeHighlight:case i.V.ViewshedShadow:return e.include(n.em,t),s(e),c(e),l(e),void r.code.add(a.H`void forwardLinearDepth() {
576
+ }`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.V.Color:case i.V.ColorEmission:if(t.receiveShadows)return s(e),void r.code.add(a.H`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.V.Shadow:case i.V.ShadowHighlight:case i.V.ShadowExcludeHighlight:case i.V.ViewshedShadow:return e.include(o.em,t),s(e),c(e),l(e),void r.code.add(a.H`void forwardLinearDepth() {
580
577
  linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
581
- }`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,n)=>r.setUniform2fv(e,t(i,n))))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var p=r(92993),f=r(63907),v=r(30164),g=r(42293);let _=null,x=null;async function T(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function b(e,t,r,i,n){const o=(0,g.IB)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function A(e){return e.getNumImages()>=1&&!e.isUASTC()}function E(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[p.n.ETC2_RGBA,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[p.n.ETC1_RGB,f.CQ.COMPRESSED_RGB8_ETC2]:l?i?[p.n.BC3_RGBA,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[p.n.BC1_RGB,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[p.n.RGBA32,f.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.width=n,t.height=o,new v.g(e,t,{type:"compressed",levels:m})}var M=r(69720),w=r(96672),C=r(53966);const I=()=>C.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=R("DXT1"),y=R("DXT3"),N=R("DXT5");function P(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function L(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),n=e.width*e.height,o=t*t;if(i<=r&&n<=o)return e;const a=Math.min(Math.sqrt(o/n),r/i);return D(e,P(Math.round(e.width*a),r),P(Math.round(e.height*a),r))}function D(e,t,r){if(e instanceof ImageData)return D(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var H=r(620),F=r(67171);class B extends M.J{constructor(e,t){super(),this._data=e,this.type=w.X.Texture,this.events=new n.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new F.R;return t.wrapMode=this._parameters.wrap??f.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=E(r)?b(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=A(r)?b(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return I().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return I().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case O:n=8,o=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case y:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case N:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return I().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(I().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*n,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:p},internalFormat:o,width:l,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new v.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await T());const i=new _.KTX2File(new Uint8Array(r));if(!E(i))return null;i.startTranscoding();const n=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await T());const i=new _.BasisFile(new Uint8Array(r));if(!A(i))return null;i.startTranscoding();const n=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,H.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?f.Ab.LUMINANCE:3===this._parameters.components?f.Ab.RGB:f.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((n,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,o.xt)(u)},l=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=L(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?f.Ab.RGB:f.Ab.RGBA,n.width=i.width,n.height=i.height,n.compressionHandle=this._parameters.compressionHandle,this._glTexture=new v.g(e,n,r),this._emptyTexture=null,this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const z={wrap:{s:f.pF.REPEAT,t:f.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>d,QM:()=>u,Sx:()=>c,q2:()=>s});var i=r(29242),n=r(53466),o=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(o.H`void forwardColorUV(){
578
+ }`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,o)=>r.setUniform2fv(e,t(i,o))))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var p=r(92993),f=r(63907),v=r(76284),g=r(42293);let _=null,x=null;async function T(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function b(e,t,r,i,o){const n=(0,g.IB)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function A(e){return e.getNumImages()>=1&&!e.isUASTC()}function E(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,o,n,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[p.n.ETC2_RGBA,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[p.n.ETC1_RGB,f.CQ.COMPRESSED_RGB8_ETC2]:l?i?[p.n.BC3_RGBA,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[p.n.BC1_RGB,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[p.n.RGBA32,f.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.width=o,t.height=n,new v.g(e,t,{type:"compressed",levels:m})}var M=r(69720),w=r(96672),C=r(53966);const I=()=>C.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=R("DXT1"),y=R("DXT3"),N=R("DXT5");function P(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function L(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),o=e.width*e.height,n=t*t;if(i<=r&&o<=n)return e;const a=Math.min(Math.sqrt(n/o),r/i);return D(e,P(Math.round(e.width*a),r),P(Math.round(e.height*a),r))}function D(e,t,r){if(e instanceof ImageData)return D(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}var H=r(620),F=r(67171);class B extends M.J{constructor(e,t){super(),this._data=e,this.type=w.X.Texture,this.events=new o.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new F.R;return t.wrapMode=this._parameters.wrap??f.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=E(r)?b(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=A(r)?b(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return I().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return I().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case O:o=8,n=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case y:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case N:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return I().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(I().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*o,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:p},internalFormat:n,width:l,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?f.Cj.LINEAR_MIPMAP_LINEAR:f.Cj.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new v.g(e,t,o)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await T());const i=new _.KTX2File(new Uint8Array(r));if(!E(i))return null;i.startTranscoding();const o=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await T());const i=new _.BasisFile(new Uint8Array(r));if(!A(i))return null;i.startTranscoding();const o=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,H.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?f.Ab.LUMINANCE:3===this._parameters.components?f.Ab.RGB:f.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,n.xt)(u)},l=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),o(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=L(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?f.Ab.RGB:f.Ab.RGBA,o.width=i.width,o.height=i.height,o.compressionHandle=this._parameters.compressionHandle,this._glTexture=new v.g(e,o,r),this._emptyTexture=null,this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const z={wrap:{s:f.pF.REPEAT,t:f.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>d,QM:()=>u,Sx:()=>c,q2:()=>s});var i=r(29242),o=r(53466),n=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(n.H`void forwardColorUV(){
582
579
  colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
583
- }`)):e.vertex.code.add(o.H`void forwardColorUV(){}`)}function c(e,t){t.hasNormalTextureTransform&&t.textureCoordinateType!==n.I.None?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new a.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK))).code.add(o.H`void forwardNormalUV(){
580
+ }`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function c(e,t){t.hasNormalTextureTransform&&t.textureCoordinateType!==o.I.None?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new a.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK))).code.add(n.H`void forwardNormalUV(){
584
581
  normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
585
- }`)):e.vertex.code.add(o.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&t.textureCoordinateType!==n.I.None?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new a.k("emissiveTextureTransformMatrix",(e=>e.emissiveTextureTransformMatrix??i.zK))).code.add(o.H`void forwardEmissiveUV(){
582
+ }`)):e.vertex.code.add(n.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&t.textureCoordinateType!==o.I.None?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new a.k("emissiveTextureTransformMatrix",(e=>e.emissiveTextureTransformMatrix??i.zK))).code.add(n.H`void forwardEmissiveUV(){
586
583
  emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
587
- }`)):e.vertex.code.add(o.H`void forwardEmissiveUV(){}`)}function d(e,t){t.hasOcclusionTextureTransform&&t.textureCoordinateType!==n.I.None?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new a.k("occlusionTextureTransformMatrix",(e=>e.occlusionTextureTransformMatrix??i.zK))).code.add(o.H`void forwardOcclusionUV(){
584
+ }`)):e.vertex.code.add(n.H`void forwardEmissiveUV(){}`)}function d(e,t){t.hasOcclusionTextureTransform&&t.textureCoordinateType!==o.I.None?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new a.k("occlusionTextureTransformMatrix",(e=>e.occlusionTextureTransformMatrix??i.zK))).code.add(n.H`void forwardOcclusionUV(){
588
585
  occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
589
- }`)):e.vertex.code.add(o.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&t.textureCoordinateType!==n.I.None?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new a.k("metallicRoughnessTextureTransformMatrix",(e=>e.metallicRoughnessTextureTransformMatrix??i.zK))).code.add(o.H`void forwardMetallicRoughnessUV(){
586
+ }`)):e.vertex.code.add(n.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&t.textureCoordinateType!==o.I.None?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new a.k("metallicRoughnessTextureTransformMatrix",(e=>e.metallicRoughnessTextureTransformMatrix??i.zK))).code.add(n.H`void forwardMetallicRoughnessUV(){
590
587
  metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
591
- }`)):e.vertex.code.add(o.H`void forwardMetallicRoughnessUV(){}`)}},51768:(e,t,r)=>{r.d(t,{$U:()=>Ae});var i=r(38954),n=r(51850),o=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(16943),m=r(89192),p=r(25634),f=r(11725),v=r(33524),g=r(70328),_=r(96672),x=r(620),T=r(46540);class b{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const A=(0,g.vt)(),E=(0,n.vt)();function S(e,t,r,n,o,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,E);if((0,g.Ne)(A,e.bbMin),(0,g.vI)(A,e.bbMax),null!=o&&o.applyToAabb(A),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(A,t,c,n)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>L){const i=e.getChildren();if(void 0!==i){for(const e of i)S(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let l=o[i],_=o[i+1],x=o[i+2];const T=a*n[r+1];let b=o[T],A=o[T+1],E=o[T+2];const S=a*n[r+2];let w=o[S],C=o[S+1],I=o[S+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[b,A,E]=c.applyToVertex(b,A,E,e),[w,C,I]=c.applyToVertex(w,C,I,e));const R=b-l,y=A-_,N=E-x,P=w-l,L=C-_,H=I-x,F=f*H-L*v,B=v*P-H*p,G=p*L-P*f,z=R*F+y*B+N*G;if(Math.abs(z)<=D)continue;const U=u-l,V=h-_,W=m-x,j=U*F+V*B+W*G;if(z>0){if(j<0||j>z)continue}else if(j>0||j<z)continue;const k=V*N-y*W,$=W*R-N*U,q=U*y-R*V,Y=p*k+f*$+v*q;if(z>0){if(Y<0||j+Y>z)continue}else if(Y>0||j+Y<z)continue;const X=(P*k+L*$+H*q)/z;X>=0&&d(X,t,g?O(R,y,N,P,L,H,M):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,o,a,s)}}const M=(0,n.vt)();function w(e,t,r,i,n,o,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,p=o*t,f=n[p],v=n[p+1],g=n[p+2],_=o*r,x=o*i,T=n[_]-f,b=n[_+1]-v,A=n[_+2]-g,E=n[x]-f,S=n[x+1]-v,w=n[x+2]-g,C=h*w-S*m,I=m*E-w*u,R=u*S-E*h,y=T*C+b*I+A*R;if(Math.abs(y)<=D)continue;const N=c-f,P=l-v,L=d-g,H=N*C+P*I+L*R;if(y>0){if(H<0||H>y)continue}else if(H>0||H<y)continue;const F=P*A-b*L,B=L*T-A*N,G=N*b-T*P,z=u*F+h*B+m*G;if(y>0){if(z<0||H+z>y)continue}else if(z>0||H+z<y)continue;const U=(E*F+S*B+w*G)/y;U>=0&&s(U,e,a?O(T,b,A,E,S,w,M):null)}}const C=(0,n.vt)(),I=(0,n.vt)(),R=(0,n.vt)();function O(e,t,r,n,o,a,s){return(0,i.i)(N,e,t,r),(0,i.i)(P,n,o,a),(0,i.e)(s,N,P),(0,i.n)(s,s),s}function y(e){return(0,i.a)(N,e[1],e[0]),(0,i.a)(P,e[2],e[0]),(0,i.e)(M,N,P),(0,i.n)(M,M),M}const N=(0,n.vt)(),P=(0,n.vt)(),L=1e3,D=1e-7,H=(0,n.vt)(),F=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var B=r(13464),G=(r(77690),r(29242),r(58083),r(9093),r(97937)),z=r(57005);const U=new class{constructor(e=0){this.offset=e,this.sphere=(0,G.c)(),this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=this.objectTransform.transform,o=(0,i.i)(V,e,t,r),a=(0,i.t)(o,o,n),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const n=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,n)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,G.a)(e)),r=this.offset/t;return(0,i.b)((0,G.a)(this.sphere),(0,G.a)(e),(0,G.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=(0,G.c)(),this._tmpObb=new z.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const n=(0,i.i)(V,e,t,r),o=(0,i.i)(W,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(o);return(0,i.b)(this._tmpVertex,n,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],n=e[2]+t,o=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(n),u=Math.abs(o),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*o))*Math.min(c,u),f=.5*(1+Math.sign(i*a))*Math.min(l,h),v=.5*(1+Math.sign(n*s))*Math.min(d,m),g=Math.max(c,u),_=Math.max(l,h),x=Math.max(d,m),T=Math.sqrt(p*p+f*f+v*v),b=Math.sign(c+r),A=Math.sign(l+i),E=Math.sign(d+n),S=Math.sign(u+o),M=Math.sign(h+a),w=Math.sign(m+s),C=this._totalOffset;if(T<C)return e[0]-=(1-b)*C,e[1]-=(1-A)*C,e[2]-=(1-E)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=w*C,e;const I=C/Math.sqrt(g*g+_*_+x*x),R=C/T,O=R-I,y=-O;return e[0]+=r*(b*y+R),e[1]+=i*(A*y+R),e[2]+=n*(E*y+R),e[3]+=o*(S*O+I),e[4]+=a*(M*O+I),e[5]+=s*(w*O+I),e}applyToMbs(e){const t=(0,i.l)((0,G.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,G.a)(this._tmpMbs),(0,G.a)(e),(0,G.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,z.gm)(e,this._totalOffset,this._totalOffset,o.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=(0,i.i)(V,e,t,r),o=(0,i.g)(W,n,this.localOrigin),a=this.offset/(0,i.l)(o);return(0,i.b)(this.tmpVertex,n,o,a),this.tmpVertex}applyToAabb(e){const t=j,r=k,i=$;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],i[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const o=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let n=0;n<3;++n)i[n]=e&1<<n?r[n]:t[n];o(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let n=0;n<3;++n)i[n]=a&1<<n?0:e&1<<n?t[n]:r[n];o(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const V=(0,n.vt)(),W=(0,n.vt)(),j=(0,n.vt)(),k=(0,n.vt)(),$=(0,n.vt)();var q=r(13030),Y=r(59907);class X{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(T.r.POSITION).indices.length}write(e,t,r,i,n,o){return(0,Y.SA)(r,i,this.vertexBufferLayout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const c=this.vertexBufferLayout.createView(e).getField(T.r.POSITION,q.xs);if(null==c)return;const l=(0,i.a)(Z,a,o),d=c.count/3,u=n.options.normalRequired;w(o,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const Z=(0,n.vt)();var J=r(43616),K=r(91829),Q=r(72824),ee=r(97220),te=r(98958),re=r(59643),ie=r(63907);ie.MT.LESS,ie.MT.ALWAYS;const ne={mask:255},oe={function:{func:ie.MT.ALWAYS,ref:m.dd.OutlineVisualElementMask,mask:m.dd.OutlineVisualElementMask},operation:{fail:ie.eA.KEEP,zFail:ie.eA.KEEP,zPass:ie.eA.ZERO}},ae={function:{func:ie.MT.ALWAYS,ref:m.dd.OutlineVisualElementMask,mask:m.dd.OutlineVisualElementMask},operation:{fail:ie.eA.KEEP,zFail:ie.eA.KEEP,zPass:ie.eA.REPLACE}};ie.MT.EQUAL,m.dd.OutlineVisualElementMask,m.dd.OutlineVisualElementMask,ie.eA.KEEP,ie.eA.KEEP,ie.eA.KEEP,ie.MT.NOTEQUAL,m.dd.OutlineVisualElementMask,m.dd.OutlineVisualElementMask,ie.eA.KEEP,ie.eA.KEEP,ie.eA.KEEP;var se=r(74810),ce=r(28491),le=r(90644),de=r(49788);class ue extends Q.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=se.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=m.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=n.uY,this.instancedDoublePrecision=!1,this.normalType=c.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,n.CN)(.2,.2,.2),this.diffuse=(0,n.CN)(.8,.8,.8),this.externalColor=(0,K.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,n.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=m.it.Less,this.textureAlphaMode=m.sf.Blend,this.textureAlphaCutoff=de.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=f.m$.Occlude,this.isDecoration=!1}}Q.gy;class he extends te.w{constructor(e,t,i=new ee.$(ce.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:n,cullFace:o,customDepthTest:a,hasOccludees:c,enableOffset:l}=e,d=r===re.Y.NONE,u=r===re.Y.FrontFace;return(0,le.Ey)({blending:(0,s.RN)(i)&&n?(0,v.Yf)(r):null,culling:pe(e)?(0,le.Xt)(o):null,depthTest:{func:(0,v.K_)(r,me(a))},depthWrite:(0,v.z5)(e),drawBuffers:i===s.V.Depth?{buffers:[ie.Hr.NONE]}:(0,v.m6)(r,i),colorWrite:le.kn,stencilWrite:c?ne:null,stencilTest:c?t?ae:oe:null,polygonOffset:d||u?null:(0,v.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function me(e){return e===m.it.Lequal?ie.MT.LEQUAL:ie.MT.LESS}function pe(e){return e.cullFace!==m.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}var fe=r(90237),ve=r(53466),ge=r(51976),_e=r(35256);class xe extends _e.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=m.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=m.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=m.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?ve.I.Default:ve.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,fe._)([(0,ge.W)({count:m.sf.COUNT})],xe.prototype,"alphaDiscardMode",void 0),(0,fe._)([(0,ge.W)({count:d.W.COUNT})],xe.prototype,"doubleSidedMode",void 0),(0,fe._)([(0,ge.W)({count:u.A9.COUNT})],xe.prototype,"pbrMode",void 0),(0,fe._)([(0,ge.W)({count:m.s2.COUNT})],xe.prototype,"cullFace",void 0),(0,fe._)([(0,ge.W)({count:c.W.COUNT})],xe.prototype,"normalType",void 0),(0,fe._)([(0,ge.W)({count:m.it.COUNT})],xe.prototype,"customDepthTest",void 0),(0,fe._)([(0,ge.W)({count:l.ZX.COUNT})],xe.prototype,"emissionSource",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasVertexColors",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasSymbolColors",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasVerticalOffset",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasColorTexture",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasMetallicRoughnessTexture",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasOcclusionTexture",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasNormalTexture",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasScreenSizePerspective",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasVertexTangents",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasOccludees",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"instancedDoublePrecision",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasModelTransformation",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"offsetBackfaces",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"vvSize",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"vvColor",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"receiveShadows",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"receiveAmbientOcclusion",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"textureAlphaPremultiplied",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"instanced",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"instancedColor",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"writeDepth",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"transparent",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"enableOffset",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"terrainDepthTest",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"cullAboveTerrain",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"snowCover",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasColorTextureTransform",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasEmissionTextureTransform",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasNormalTextureTransform",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasOcclusionTextureTransform",void 0),(0,fe._)([(0,ge.W)()],xe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Te=r(57323);class be extends he{constructor(e,t){super(e,t,new ee.$(Te.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}class Ae extends f.im{constructor(e,t){super(e,Se),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[B.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.transparent],[B.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[B.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(T.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(T.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(T.r.NORMAL),e.hasVertexTangents&&t.vec4f(T.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f16(T.r.UV0),e.hasVertexColors&&t.vec4u8(T.r.COLOR),e.hasSymbolColors&&t.vec4u8(T.r.SYMBOLCOLOR),(0,h.E)()&&t.vec4u8(T.r.OLIDCOLOR),t}(this.parameters),this._configuration=new xe(t.spherical)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=de.Q}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveFactor,n.uY)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:n,doubleSided:o,doubleSidedType:a}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=!n&&!!r.normalTextureId,i.hasColorTexture=!!r.textureId,i.hasVertexTangents=!n&&r.hasVertexTangents,i.instanced=r.isInstanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.vvSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=n?c.W.Attribute:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,null!=r.customDepthTest&&(i.customDepthTest=r.customDepthTest),i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?m.s2.None:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!n&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=n?d.W.WindingOrder:o&&"normal"===a?d.W.View:o&&"winding-order"===a?d.W.WindingOrder:d.W.None,i.instancedColor=r.hasInstancedColor,(0,s.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.vvColor=!!r.vvColor,i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,i.hasMetallicRoughnessTexture=!n&&!!r.metallicRoughnessTextureId,i.emissionSource=n?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,i.hasOcclusionTexture=!n&&!!r.occlusionTextureId,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<v.xt,i.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,n,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(Oe,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case o.RT.Global:s=(0,i.n)(Ie,Oe);break;case o.RT.Local:s=(0,i.c)(Ie,Ce)}let c=0;const l=(0,i.d)(ye,Oe,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,J.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(Re,s,r.transform.inverseRotation),n=(0,i.d)(Me,n,Re),a=(0,i.d)(we,a,Re)}var c;!function(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(H,n,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new b(!1,t.options.normalRequired);if(e.boundingInfo){(0,x.vA)(e.type===_.X.Mesh);const i=t.tolerance;S(e.boundingInfo,r,s,i,o,l,c)}else{const t=e.attributes.get(T.r.POSITION),n=t.indices;!function(e,t,r,n,o,a,s,c,l,d){const u=t,h=F,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,_=u[g]<0?2:1,x=(v+_)%3,T=(v+(3-_))%3,b=u[x]/u[g],A=u[T]/u[g],E=1/u[g],S=C,M=I,w=R,{normalRequired:O}=l;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const l=s*o[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(w,h[2],e);const m=S[x]-b*S[g],p=S[T]-A*S[g],f=M[x]-b*M[g],v=M[T]-A*M[g],_=w[x]-b*w[g],C=w[T]-A*w[g],I=_*v-C*f,R=m*C-p*_,N=f*p-v*m;if((I<0||R<0||N<0)&&(I>0||R>0||N>0))continue;const P=I+R+N;if(0===P)continue;const L=I*(E*S[g])+R*(E*M[g])+N*(E*w[g]);if(L*Math.sign(P)<0)continue;const D=L/P;D>=0&&d(D,t,O?y(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,l,c)}}(e,r,n,a,(c=r.verticalOffset,null!=c?(U.offset=c,U):null),s)}createGLMaterial(e){return new Ee(e)}createBufferWriter(){return new X(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:t,externalColor:[r,i,n,o],layerOpacity:a,texture:s,textureId:c,textureAlphaMode:l,colorMixMode:d}}=this;return e||t<1&&"replace"!==d||o<1&&"ignore"!==d||a<1||(null!=s||null!=c)&&l!==m.sf.Opaque&&l!==m.sf.Mask&&"replace"!==d}}class Ee extends p.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?be:he,e)}}class Se extends ue{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const Me=(0,n.vt)(),we=(0,n.vt)(),Ce=(0,n.fA)(0,0,1),Ie=(0,n.vt)(),Re=(0,n.vt)(),Oe=(0,n.vt)(),ye=(0,n.vt)()},51976:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>c});var i=r(49186),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var a=r(65786);class s extends a.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const n=e.count||2,o=Math.ceil(Math.log2(n)),a=t._parameterBits;let s=0;for(;a[s]+o>16;)s++,s>=a.length&&a.push(0);const c=a[s],l=(1<<o)-1<<c;a[s]+=o,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+t<<c&l,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},52540:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(37585),n=r(48163),o=r(77108),a=r(31821);function s(e){e.uniforms.add(new o.E("zProjectionMap",(e=>function(e){const t=e.projectionMatrix;return(0,i.hZ)(c,t[14],t[10])}(e.camera)))),e.code.add(a.H`float linearizeDepth(float depth) {
588
+ }`)):e.vertex.code.add(n.H`void forwardMetallicRoughnessUV(){}`)}},51768:(e,t,r)=>{r.d(t,{$U:()=>Se});var i=r(38954),o=r(51850),n=r(67222),a=r(24151),s=r(1843),c=r(49255),l=r(96336),d=r(22911),u=r(62602),h=r(59469),m=r(16943),p=r(89192),f=r(25634),v=r(11725),g=r(33524),_=r(70328),x=r(96672),T=r(620),b=r(46540);class A{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const E=(0,_.vt)();function S(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.a)(B,o,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new A(!1,t.options.normalRequired);if(e.boundingInfo){(0,T.vA)(e.type===x.X.Mesh);const i=t.tolerance;w(e.boundingInfo,r,s,i,n,l,c)}else{const t=e.attributes.get(b.r.POSITION),o=t.indices;!function(e,t,r,o,n,a,s,c,l,d){const u=t,h=G,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,_=u[g]<0?2:1,x=(v+_)%3,T=(v+(3-_))%3,b=u[x]/u[g],A=u[T]/u[g],E=1/u[g],S=R,M=O,w=y,{normalRequired:C}=l;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.i)(h[0],a[o+0],a[o+1],a[o+2]);const l=s*n[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*n[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(w,h[2],e);const m=S[x]-b*S[g],p=S[T]-A*S[g],f=M[x]-b*M[g],v=M[T]-A*M[g],_=w[x]-b*w[g],I=w[T]-A*w[g],R=_*v-I*f,O=m*I-p*_,y=f*p-v*m;if((R<0||O<0||y<0)&&(R>0||O>0||y>0))continue;const N=R+O+y;if(0===N)continue;const L=R*(E*S[g])+O*(E*M[g])+y*(E*w[g]);if(L*Math.sign(N)<0)continue;const D=L/N;D>=0&&d(D,t,C?P(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,l,c)}}const M=(0,o.vt)();function w(e,t,r,o,n,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,M);if((0,_.Ne)(E,e.bbMin),(0,_.vI)(E,e.bbMax),null!=n&&n.applyToAabb(E),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(E,t,c,o)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>H){const i=e.getChildren();if(void 0!==i){for(const e of i)w(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let l=n[i],_=n[i+1],x=n[i+2];const T=a*o[r+1];let b=n[T],A=n[T+1],E=n[T+2];const S=a*o[r+2];let M=n[S],w=n[S+1],I=n[S+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[b,A,E]=c.applyToVertex(b,A,E,e),[M,w,I]=c.applyToVertex(M,w,I,e));const R=b-l,O=A-_,y=E-x,P=M-l,L=w-_,D=I-x,H=f*D-L*v,B=v*P-D*p,G=p*L-P*f,z=R*H+O*B+y*G;if(Math.abs(z)<=F)continue;const U=u-l,V=h-_,W=m-x,j=U*H+V*B+W*G;if(z>0){if(j<0||j>z)continue}else if(j>0||j<z)continue;const k=V*y-O*W,Y=W*R-y*U,$=U*O-R*V,q=p*k+f*Y+v*$;if(z>0){if(q<0||j+q>z)continue}else if(q>0||j+q<z)continue;const X=(P*k+L*Y+D*$)/z;X>=0&&d(X,t,g?N(R,O,y,P,L,D,C):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,n,a,s)}}const C=(0,o.vt)();function I(e,t,r,i,o,n,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,p=n*t,f=o[p],v=o[p+1],g=o[p+2],_=n*r,x=n*i,T=o[_]-f,b=o[_+1]-v,A=o[_+2]-g,E=o[x]-f,S=o[x+1]-v,M=o[x+2]-g,w=h*M-S*m,I=m*E-M*u,R=u*S-E*h,O=T*w+b*I+A*R;if(Math.abs(O)<=F)continue;const y=c-f,P=l-v,L=d-g,D=y*w+P*I+L*R;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const H=P*A-b*L,B=L*T-A*y,G=y*b-T*P,z=u*H+h*B+m*G;if(O>0){if(z<0||D+z>O)continue}else if(z>0||D+z<O)continue;const U=(E*H+S*B+M*G)/O;U>=0&&s(U,e,a?N(T,b,A,E,S,M,C):null)}}const R=(0,o.vt)(),O=(0,o.vt)(),y=(0,o.vt)();function N(e,t,r,o,n,a,s){return(0,i.i)(L,e,t,r),(0,i.i)(D,o,n,a),(0,i.e)(s,L,D),(0,i.n)(s,s),s}function P(e){return(0,i.a)(L,e[1],e[0]),(0,i.a)(D,e[2],e[0]),(0,i.e)(C,L,D),(0,i.n)(C,C),C}const L=(0,o.vt)(),D=(0,o.vt)(),H=1e3,F=1e-7,B=(0,o.vt)(),G=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var z=r(13464),U=(r(77690),r(29242),r(58083),r(9093),r(97937)),V=r(57005);const W=new class{constructor(e=0){this.offset=e,this.sphere=(0,U.c)(),this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.i)(j,e,t,r),a=(0,i.t)(n,n,o),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const o=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,U.a)(e)),r=this.offset/t;return(0,i.b)((0,U.a)(this.sphere),(0,U.a)(e),(0,U.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=(0,U.c)(),this._tmpObb=new V.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const o=(0,i.i)(j,e,t,r),n=(0,i.i)(k,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(n);return(0,i.b)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*n))*Math.min(c,u),f=.5*(1+Math.sign(i*a))*Math.min(l,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(c,u),_=Math.max(l,h),x=Math.max(d,m),T=Math.sqrt(p*p+f*f+v*v),b=Math.sign(c+r),A=Math.sign(l+i),E=Math.sign(d+o),S=Math.sign(u+n),M=Math.sign(h+a),w=Math.sign(m+s),C=this._totalOffset;if(T<C)return e[0]-=(1-b)*C,e[1]-=(1-A)*C,e[2]-=(1-E)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=w*C,e;const I=C/Math.sqrt(g*g+_*_+x*x),R=C/T,O=R-I,y=-O;return e[0]+=r*(b*y+R),e[1]+=i*(A*y+R),e[2]+=o*(E*y+R),e[3]+=n*(S*O+I),e[4]+=a*(M*O+I),e[5]+=s*(w*O+I),e}applyToMbs(e){const t=(0,i.l)((0,U.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,U.a)(this._tmpMbs),(0,U.a)(e),(0,U.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,V.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.i)(j,e,t,r),n=(0,i.g)(k,o,this.localOrigin),a=this.offset/(0,i.l)(n);return(0,i.b)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=Y,r=$,i=q;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const j=(0,o.vt)(),k=(0,o.vt)(),Y=(0,o.vt)(),$=(0,o.vt)(),q=(0,o.vt)();var X=r(13030),Z=r(59907);class J{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(b.r.POSITION).indices.length}write(e,t,r,i,o,n){return(0,Z.SA)(r,i,this.vertexBufferLayout,e,t,o,n)}intersect(e,t,r,o,n,a,s){const c=this.vertexBufferLayout.createView(e).getField(b.r.POSITION,X.xs);if(null==c)return;const l=(0,i.a)(K,a,n),d=c.count/3,u=o.options.normalRequired;I(n,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const K=(0,o.vt)();var Q=r(43616),ee=r(91829),te=r(72824),re=r(97220),ie=r(98958),oe=r(59643),ne=r(63907);ne.MT.LESS,ne.MT.ALWAYS;const ae={mask:255},se={function:{func:ne.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:ne.eA.KEEP,zFail:ne.eA.KEEP,zPass:ne.eA.ZERO}},ce={function:{func:ne.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:ne.eA.KEEP,zFail:ne.eA.KEEP,zPass:ne.eA.REPLACE}};ne.MT.EQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,ne.eA.KEEP,ne.eA.KEEP,ne.eA.KEEP,ne.MT.NOTEQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,ne.eA.KEEP,ne.eA.KEEP,ne.eA.KEEP;var le=r(74810),de=r(28491),ue=r(90644),he=r(49788);class me extends te.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=le.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=p.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveStrength=0,this.emissiveSource=n.YJ.Color,this.emissiveBaseColor=o.uY,this.instancedDoublePrecision=!1,this.normalType=l.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,o.CN)(.2,.2,.2),this.diffuse=(0,o.CN)(.8,.8,.8),this.externalColor=(0,ee.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,o.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=p.it.Less,this.textureAlphaMode=p.sf.Blend,this.textureAlphaCutoff=he.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=v.m$.Occlude,this.isDecoration=!1}}te.gy;class pe extends ie.w{constructor(e,t,i=new re.$(de.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:s,enableOffset:l}=e,d=r===oe.Y.NONE,u=r===oe.Y.FrontFace;return(0,ue.Ey)({blending:(0,c.RN)(i)&&o?(0,g.Yf)(r):null,culling:ve(e)?(0,ue.Xt)(n):null,depthTest:{func:(0,g.K_)(r,fe(a))},depthWrite:(0,g.z5)(e),drawBuffers:i===c.V.Depth?{buffers:[ne.Hr.NONE]}:(0,g.m6)(r,i),colorWrite:ue.kn,stencilWrite:s?ae:null,stencilTest:s?t?ce:se:null,polygonOffset:d||u?null:(0,g.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function fe(e){return e===p.it.Lequal?ne.MT.LEQUAL:ne.MT.LESS}function ve(e){return e.cullFace!==p.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}var ge=r(90237),_e=r(53466),xe=r(51976),Te=r(35256);class be extends Te.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=p.sf.Opaque,this.doubleSidedMode=u.W.None,this.pbrMode=h.A9.Disabled,this.cullFace=p.s2.None,this.normalType=l.W.Attribute,this.customDepthTest=p.it.Less,this.emissionSource=d.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===d.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?_e.I.Default:_e.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge._)([(0,xe.W)({count:p.sf.COUNT})],be.prototype,"alphaDiscardMode",void 0),(0,ge._)([(0,xe.W)({count:u.W.COUNT})],be.prototype,"doubleSidedMode",void 0),(0,ge._)([(0,xe.W)({count:h.A9.COUNT})],be.prototype,"pbrMode",void 0),(0,ge._)([(0,xe.W)({count:p.s2.COUNT})],be.prototype,"cullFace",void 0),(0,ge._)([(0,xe.W)({count:l.W.COUNT})],be.prototype,"normalType",void 0),(0,ge._)([(0,xe.W)({count:p.it.COUNT})],be.prototype,"customDepthTest",void 0),(0,ge._)([(0,xe.W)({count:d.ZX.COUNT})],be.prototype,"emissionSource",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasVertexColors",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasSymbolColors",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasVerticalOffset",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasColorTexture",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasOcclusionTexture",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasNormalTexture",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasScreenSizePerspective",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasVertexTangents",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasOccludees",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"instancedDoublePrecision",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasModelTransformation",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"offsetBackfaces",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"vvSize",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"vvColor",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"receiveShadows",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"receiveAmbientOcclusion",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"textureAlphaPremultiplied",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"instanced",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"instancedColor",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"writeDepth",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"transparent",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"enableOffset",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"terrainDepthTest",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"cullAboveTerrain",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"snowCover",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasColorTextureTransform",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasEmissionTextureTransform",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasNormalTextureTransform",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasOcclusionTextureTransform",void 0),(0,ge._)([(0,xe.W)()],be.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Ae=r(57323);class Ee extends pe{constructor(e,t){super(e,t,new re.$(Ae.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}class Se extends v.im{constructor(e,t){super(e,we),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[z.N.OPAQUE_MATERIAL,e=>((0,c.iq)(e)||(0,c.PJ)(e))&&!this.transparent],[z.N.TRANSPARENT_MATERIAL,e=>((0,c.iq)(e)||(0,c.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[z.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,c.XY)(e)||(0,c.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,s.BP)().vec3f(b.r.POSITION);return e.normalType===l.W.Compressed?t.vec2i16(b.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(b.r.NORMAL),e.hasVertexTangents&&t.vec4f(b.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f16(b.r.UV0),e.hasVertexColors&&t.vec4u8(b.r.COLOR),e.hasSymbolColors&&t.vec4u8(b.r.SYMBOLCOLOR),(0,m.E)()&&t.vec4u8(b.r.OLIDCOLOR),t}(this.parameters),this._configuration=new be(t.spherical)}isVisibleForOutput(e){return e!==c.V.Shadow&&e!==c.V.ShadowExcludeHighlight&&e!==c.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=he.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveBaseColor,o.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===n.YJ.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===n.YJ.Color)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:o,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=!o&&!!r.normalTextureId,i.hasColorTexture=!!r.textureId,i.hasVertexTangents=!o&&r.hasVertexTangents,i.instanced=r.isInstanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.vvSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=o?l.W.Attribute:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,null!=r.customDepthTest&&(i.customDepthTest=r.customDepthTest),i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?p.s2.None:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!o&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=o?u.W.WindingOrder:a&&"normal"===s?u.W.View:a&&"winding-order"===s?u.W.WindingOrder:u.W.None,i.instancedColor=r.hasInstancedColor,(0,c.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.vvColor=!!r.vvColor,i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?h.A9.Schematic:h.A9.Normal:h.A9.Disabled,i.hasMetallicRoughnessTexture=!o&&!!r.metallicRoughnessTextureId,i.emissionSource=o?d.ZX.None:null!=r.emissiveTextureId&&r.emissiveSource===n.YJ.Emissive?d.ZX.Texture:r.usePBR?r.emissiveSource===n.YJ.Emissive?d.ZX.EmissiveColor:d.ZX.SymbolColor:d.ZX.None,i.hasOcclusionTexture=!o&&!!r.occlusionTextureId,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<g.xt,i.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,o,n,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(Ne,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case a.RT.Global:s=(0,i.n)(Oe,Ne);break;case a.RT.Local:s=(0,i.c)(Oe,Re)}let c=0;const l=(0,i.d)(Pe,Ne,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,Q.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(ye,s,r.transform.inverseRotation),o=(0,i.d)(Ce,o,ye),n=(0,i.d)(Ie,n,ye)}var c;S(e,r,o,n,null!=(c=r.verticalOffset)?(W.offset=c,W):null,s)}createGLMaterial(e){return new Me(e)}createBufferWriter(){return new J(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:t,externalColor:[r,i,o,n],layerOpacity:a,texture:s,textureId:c,textureAlphaMode:l,colorMixMode:d}}=this;return e||t<1&&"replace"!==d||n<1&&"ignore"!==d||a<1||(null!=s||null!=c)&&l!==p.sf.Opaque&&l!==p.sf.Mask&&"replace"!==d}}class Me extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Ee:pe,e)}}class we extends me{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const Ce=(0,o.vt)(),Ie=(0,o.vt)(),Re=(0,o.fA)(0,0,1),Oe=(0,o.vt)(),ye=(0,o.vt)(),Ne=(0,o.vt)(),Pe=(0,o.vt)()},51976:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>c});var i=r(49186),o=r(4576);class n{constructor(e){this._bits=[...e]}equals(e){return(0,o.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var a=r(65786);class s extends a.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new n(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const o=e.count||2,n=Math.ceil(Math.log2(o)),a=t._parameterBits;let s=0;for(;a[s]+n>16;)s++,s>=a.length&&a.push(0);const c=a[s],l=(1<<n)-1<<c;a[s]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+t<<c&l,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},52540:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(37585),o=r(48163),n=r(77108),a=r(31821);function s(e){e.uniforms.add(new n.E("zProjectionMap",(e=>function(e){const t=e.projectionMatrix;return(0,i.hZ)(c,t[14],t[10])}(e.camera)))),e.code.add(a.H`float linearizeDepth(float depth) {
592
589
  float depthNdc = depth * 2.0 - 1.0;
593
590
  float c1 = zProjectionMap[0];
594
591
  float c2 = zProjectionMap[1];
@@ -599,7 +596,7 @@ float depth = texelFetch(depthTexture, iuv, 0).r;
599
596
  return depth;
600
597
  }`),e.code.add(a.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
601
598
  return linearizeDepth(depthFromTexture(depthTexture, uv));
602
- }`)}const c=(0,n.vt)()},52587:(e,t,r)=>{r.d(t,{OH:()=>l,Y6:()=>s,pM:()=>c});var i=r(38954),n=r(51850),o=r(33079),a=r(31821);function s(e){e.vertex.code.add(a.H`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) {
599
+ }`)}const c=(0,o.vt)()},52587:(e,t,r)=>{r.d(t,{OH:()=>l,Y6:()=>s,pM:()=>c});var i=r(38954),o=r(51850),n=r(33079),a=r(31821);function s(e){e.vertex.code.add(a.H`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) {
603
600
  return absCosAngle * absCosAngle * absCosAngle;
604
601
  }`),e.vertex.code.add(a.H`vec3 screenSizePerspectiveScaleFactor(float absCosAngle, float distanceToCamera, vec3 params) {
605
602
  return vec3(
@@ -618,17 +615,17 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
618
615
  return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y);
619
616
  }`),e.vertex.code.add(a.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
620
617
  return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
621
- }`)}function c(e){e.uniforms.add(new o.t("screenSizePerspective",(e=>d(e.screenSizePerspective))))}function l(e){e.uniforms.add(new o.t("screenSizePerspectiveAlignment",(e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function d(e){return(0,i.i)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,n.vt)()},53466:(e,t,r)=>{r.d(t,{I:()=>i,U:()=>c});var i,n,o=r(21818),a=r(31821),s=r(46540);function c(e,t){switch(t.textureCoordinateType){case i.Default:return e.attributes.add(s.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case i.Atlas:return e.attributes.add(s.r.UV0,"vec2"),e.attributes.add(s.r.UVREGION,"vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() {
618
+ }`)}function c(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>d(e.screenSizePerspective))))}function l(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function d(e){return(0,i.i)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,o.vt)()},53466:(e,t,r)=>{r.d(t,{I:()=>i,U:()=>c});var i,o,n=r(21818),a=r(31821),s=r(46540);function c(e,t){switch(t.textureCoordinateType){case i.Default:return e.attributes.add(s.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case i.Atlas:return e.attributes.add(s.r.UV0,"vec2"),e.attributes.add(s.r.UVREGION,"vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() {
622
619
  vuv0 = uv0;
623
620
  vuvRegion = uvRegion;
624
- }`);default:(0,o.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.COUNT=3]="COUNT"},54849:(e,t,r)=>{r.d(t,{n:()=>V});var i,n,o,a=r(31821),s=r(12791),c=r(90237),l=r(34727),d=r(97768),u=r(36708),h=r(78659),m=r(10107),p=(r(44208),r(53966),r(87811),r(40608)),f=r(37585);r(9093),r(48353),r(9762),(o=i||(i={})).OPAQUE="opaque-color",o.TRANSPARENT="transparent-color",o.COMPOSITE="composite-color",o.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(n||(n={}));var v,g,_=r(63907);(g=v||(v={}))[g.R8=33321]="R8",g[g.R8UI=33330]="R8UI",g[g.RG8=33323]="RG8",g[g.RG8UI=33336]="RG8UI",g[g.RGBA4=32854]="RGBA4",g[g.RGBA8=32856]="RGBA8",g[g.RGBA8_MIPMAP=42843]="RGBA8_MIPMAP",g[g.R16F=33325]="R16F",g[g.RGBA16F=34842]="RGBA16F",_.SB.DEPTH_COMPONENT16;var x=r(69622),T=r(49186),b=r(89192);let A=class extends x.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,u.wB)((()=>this.view.ready),(e=>{e&&this.view.stage?.renderer.addRenderNode(this)}),u.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new T.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 t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===b.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),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}}};(0,c._)([(0,m.MZ)({constructOnly:!0})],A.prototype,"view",void 0),(0,c._)([(0,m.MZ)({constructOnly:!0})],A.prototype,"consumes",void 0),(0,c._)([(0,m.MZ)()],A.prototype,"produces",void 0),(0,c._)([(0,m.MZ)({readOnly:!0})],A.prototype,"techniques",null),A=(0,c._)([(0,p.$)("esri.views.3d.webgl.RenderNode")],A);const E=A;var S=r(97220),M=r(98958),w=r(95774),C=r(90644);class I extends M.w{constructor(e,t){super(e,t,new S.$(w.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}}var R=r(48163),O=r(65786);class y extends O.Y{constructor(){super(...arguments),this.projScale=1}}class N extends y{constructor(){super(...arguments),this.intensity=1}}class P extends O.Y{}class L extends P{constructor(){super(...arguments),this.blurSize=(0,R.vt)()}}var D=r(15581);class H extends M.w{constructor(e,t){super(e,t,new S.$(D.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}}var F=r(30164),B=r(67171);const G=2;let z=class extends E{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new N,this._drawParameters=new L}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new B.R;t.wrapMode=_.pF.CLAMP_TO_EDGE,t.pixelFormat=_.Ab.RGB,t.wrapMode=_.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new F.g(this.renderingContext,t,e),this.techniques.precompile(H),this.techniques.precompile(I),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture)}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),i=r?.getTexture(),o=r?.getTexture(_.nI),a=this.fboCache,s=t.camera,c=s.fullViewport[2],d=s.fullViewport[3],u=Math.round(c/G),m=Math.round(d/G),p=this.techniques.get(H),g=this.techniques.get(I);if(!p.compiled||!g.compiled)return this._enableTime=(0,h.l5)(performance.now()),this.requestRender(b.C7.UPDATE),a.acquire(u,m,n.SSAO,v.R8);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const x=this.renderingContext,T=this.view.qualitySettings.fadeDuration,A=s.relativeElevation,E=(0,l.qE)((5e5-A)/2e5,0,1),S=T>0?Math.min(T,performance.now()-this._enableTime)/T:1,M=S*E;this._passParameters.normalTexture=i,this._passParameters.depthTexture=o,this._passParameters.projScale=1/s.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*U/(0,D.g)(s)**6*M;const w=a.acquire(c,d,"ssao input",v.RG8);x.bindFramebuffer(w.fbo),x.setViewport(0,0,c,d),x.bindTechnique(p,t,this._passParameters,this._drawParameters),x.screen.draw();const C=a.acquire(u,m,"ssao blur",v.R8);x.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=w.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,0,G/d),x.bindTechnique(g,t,this._passParameters,this._drawParameters),x.setViewport(0,0,u,m),x.screen.draw(),w.release();const R=a.acquire(u,m,n.SSAO,v.R8);return x.bindFramebuffer(R.fbo),x.setViewport(0,0,c,d),x.setClearColor(1,1,1,0),x.clear(_.NV.COLOR),this._drawParameters.colorTexture=C.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,G/c,0),x.bindTechnique(g,t,this._passParameters,this._drawParameters),x.setViewport(0,0,u,m),x.screen.draw(),x.setViewport4fv(s.fullViewport),C.release(),S<1&&this.requestRender(b.C7.UPDATE),R}};(0,c._)([(0,m.MZ)()],z.prototype,"consumes",void 0),(0,c._)([(0,m.MZ)()],z.prototype,"produces",void 0),(0,c._)([(0,m.MZ)({constructOnly:!0})],z.prototype,"isEnabled",void 0),z=(0,c._)([(0,p.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],z);const U=.5;function V(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new s.x("ssaoTex",(e=>e.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/G),r.code.add(a.H`float evaluateAmbientOcclusionInverse() {
621
+ }`);default:(0,n.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(o=i||(i={}))[o.None=0]="None",o[o.Default=1]="Default",o[o.Atlas=2]="Atlas",o[o.COUNT=3]="COUNT"},54849:(e,t,r)=>{r.d(t,{n:()=>V});var i,o,n,a=r(31821),s=r(12791),c=r(90237),l=r(34727),d=r(97768),u=r(36708),h=r(78659),m=r(10107),p=(r(44208),r(53966),r(87811),r(40608)),f=r(37585);r(9093),r(48353),r(9762),(n=i||(i={})).OPAQUE="opaque-color",n.TRANSPARENT="transparent-color",n.COMPOSITE="composite-color",n.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(o||(o={}));var v,g,_=r(63907);(g=v||(v={}))[g.R8=33321]="R8",g[g.R8UI=33330]="R8UI",g[g.RG8=33323]="RG8",g[g.RG8UI=33336]="RG8UI",g[g.RGBA4=32854]="RGBA4",g[g.RGBA8=32856]="RGBA8",g[g.RGBA8_MIPMAP=42843]="RGBA8_MIPMAP",g[g.R16F=33325]="R16F",g[g.RGBA16F=34842]="RGBA16F",_.SB.DEPTH_COMPONENT16;var x=r(69622),T=r(49186),b=r(89192);let A=class extends x.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,u.wB)((()=>this.view.ready),(e=>{e&&this.view.stage?.renderer.addRenderNode(this)}),u.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new T.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 t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===b.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),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}}};(0,c._)([(0,m.MZ)({constructOnly:!0})],A.prototype,"view",void 0),(0,c._)([(0,m.MZ)({constructOnly:!0})],A.prototype,"consumes",void 0),(0,c._)([(0,m.MZ)()],A.prototype,"produces",void 0),(0,c._)([(0,m.MZ)({readOnly:!0})],A.prototype,"techniques",null),A=(0,c._)([(0,p.$)("esri.views.3d.webgl.RenderNode")],A);const E=A;var S=r(97220),M=r(98958),w=r(95774),C=r(90644);class I extends M.w{constructor(e,t){super(e,t,new S.$(w.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}}var R=r(48163),O=r(65786);class y extends O.Y{constructor(){super(...arguments),this.projScale=1}}class N extends y{constructor(){super(...arguments),this.intensity=1}}class P extends O.Y{}class L extends P{constructor(){super(...arguments),this.blurSize=(0,R.vt)()}}var D=r(15581);class H extends M.w{constructor(e,t){super(e,t,new S.$(D.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}}var F=r(76284),B=r(67171);const G=2;let z=class extends E{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new N,this._drawParameters=new L}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new B.R;t.wrapMode=_.pF.CLAMP_TO_EDGE,t.pixelFormat=_.Ab.RGB,t.wrapMode=_.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new F.g(this.renderingContext,t,e),this.techniques.precompile(H),this.techniques.precompile(I),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture)}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),i=r?.getTexture(),n=r?.getTexture(_.nI),a=this.fboCache,s=t.camera,c=s.fullViewport[2],d=s.fullViewport[3],u=Math.round(c/G),m=Math.round(d/G),p=this.techniques.get(H),g=this.techniques.get(I);if(!p.compiled||!g.compiled)return this._enableTime=(0,h.l5)(performance.now()),this.requestRender(b.C7.UPDATE),a.acquire(u,m,o.SSAO,v.R8);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const x=this.renderingContext,T=this.view.qualitySettings.fadeDuration,A=s.relativeElevation,E=(0,l.qE)((5e5-A)/2e5,0,1),S=T>0?Math.min(T,performance.now()-this._enableTime)/T:1,M=S*E;this._passParameters.normalTexture=i,this._passParameters.depthTexture=n,this._passParameters.projScale=1/s.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*U/(0,D.g)(s)**6*M;const w=a.acquire(c,d,"ssao input",v.RG8);x.bindFramebuffer(w.fbo),x.setViewport(0,0,c,d),x.bindTechnique(p,t,this._passParameters,this._drawParameters),x.screen.draw();const C=a.acquire(u,m,"ssao blur",v.R8);x.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=w.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,0,G/d),x.bindTechnique(g,t,this._passParameters,this._drawParameters),x.setViewport(0,0,u,m),x.screen.draw(),w.release();const R=a.acquire(u,m,o.SSAO,v.R8);return x.bindFramebuffer(R.fbo),x.setViewport(0,0,c,d),x.setClearColor(1,1,1,0),x.clear(_.NV.COLOR),this._drawParameters.colorTexture=C.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,G/c,0),x.bindTechnique(g,t,this._passParameters,this._drawParameters),x.setViewport(0,0,u,m),x.screen.draw(),x.setViewport4fv(s.fullViewport),C.release(),S<1&&this.requestRender(b.C7.UPDATE),R}};(0,c._)([(0,m.MZ)()],z.prototype,"consumes",void 0),(0,c._)([(0,m.MZ)()],z.prototype,"produces",void 0),(0,c._)([(0,m.MZ)({constructOnly:!0})],z.prototype,"isEnabled",void 0),z=(0,c._)([(0,p.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],z);const U=.5;function V(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new s.x("ssaoTex",(e=>e.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/G),r.code.add(a.H`float evaluateAmbientOcclusionInverse() {
625
622
  vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
626
623
  return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
627
624
  }
628
625
  float evaluateAmbientOcclusion() {
629
626
  return 1.0 - evaluateAmbientOcclusionInverse();
630
627
  }`)):r.code.add(a.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
631
- float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()=>H,b:()=>D});var i=r(46686),n=r(32680),o=r(49255),a=r(76591),s=r(76597),c=r(60864),l=r(96336),d=r(71955),u=r(53466),h=r(92700),m=r(35640),p=r(40261),f=r(54849),v=r(74081),g=r(98619),_=r(22393),x=r(59469),T=r(25618),b=r(96598),A=r(42398),E=r(11955),S=r(27950),M=r(20693),w=r(33079),C=r(71988),I=r(20304),R=r(31821),O=r(63761),y=r(46540),N=r(60517),P=r(14113),L=r(49788);function D(e){const t=new P.N5,{attributes:r,vertex:D,fragment:H,varyings:F}=t,{output:B,offsetBackfaces:G,instancedColor:z,pbrMode:U,snowCover:V,spherical:W}=e,j=U===x.A9.Normal||U===x.A9.Schematic;if((0,M.NB)(D,e),r.add(y.r.POSITION,"vec3"),F.add("vpos","vec3",{invariant:!0}),t.include(A.A,e),t.include(c.B,e),t.include(m.G,e),t.include(b.Z,e),(0,o.RN)(B)&&((0,M.yu)(t.vertex,e),t.include(l.Y,e),t.include(s.d,e),G&&t.include(n.M),z&&t.attributes.add(y.r.INSTANCECOLOR,"vec4"),F.add("vNormalWorld","vec3"),F.add("localvpos","vec3",{invariant:!0}),t.include(u.U,e),t.include(i.oD,e),t.include(d.K,e),t.include(h.c,e),D.uniforms.add(new C.E("externalColor",(e=>e.externalColor))),F.add("vcolorExt","vec4"),D.main.add(R.H`
628
+ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()=>H,b:()=>D});var i=r(46686),o=r(32680),n=r(49255),a=r(76591),s=r(76597),c=r(60864),l=r(96336),d=r(71955),u=r(53466),h=r(92700),m=r(35640),p=r(40261),f=r(54849),v=r(74081),g=r(98619),_=r(22393),x=r(59469),T=r(25618),b=r(96598),A=r(42398),E=r(58614),S=r(27950),M=r(20693),w=r(33079),C=r(71988),I=r(20304),R=r(31821),O=r(63761),y=r(46540),N=r(60517),P=r(14113),L=r(49788);function D(e){const t=new P.N5,{attributes:r,vertex:D,fragment:H,varyings:F}=t,{output:B,offsetBackfaces:G,instancedColor:z,pbrMode:U,snowCover:V,spherical:W}=e,j=U===x.A9.Normal||U===x.A9.Schematic;if((0,M.NB)(D,e),r.add(y.r.POSITION,"vec3"),F.add("vpos","vec3",{invariant:!0}),t.include(A.A,e),t.include(c.B,e),t.include(m.G,e),t.include(b.Z,e),(0,n.RN)(B)&&((0,M.yu)(t.vertex,e),t.include(l.Y,e),t.include(s.d,e),G&&t.include(o.M),z&&t.attributes.add(y.r.INSTANCECOLOR,"vec4"),F.add("vNormalWorld","vec3"),F.add("localvpos","vec3",{invariant:!0}),t.include(u.U,e),t.include(i.oD,e),t.include(d.K,e),t.include(h.c,e),D.uniforms.add(new C.E("externalColor",(e=>e.externalColor))),F.add("vcolorExt","vec4"),D.main.add(R.H`
632
629
  forwardNormalizedVertexColor();
633
630
  vcolorExt = externalColor;
634
631
  ${(0,R.If)(z,"vcolorExt *= instanceColor * 0.003921568627451;")}
@@ -650,7 +647,7 @@ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()
650
647
 
651
648
  gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
652
649
  ${(0,R.If)(G,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
653
- `)),(0,o.RN)(B)){const{hasColorTexture:r,hasColorTextureTransform:i,receiveShadows:n}=e;t.include(v.kA,e),t.include(f.n,e),t.include(E.S,e),t.include(e.instancedDoublePrecision?T.G:T.Bz,e),t.fragment.include(a.HQ,e),t.include(N.z,e),(0,M.yu)(t.fragment,e),(0,g.Gc)(H),(0,v.a8)(H),(0,v.eU)(H),H.uniforms.add(D.uniforms.get("localOrigin"),D.uniforms.get("view"),new w.t("ambient",(e=>e.ambient)),new w.t("diffuse",(e=>e.diffuse)),new I.m("opacity",(e=>e.opacity)),new I.m("layerOpacity",(e=>e.layerOpacity))),r&&H.uniforms.add(new O.N("tex",(e=>e.texture))),t.include(x._Z,e),t.include(_.c,e),H.include(S.N),(0,g.O4)(H),H.main.add(R.H`
650
+ `)),(0,n.RN)(B)){const{hasColorTexture:r,hasColorTextureTransform:i,receiveShadows:o}=e;t.include(v.kA,e),t.include(f.n,e),t.include(E.S,e),t.include(e.instancedDoublePrecision?T.G:T.Bz,e),t.fragment.include(a.HQ,e),t.include(N.z,e),(0,M.yu)(t.fragment,e),(0,g.Gc)(H),(0,v.a8)(H),(0,v.eU)(H),H.uniforms.add(D.uniforms.get("localOrigin"),D.uniforms.get("view"),new w.t("ambient",(e=>e.ambient)),new w.t("diffuse",(e=>e.diffuse)),new I.m("opacity",(e=>e.opacity)),new I.m("layerOpacity",(e=>e.layerOpacity))),r&&H.uniforms.add(new O.N("tex",(e=>e.texture))),t.include(x._Z,e),t.include(_.c,e),H.include(S.N),(0,g.O4)(H),H.main.add(R.H`
654
651
  discardBySlice(vpos);
655
652
  discardByTerrainDepth();
656
653
  vec4 texColor = ${r?`texture(tex, ${i?"colorUV":"vuv0"})`:" vec4(1.0)"};
@@ -662,7 +659,7 @@ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()
662
659
 
663
660
  float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
664
661
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
665
- float shadow = ${n?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":W?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
662
+ float shadow = ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":W?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
666
663
  vec3 matColor = max(ambient, diffuse);
667
664
  ${e.hasVertexColors?R.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
668
665
  float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:R.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
@@ -679,15 +676,19 @@ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()
679
676
  ${(0,R.If)(j,`vec3 normalGround = ${W?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
680
677
  ${j?R.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
681
678
  ${(0,R.If)(V,R.H`mrr = vec3(0.0, 1.0, 0.04);`)}
682
- vec4 emission = ${V?"vec4(0.0)":"getEmissions()"};
679
+ vec4 emission = ${V?"vec4(0.0)":"getEmissions(albedo)"};
683
680
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:R.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
684
681
  vec4 finalColor = vec4(shadedColor, opacity_);
685
- outputColorHighlightOID(finalColor, vpos);`)}return t.include(p.E,e),t}const H=Object.freeze(Object.defineProperty({__proto__:null,build:D},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>o});var i=r(34275),n=r(20498);function o(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,n.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},59469:(e,t,r)=>{r.d(t,{A9:()=>i,_Z:()=>m});var i,n,o=r(99208),a=r(40710),s=r(33079),c=r(31821),l=r(15976),d=r(63761),u=(r(74810),r(69270)),h=r(65786);function m(e,t){const r=t.pbrMode,n=e.fragment;if(r!==i.Schematic&&r!==i.Disabled&&r!==i.Normal)return void n.code.add(c.H`void applyPBRFactors() {}`);if(r===i.Disabled)return void n.code.add(c.H`void applyPBRFactors() {}
686
- float getBakedOcclusion() { return 1.0; }`);if(r===i.Schematic)return void n.code.add(c.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
682
+ outputColorHighlightOID(finalColor, vpos, albedo);`)}return t.include(p.E,e),t}const H=Object.freeze(Object.defineProperty({__proto__:null,build:D},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275),o=r(20498);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,o.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},58614:(e,t,r)=>{r.d(t,{S:()=>s}),r(28421);var i=r(20304),o=r(31821),n=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===n.sf.Blend;s!==n.sf.Mask&&s!==n.sf.MaskBlend||i.uniforms.add(r),i.code.add(o.H`
683
+ void discardOrAdjustAlpha(inout vec4 color) {
684
+ ${s===n.sf.Opaque?"color.a = 1.0;":`if (color.a < ${c?o.H.float(a.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,o.If)(s===n.sf.Mask,"else { color.a = 1.0; }")}`}
685
+ }
686
+ `)}(e,t,new i.m("textureAlphaCutoff",(e=>e.textureAlphaCutoff)))}},59469:(e,t,r)=>{r.d(t,{A9:()=>i,_Z:()=>m});var i,o,n=r(99208),a=r(40710),s=r(33079),c=r(31821),l=r(15976),d=r(63761),u=(r(74810),r(69270)),h=r(65786);function m(e,t){const r=t.pbrMode,o=e.fragment;if(r!==i.Schematic&&r!==i.Disabled&&r!==i.Normal)return void o.code.add(c.H`void applyPBRFactors() {}`);if(r===i.Disabled)return void o.code.add(c.H`void applyPBRFactors() {}
687
+ float getBakedOcclusion() { return 1.0; }`);if(r===i.Schematic)return void o.code.add(c.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
687
688
  float occlusion = 1.0;
688
689
  void applyPBRFactors() {}
689
- float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:h,hasMetallicRoughnessTextureTransform:m,hasOcclusionTexture:p,hasOcclusionTextureTransform:f,bindType:v}=t;(h||p)&&e.include(o.r,t),n.code.add(c.H`vec3 mrr;
690
- float occlusion;`),h&&n.uniforms.add(v===u.c.Pass?new d.N("texMetallicRoughness",(e=>e.textureMetallicRoughness)):new l.o("texMetallicRoughness",(e=>e.textureMetallicRoughness))),p&&n.uniforms.add(v===u.c.Pass?new d.N("texOcclusion",(e=>e.textureOcclusion)):new l.o("texOcclusion",(e=>e.textureOcclusion))),n.uniforms.add(v===u.c.Pass?new s.t("mrrFactors",(e=>e.mrrFactors)):new a.W("mrrFactors",(e=>e.mrrFactors))),n.code.add(c.H`
690
+ float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:h,hasMetallicRoughnessTextureTransform:m,hasOcclusionTexture:p,hasOcclusionTextureTransform:f,bindType:v}=t;(h||p)&&e.include(n.r,t),o.code.add(c.H`vec3 mrr;
691
+ float occlusion;`),h&&o.uniforms.add(v===u.c.Pass?new d.N("texMetallicRoughness",(e=>e.textureMetallicRoughness)):new l.o("texMetallicRoughness",(e=>e.textureMetallicRoughness))),p&&o.uniforms.add(v===u.c.Pass?new d.N("texOcclusion",(e=>e.textureOcclusion)):new l.o("texOcclusion",(e=>e.textureOcclusion))),o.uniforms.add(v===u.c.Pass?new s.t("mrrFactors",(e=>e.mrrFactors)):new a.W("mrrFactors",(e=>e.mrrFactors))),o.code.add(c.H`
691
692
  ${(0,c.If)(h,c.H`void applyMetallicRoughness(vec2 uv) {
692
693
  vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
693
694
  mrr[0] *= metallicRoughness.b;
@@ -707,8 +708,8 @@ float occlusion;`),h&&n.uniforms.add(v===u.c.Pass?new d.N("texMetallicRoughness"
707
708
  ${(0,c.If)(h,`applyMetallicRoughness(${m?"metallicRoughnessUV":"vuv0"});`)}
708
709
  ${(0,c.If)(p,`applyOcclusion(${f?"occlusionUV":"vuv0"});`)}
709
710
  }
710
- `)}(n=i||(i={}))[n.Disabled=0]="Disabled",n[n.Normal=1]="Normal",n[n.Schematic=2]="Schematic",n[n.Water=3]="Water",n[n.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",n[n.Simplified=5]="Simplified",n[n.TerrainWithWater=6]="TerrainWithWater",n[n.COUNT=7]="COUNT",h.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.NONE=0]="NONE",e[e.ColorAlpha=1]="ColorAlpha",e[e.FrontFace=2]="FrontFace",e[e.COUNT=3]="COUNT"}(i||(i={}))},59907:(e,t,r)=>{r.d(t,{Hk:()=>p,Pq:()=>m,SA:()=>x,Ut:()=>h,p1:()=>f,tb:()=>v,uO:()=>l,vx:()=>_});var i=r(34275),n=(r(38954),r(51850)),o=r(58083),a=r(13030),s=r(620),c=r(46540);function l(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,1===i)for(let e=0;e<c;++e)a[r]=n[o[e]],r+=s;else for(let e=0;e<c;++e){const t=n[o[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function d(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function u(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function h(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}function m(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride;t*=n;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=n}function p(e,t,r,i,n=1){if(!t)return void u(e,r,i,n);const{data:a,indices:s}=e,c=r.typedBuffer,l=r.typedBufferStride,d=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],T=t[10],b=t[12],A=t[13],E=t[14];i*=l;let S=0,M=0,w=0;const C=(0,o.tZ)(t)?e=>{S=a[e]+b,M=a[e+1]+A,w=a[e+2]+E}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=h*t+f*r+_*i+b,M=m*t+v*r+x*i+A,w=p*t+g*r+T*i+E};if(1===n)for(let e=0;e<d;++e)C(3*s[e]),c[i]=S,c[i+1]=M,c[i+2]=w,i+=l;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<n;++e)c[i]=S,c[i+1]=M,c[i+2]=w,i+=l}}function f(e,t,r,i,n=1){if(!t)return void u(e,r,i,n);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=s.length,m=c[0],p=c[1],f=c[2],v=c[4],g=c[5],_=c[6],x=c[8],T=c[9],b=c[10],A=!(0,o.ut)(c),E=1e-6,S=1-E;i*=d;let M=0,w=0,C=0;const I=(0,o.tZ)(c)?e=>{M=a[e],w=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];M=m*t+v*r+x*i,w=p*t+g*r+T*i,C=f*t+_*r+b*i};if(1===n)if(A)for(let e=0;e<h;++e){I(3*s[e]);const t=M*M+w*w+C*C;if(t<S&&t>E){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=w*e,l[i+2]=C*e}else l[i]=M,l[i+1]=w,l[i+2]=C;i+=d}else for(let e=0;e<h;++e)I(3*s[e]),l[i]=M,l[i+1]=w,l[i+2]=C,i+=d;else for(let e=0;e<h;++e){if(I(3*s[e]),A){const e=M*M+w*w+C*C;if(e<S&&e>E){const t=1/Math.sqrt(e);M*=t,w*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=w,l[i+2]=C,i+=d}}function v(e,t,r,i,n=1){const{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,l=a.length;if(i*=c,t!==o.length||4!==t)if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=c}}else{s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,a=e[i/=4];i+=t;const d=l*n;for(let r=1;r<d;++r)e[i]=a,i+=t}}function g(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,c=i[0];r*=a;for(let e=0;e<s;++e)o[r]=c,r+=a}function _(e,t,r,i,n=1){const o=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=a}function x(e,t,r,i,n,o,s){let l={numItems:0,numVerticesPerItem:0};for(const d of r.fields.keys()){const r=e.get(d),u=r?.indices;if(r&&u)d===c.r.POSITION&&(l={numItems:1,numVerticesPerItem:u.length}),T(d,r,i,n,o,s);else if(d===c.r.OLIDCOLOR&&null!=t){const r=e.get(c.r.POSITION)?.indices;if(r){const e=r.length;_(t,o.getField(d,a.XP),e,s)}}}return l}function T(e,t,r,n,l,m){switch(e){case c.r.POSITION:{(0,s.vA)(3===t.size);const i=l.getField(e,a.xs);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&p(t,r,i,m);break}case c.r.NORMAL:{(0,s.vA)(3===t.size);const r=l.getField(e,a.xs);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&f(t,n,r,m);break}case c.r.NORMALCOMPRESSED:case c.r.PROFILERIGHT:case c.r.PROFILEUP:{(0,s.vA)(2===t.size);const r=l.getField(e,a.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,m);break}case c.r.UV0:{(0,s.vA)(2===t.size);const r=l.getField(e,a.ZD);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r){const{data:n,indices:o}=e;if(!(0,i.LW)(n))return d(e,t,r);const a=o.length,s=new Float32Array(t.typedBuffer.buffer,t.start),c=new Float32Array(n.buffer),l=t.typedBufferStride/2;r*=l;for(let e=0;e<a;++e){const t=2*o[e];s[r]=c[t],r+=l}}(t,r,m);break}case c.r.UVI:{(0,s.vA)(2===t.size);const r=l.getField(e,a.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,m);break}case c.r.COLOR:case c.r.SYMBOLCOLOR:{const r=l.getField(e,a.XP);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||v(t,t.size,r,m);break}case c.r.SIZEFEATUREATTRIBUTE:{const r=l.getField(e,a.Y$);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&g(t,r,m);break}case c.r.COLORFEATUREATTRIBUTE:case c.r.OPACITYFEATUREATTRIBUTE:{const r=l.getField(e,a.XW);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&g(t,r,m);break}case c.r.TANGENT:{(0,s.vA)(4===t.size);const i=l.getField(e,a.Eq);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,n=1){if(!t)return void h(e,r,i,n);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,m=c[0],p=c[1],f=c[2],v=c[4],g=c[5],_=c[6],x=c[8],T=c[9],b=c[10],A=!(0,o.ut)(c),E=1e-6,S=1-E;if(i*=d,1===n)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],o=a[t+2],c=a[t+3];let u=m*r+v*n+x*o,h=p*r+g*n+T*o,M=f*r+_*n+b*o;if(A){const e=u*u+h*h+M*M;if(e<S&&e>E){const t=1/Math.sqrt(e);u*=t,h*=t,M*=t}}l[i]=u,l[i+1]=h,l[i+2]=M,l[i+3]=c,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],c=a[t+2],u=a[t+3];let h=m*r+v*o+x*c,M=p*r+g*o+T*c,w=f*r+_*o+b*c;if(A){const e=h*h+M*M+w*w;if(e<S&&e>E){const t=1/Math.sqrt(e);h*=t,M*=t,w*=t}}for(let e=0;e<n;++e)l[i]=h,l[i+1]=M,l[i+2]=w,l[i+3]=u,i+=d}}(t,r,i,m);break}case c.r.PROFILEVERTEXANDNORMAL:{(0,s.vA)(4===t.size);const r=l.getField(e,a.jz);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r){const{data:n,indices:o}=e;if(!(0,i.LW)(n))return h(e,t,r);const a=o.length,s=new Float32Array(t.typedBuffer.buffer,t.start),c=new Float32Array(n.buffer),l=t.typedBufferStride/2;r*=l;for(let e=0;e<a;++e){const t=2*o[e];s[r]=c[t],s[r+1]=c[t+1],r+=l}}(t,r,m);break}case c.r.PROFILEAUXDATA:{(0,s.vA)(3===t.size);const r=l.getField(e,a.EC);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,m);break}}}(0,n.vt)()},60517:(e,t,r)=>{r.d(t,{z:()=>d});var i=r(49255),n=r(22911),o=r(42593),a=r(63365),s=r(31821),c=r(59643),l=r(49788);function d(e,t){e.include(o.Q,t),e.include(n.NL,t),e.fragment.include(a.a);const r=t.output===i.V.ObjectAndLayerIdColor,d=(0,i.LG)(t.output),u=(0,i.RN)(t.output)&&t.oitPass===c.Y.ColorAlpha,h=(0,i.RN)(t.output)&&t.oitPass!==c.Y.ColorAlpha,m=t.discardInvisibleFragments;let p=0;(h||d||u)&&e.outputs.add("fragColor","vec4",p++),d&&e.outputs.add("fragEmission","vec4",p++),u&&e.outputs.add("fragAlpha","float",p++),e.fragment.code.add(s.H`
711
- void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) {
711
+ `)}(o=i||(i={}))[o.Disabled=0]="Disabled",o[o.Normal=1]="Normal",o[o.Schematic=2]="Schematic",o[o.Water=3]="Water",o[o.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",o[o.Simplified=5]="Simplified",o[o.TerrainWithWater=6]="TerrainWithWater",o[o.COUNT=7]="COUNT",h.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.NONE=0]="NONE",e[e.ColorAlpha=1]="ColorAlpha",e[e.FrontFace=2]="FrontFace",e[e.COUNT=3]="COUNT"}(i||(i={}))},59907:(e,t,r)=>{r.d(t,{Hk:()=>p,Pq:()=>m,SA:()=>x,Ut:()=>h,p1:()=>f,tb:()=>v,uO:()=>l,vx:()=>_});var i=r(34275),o=(r(38954),r(51850)),n=r(58083),a=r(13030),s=r(620),c=r(46540);function l(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<c;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function d(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function u(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function h(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function m(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function p(e,t,r,i,o=1){if(!t)return void u(e,r,i,o);const{data:a,indices:s}=e,c=r.typedBuffer,l=r.typedBufferStride,d=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],T=t[10],b=t[12],A=t[13],E=t[14];i*=l;let S=0,M=0,w=0;const C=(0,n.tZ)(t)?e=>{S=a[e]+b,M=a[e+1]+A,w=a[e+2]+E}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=h*t+f*r+_*i+b,M=m*t+v*r+x*i+A,w=p*t+g*r+T*i+E};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),c[i]=S,c[i+1]=M,c[i+2]=w,i+=l;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)c[i]=S,c[i+1]=M,c[i+2]=w,i+=l}}function f(e,t,r,i,o=1){if(!t)return void u(e,r,i,o);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=s.length,m=c[0],p=c[1],f=c[2],v=c[4],g=c[5],_=c[6],x=c[8],T=c[9],b=c[10],A=!(0,n.ut)(c),E=1e-6,S=1-E;i*=d;let M=0,w=0,C=0;const I=(0,n.tZ)(c)?e=>{M=a[e],w=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];M=m*t+v*r+x*i,w=p*t+g*r+T*i,C=f*t+_*r+b*i};if(1===o)if(A)for(let e=0;e<h;++e){I(3*s[e]);const t=M*M+w*w+C*C;if(t<S&&t>E){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=w*e,l[i+2]=C*e}else l[i]=M,l[i+1]=w,l[i+2]=C;i+=d}else for(let e=0;e<h;++e)I(3*s[e]),l[i]=M,l[i+1]=w,l[i+2]=C,i+=d;else for(let e=0;e<h;++e){if(I(3*s[e]),A){const e=M*M+w*w+C*C;if(e<S&&e>E){const t=1/Math.sqrt(e);M*=t,w*=t,C*=t}}for(let e=0;e<o;++e)l[i]=M,l[i+1]=w,l[i+2]=C,i+=d}}function v(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,l=a.length;if(i*=c,t!==n.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}}else{s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,a=e[i/=4];i+=t;const d=l*o;for(let r=1;r<d;++r)e[i]=a,i+=t}}function g(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,c=i[0];r*=a;for(let e=0;e<s;++e)n[r]=c,r+=a}function _(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function x(e,t,r,i,o,n,s){let l={numItems:0,numVerticesPerItem:0};for(const d of r.fields.keys()){const r=e.get(d),u=r?.indices;if(r&&u)d===c.r.POSITION&&(l={numItems:1,numVerticesPerItem:u.length}),T(d,r,i,o,n,s);else if(d===c.r.OLIDCOLOR&&null!=t){const r=e.get(c.r.POSITION)?.indices;if(r){const e=r.length;_(t,n.getField(d,a.XP),e,s)}}}return l}function T(e,t,r,o,l,m){switch(e){case c.r.POSITION:{(0,s.vA)(3===t.size);const i=l.getField(e,a.xs);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&p(t,r,i,m);break}case c.r.NORMAL:{(0,s.vA)(3===t.size);const r=l.getField(e,a.xs);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&f(t,o,r,m);break}case c.r.NORMALCOMPRESSED:case c.r.PROFILERIGHT:case c.r.PROFILEUP:{(0,s.vA)(2===t.size);const r=l.getField(e,a.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,m);break}case c.r.UV0:{(0,s.vA)(2===t.size);const r=l.getField(e,a.ZD);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r){const{data:o,indices:n}=e;if(!(0,i.LW)(o))return d(e,t,r);const a=n.length,s=new Float32Array(t.typedBuffer.buffer,t.start),c=new Float32Array(o.buffer),l=t.typedBufferStride/2;r*=l;for(let e=0;e<a;++e){const t=2*n[e];s[r]=c[t],r+=l}}(t,r,m);break}case c.r.UVI:{(0,s.vA)(2===t.size);const r=l.getField(e,a.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,m);break}case c.r.COLOR:case c.r.SYMBOLCOLOR:{const r=l.getField(e,a.XP);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||v(t,t.size,r,m);break}case c.r.SIZEFEATUREATTRIBUTE:{const r=l.getField(e,a.Y$);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&g(t,r,m);break}case c.r.COLORFEATUREATTRIBUTE:case c.r.OPACITYFEATUREATTRIBUTE:{const r=l.getField(e,a.XW);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&g(t,r,m);break}case c.r.TANGENT:{(0,s.vA)(4===t.size);const i=l.getField(e,a.Eq);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void h(e,r,i,o);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,m=c[0],p=c[1],f=c[2],v=c[4],g=c[5],_=c[6],x=c[8],T=c[9],b=c[10],A=!(0,n.ut)(c),E=1e-6,S=1-E;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],c=a[t+3];let u=m*r+v*o+x*n,h=p*r+g*o+T*n,M=f*r+_*o+b*n;if(A){const e=u*u+h*h+M*M;if(e<S&&e>E){const t=1/Math.sqrt(e);u*=t,h*=t,M*=t}}l[i]=u,l[i+1]=h,l[i+2]=M,l[i+3]=c,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],c=a[t+2],u=a[t+3];let h=m*r+v*n+x*c,M=p*r+g*n+T*c,w=f*r+_*n+b*c;if(A){const e=h*h+M*M+w*w;if(e<S&&e>E){const t=1/Math.sqrt(e);h*=t,M*=t,w*=t}}for(let e=0;e<o;++e)l[i]=h,l[i+1]=M,l[i+2]=w,l[i+3]=u,i+=d}}(t,r,i,m);break}case c.r.PROFILEVERTEXANDNORMAL:{(0,s.vA)(4===t.size);const r=l.getField(e,a.jz);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&function(e,t,r){const{data:o,indices:n}=e;if(!(0,i.LW)(o))return h(e,t,r);const a=n.length,s=new Float32Array(t.typedBuffer.buffer,t.start),c=new Float32Array(o.buffer),l=t.typedBufferStride/2;r*=l;for(let e=0;e<a;++e){const t=2*n[e];s[r]=c[t],s[r+1]=c[t+1],r+=l}}(t,r,m);break}case c.r.PROFILEAUXDATA:{(0,s.vA)(3===t.size);const r=l.getField(e,a.EC);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,m);break}}}(0,o.vt)()},60517:(e,t,r)=>{r.d(t,{z:()=>d});var i=r(49255),o=r(22911),n=r(42593),a=r(63365),s=r(31821),c=r(59643),l=r(49788);function d(e,t){e.include(n.Q,t),e.include(o.NL,t),e.fragment.include(a.a);const r=t.output===i.V.ObjectAndLayerIdColor,d=(0,i.LG)(t.output),u=(0,i.RN)(t.output)&&t.oitPass===c.Y.ColorAlpha,h=(0,i.RN)(t.output)&&t.oitPass!==c.Y.ColorAlpha,m=t.discardInvisibleFragments;let p=0;(h||d||u)&&e.outputs.add("fragColor","vec4",p++),d&&e.outputs.add("fragEmission","vec4",p++),u&&e.outputs.add("fragAlpha","float",p++),e.fragment.code.add(s.H`
712
+ void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveBaseColor) {
712
713
  ${(0,s.If)(r,"finalColor.a = 1.0;")}
713
714
 
714
715
  ${(0,s.If)(m,`if (finalColor.a < ${s.H.float(l.Q)}) { discard; }`)}
@@ -717,33 +718,33 @@ float occlusion;`),h&&n.uniforms.add(v===u.c.Pass?new d.N("texMetallicRoughness"
717
718
  ${(0,s.If)(u,s.H`fragColor = premultiplyAlpha(finalColor);
718
719
  fragAlpha = finalColor.a;`)}
719
720
  ${(0,s.If)(h,"fragColor = finalColor;")}
720
- ${(0,s.If)(d,"fragEmission = finalColor.a * getEmissions();")}
721
+ ${(0,s.If)(d,"fragEmission = finalColor.a * getEmissions(emissiveBaseColor);")}
721
722
  calculateOcclusionAndOutputHighlight();
722
723
  ${(0,s.If)(r,"outputObjectAndLayerIdColor();")}
723
724
  }
724
- `)}},60864:(e,t,r)=>{r.d(t,{B:()=>T});var i=r(77690),n=r(29242),o=r(9093),a=r(38954),s=r(51850),c=r(49255),l=r(26425),d=r(20693),u=r(23205),h=r(31821),m=r(35644),p=r(40095),f=r(46540);function v(e,t){const r=e.length;for(let i=0;i<r;++i)_[0]=e[i],t[i]=_[0];return t}function g(e,t){const r=e.length;for(let i=0;i<r;++i)_[0]=e[i],_[1]=e[i]-_[0],t[i]=_[1];return t}const _=new Float32Array(2);r(65786).Y;const x=(0,n.vt)();function T(e,t){const{hasModelTransformation:r,instancedDoublePrecision:n,instanced:s,output:_,hasVertexTangents:T}=t;r&&(e.vertex.uniforms.add(new p.X("model",(e=>e.modelTransformation??o.zK))),e.vertex.uniforms.add(new m.k("normalLocalOriginFromModel",(e=>((0,i.Ge)(x,e.modelTransformation??o.zK),x))))),s&&n&&(e.attributes.add(f.r.INSTANCEMODELORIGINHI,"vec3"),e.attributes.add(f.r.INSTANCEMODELORIGINLO,"vec3"),e.attributes.add(f.r.INSTANCEMODEL,"mat3"),e.attributes.add(f.r.INSTANCEMODELNORMAL,"mat3"));const A=e.vertex;n&&(A.include(l.u,t),A.uniforms.add(new u.d("viewOriginHi",(e=>v((0,a.i)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b))),new u.d("viewOriginLo",(e=>g((0,a.i)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b))))),A.code.add(h.H`
725
+ `)}},60864:(e,t,r)=>{r.d(t,{B:()=>T});var i=r(77690),o=r(29242),n=r(9093),a=r(38954),s=r(51850),c=r(49255),l=r(26425),d=r(20693),u=r(23205),h=r(31821),m=r(35644),p=r(40095),f=r(46540);function v(e,t){const r=e.length;for(let i=0;i<r;++i)_[0]=e[i],t[i]=_[0];return t}function g(e,t){const r=e.length;for(let i=0;i<r;++i)_[0]=e[i],_[1]=e[i]-_[0],t[i]=_[1];return t}const _=new Float32Array(2);r(65786).Y;const x=(0,o.vt)();function T(e,t){const{hasModelTransformation:r,instancedDoublePrecision:o,instanced:s,output:_,hasVertexTangents:T}=t;r&&(e.vertex.uniforms.add(new p.X("model",(e=>e.modelTransformation??n.zK))),e.vertex.uniforms.add(new m.k("normalLocalOriginFromModel",(e=>((0,i.Ge)(x,e.modelTransformation??n.zK),x))))),s&&o&&(e.attributes.add(f.r.INSTANCEMODELORIGINHI,"vec3"),e.attributes.add(f.r.INSTANCEMODELORIGINLO,"vec3"),e.attributes.add(f.r.INSTANCEMODEL,"mat3"),e.attributes.add(f.r.INSTANCEMODELNORMAL,"mat3"));const A=e.vertex;o&&(A.include(l.u,t),A.uniforms.add(new u.d("viewOriginHi",(e=>v((0,a.i)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b))),new u.d("viewOriginLo",(e=>g((0,a.i)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b))))),A.code.add(h.H`
725
726
  vec3 getVertexInLocalOriginSpace() {
726
- return ${r?n?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":n?"instanceModel * localPosition().xyz":"localPosition().xyz"};
727
+ return ${r?o?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":o?"instanceModel * localPosition().xyz":"localPosition().xyz"};
727
728
  }
728
729
 
729
730
  vec3 subtractOrigin(vec3 _pos) {
730
- ${n?h.H`
731
+ ${o?h.H`
731
732
  // Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
732
733
  vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
733
734
  return _pos - originDelta;`:"return vpos;"}
734
735
  }
735
736
  `),A.code.add(h.H`
736
737
  vec3 dpNormal(vec4 _normal) {
737
- return normalize(${r?n?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":n?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
738
+ return normalize(${r?o?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":o?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
738
739
  }
739
740
  `),_===c.V.Normal&&((0,d.S7)(A),A.code.add(h.H`
740
741
  vec3 dpNormalView(vec4 _normal) {
741
- return normalize((viewNormal * ${r?n?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":n?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
742
+ return normalize((viewNormal * ${r?o?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":o?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
742
743
  }
743
744
  `)),T&&A.code.add(h.H`
744
745
  vec4 dpTransformVertexTangent(vec4 _tangent) {
745
- ${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
746
- }`)}const b=(0,s.vt)()},62298:(e,t,r)=>{r(63907)},62602:(e,t,r)=>{r.d(t,{W:()=>i,r:()=>s});var i,n,o=r(21818),a=r(31821);function s(e,t){const r=e.fragment;switch(r.code.add(a.H`struct ShadingNormalParameters {
746
+ ${r?o?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":o?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
747
+ }`)}const b=(0,s.vt)()},62298:(e,t,r)=>{r(63907)},62602:(e,t,r)=>{r.d(t,{W:()=>i,r:()=>s});var i,o,n=r(21818),a=r(31821);function s(e,t){const r=e.fragment;switch(r.code.add(a.H`struct ShadingNormalParameters {
747
748
  vec3 normalView;
748
749
  vec3 viewDirection;
749
750
  } shadingParams;`),t.doubleSidedMode){case i.None:r.code.add(a.H`vec3 shadingNormal(ShadingNormalParameters params) {
@@ -752,7 +753,7 @@ return normalize(params.normalView);
752
753
  return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
753
754
  }`);break;case i.WindingOrder:r.code.add(a.H`vec3 shadingNormal(ShadingNormalParameters params) {
754
755
  return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
755
- }`);break;default:(0,o.Xb)(t.doubleSidedMode);case i.COUNT:}}(n=i||(i={}))[n.None=0]="None",n[n.View=1]="View",n[n.WindingOrder=2]="WindingOrder",n[n.COUNT=3]="COUNT"},63365:(e,t,r)=>{r.d(t,{a:()=>n});var i=r(31821);function n(e){e.code.add(i.H`vec4 premultiplyAlpha(vec4 v) {
756
+ }`);break;default:(0,n.Xb)(t.doubleSidedMode);case i.COUNT:}}(o=i||(i={}))[o.None=0]="None",o[o.View=1]="View",o[o.WindingOrder=2]="WindingOrder",o[o.COUNT=3]="COUNT"},63365:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(31821);function o(e){e.code.add(i.H`vec4 premultiplyAlpha(vec4 v) {
756
757
  return vec4(v.rgb * v.a, v.a);
757
758
  }
758
759
  vec3 rgb2hsv(vec3 c) {
@@ -770,17 +771,17 @@ return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
770
771
  }
771
772
  float rgb2v(vec3 c) {
772
773
  return max(c.x, max(c.y, c.z));
773
- }`)}},63761:(e,t,r)=>{r.d(t,{N:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"sampler2D",i.c.Pass,((r,i,n)=>r.bindTexture(e,t(i,n))))}}},65786:(e,t,r)=>{r.d(t,{Y:()=>i});const i=class{};new i},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>a});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function a(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.IB)(e.internalFormat))*(e.target===i.Ap.TEXTURE_CUBE_MAP?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec2",i.c.Draw,((r,i,n,o)=>r.setUniform2fv(e,t(i,n,o))))}}},69720:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(24326);class n{constructor(){this.id=(0,i.c)()}}},71955:(e,t,r)=>{r.d(t,{K:()=>d});var i=r(42583),n=r(31821),o=r(69270),a=r(74333);class s extends a.n{constructor(e,t){super(e,"int",o.c.Pass,((r,i,n)=>r.setUniform1i(e,t(i,n))))}}var c=r(46540),l=r(43616);function d(e,t){t.hasSymbolColors?(e.include(i.A),e.attributes.add(c.r.SYMBOLCOLOR,"vec4"),e.varyings.add("colorMixMode","mediump float"),e.vertex.code.add(n.H`int symbolColorMixMode;
774
+ }`)}},63761:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"sampler2D",i.c.Pass,((r,i,o)=>r.bindTexture(e,t(i,o))))}}},65786:(e,t,r)=>{r.d(t,{Y:()=>i});const i=class{};new i},67171:(e,t,r)=>{r.d(t,{R:()=>a,e:()=>s});var i=r(63907),o=r(36421),n=r(42293);class a{constructor(e=0,t=e){this.width=e,this.height=t,this.objectType=o.p.Texture,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!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.IB)(e.internalFormat))*(e.target===i.Ap.TEXTURE_CUBE_MAP?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Draw,((r,i,o,n)=>r.setUniform2fv(e,t(i,o,n))))}}},69720:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(24326);class o{constructor(){this.id=(0,i.c)()}}},71955:(e,t,r)=>{r.d(t,{K:()=>d});var i=r(42583),o=r(31821),n=r(69270),a=r(74333);class s extends a.n{constructor(e,t){super(e,"int",n.c.Pass,((r,i,o)=>r.setUniform1i(e,t(i,o))))}}var c=r(46540),l=r(43616);function d(e,t){t.hasSymbolColors?(e.include(i.A),e.attributes.add(c.r.SYMBOLCOLOR,"vec4"),e.varyings.add("colorMixMode","mediump float"),e.vertex.code.add(o.H`int symbolColorMixMode;
774
775
  vec4 getSymbolColor() {
775
776
  return decodeSymbolColor(symbolColor, symbolColorMixMode) * 0.003921568627451;
776
777
  }
777
778
  void forwardColorMixMode() {
778
779
  colorMixMode = float(symbolColorMixMode) + 0.5;
779
- }`)):(e.fragment.uniforms.add(new s("colorMixMode",(e=>l.Um[e.colorMixMode]))),e.vertex.code.add(n.H`vec4 getSymbolColor() { return vec4(1.0); }
780
- void forwardColorMixMode() {}`))}},71988:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec4",i.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))))}}},72824:(e,t,r)=>{r.d(t,{Mh:()=>u,Zo:()=>h,gy:()=>m});var i=r(21818),n=r(29242),o=r(91829),a=r(96336),s=r(33752),c=r(31821),l=r(98353),d=r(35644);function u(e,t){switch(t.normalType){case a.W.Attribute:case a.W.Compressed:e.include(a.Y,t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add(new l.h("transformNormalGlobalFromModel",(e=>e.transformNormalGlobalFromModel)),new d.k("transformNormalViewFromGlobal",(e=>e.transformNormalViewFromGlobal))),e.vertex.code.add(c.H`void forwardNormal() {
780
+ }`)):(e.fragment.uniforms.add(new s("colorMixMode",(e=>l.Um[e.colorMixMode]))),e.vertex.code.add(o.H`vec4 getSymbolColor() { return vec4(1.0); }
781
+ void forwardColorMixMode() {}`))}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec4",i.c.Pass,((r,i,o)=>r.setUniform4fv(e,t(i,o))))}}},72824:(e,t,r)=>{r.d(t,{Mh:()=>u,Zo:()=>h,gy:()=>m});var i=r(21818),o=r(29242),n=r(91829),a=r(96336),s=r(33752),c=r(31821),l=r(98353),d=r(35644);function u(e,t){switch(t.normalType){case a.W.Attribute:case a.W.Compressed:e.include(a.Y,t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add(new l.h("transformNormalGlobalFromModel",(e=>e.transformNormalGlobalFromModel)),new d.k("transformNormalViewFromGlobal",(e=>e.transformNormalViewFromGlobal))),e.vertex.code.add(c.H`void forwardNormal() {
781
782
  vNormalWorld = transformNormalGlobalFromModel * normalModel();
782
783
  vNormalView = transformNormalViewFromGlobal * vNormalWorld;
783
- }`);break;case a.W.ScreenDerivative:e.vertex.code.add(c.H`void forwardNormal() {}`);break;default:(0,i.Xb)(t.normalType);case a.W.COUNT:}}class h extends s.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,n.vt)()}}class m extends s.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,n.vt)(),this.toMapSpace=(0,o.vt)()}}},74081:(e,t,r)=>{r.d(t,{kA:()=>M,a8:()=>E,eU:()=>S});var i=r(40876),n=r(21818),o=r(38954),a=r(51850),s=r(87317),c=r(91829),l=r(59469),d=r(23205),u=r(14314),h=r(31821);function m(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new d.d("lightingAmbientSH0",(({lighting:e})=>(0,o.i)(p,e.sh.r[0],e.sh.g[0],e.sh.b[0])))),r.code.add(h.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
784
+ }`);break;case a.W.ScreenDerivative:e.vertex.code.add(c.H`void forwardNormal() {}`);break;default:(0,i.Xb)(t.normalType);case a.W.COUNT:}}class h extends s.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class m extends s.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,o.vt)(),this.toMapSpace=(0,n.vt)()}}},74081:(e,t,r)=>{r.d(t,{kA:()=>M,a8:()=>E,eU:()=>S});var i=r(40876),o=r(21818),n=r(38954),a=r(51850),s=r(87317),c=r(91829),l=r(59469),d=r(23205),u=r(14314),h=r(31821);function m(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new d.d("lightingAmbientSH0",(({lighting:e})=>(0,n.i)(p,e.sh.r[0],e.sh.g[0],e.sh.b[0])))),r.code.add(h.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
784
785
  vec3 ambientLight = 0.282095 * lightingAmbientSH0;
785
786
  return ambientLight * (1.0 - ambientOcclusion);
786
787
  }`)):1===i?(r.uniforms.add(new u.I("lightingAmbientSH_R",(({lighting:e})=>(0,s.s)(f,e.sh.r[0],e.sh.r[1],e.sh.r[2],e.sh.r[3]))),new u.I("lightingAmbientSH_G",(({lighting:e})=>(0,s.s)(f,e.sh.g[0],e.sh.g[1],e.sh.g[2],e.sh.g[3]))),new u.I("lightingAmbientSH_B",(({lighting:e})=>(0,s.s)(f,e.sh.b[0],e.sh.b[1],e.sh.b[2],e.sh.b[3])))),r.code.add(h.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
@@ -796,7 +797,7 @@ dot(lightingAmbientSH_G, sh0),
796
797
  dot(lightingAmbientSH_B, sh0)
797
798
  );
798
799
  return ambientLight * (1.0 - ambientOcclusion);
799
- }`)):2===i&&(r.uniforms.add(new d.d("lightingAmbientSH0",(({lighting:e})=>(0,o.i)(p,e.sh.r[0],e.sh.g[0],e.sh.b[0]))),new u.I("lightingAmbientSH_R1",(({lighting:e})=>(0,s.s)(f,e.sh.r[1],e.sh.r[2],e.sh.r[3],e.sh.r[4]))),new u.I("lightingAmbientSH_G1",(({lighting:e})=>(0,s.s)(f,e.sh.g[1],e.sh.g[2],e.sh.g[3],e.sh.g[4]))),new u.I("lightingAmbientSH_B1",(({lighting:e})=>(0,s.s)(f,e.sh.b[1],e.sh.b[2],e.sh.b[3],e.sh.b[4]))),new u.I("lightingAmbientSH_R2",(({lighting:e})=>(0,s.s)(f,e.sh.r[5],e.sh.r[6],e.sh.r[7],e.sh.r[8]))),new u.I("lightingAmbientSH_G2",(({lighting:e})=>(0,s.s)(f,e.sh.g[5],e.sh.g[6],e.sh.g[7],e.sh.g[8]))),new u.I("lightingAmbientSH_B2",(({lighting:e})=>(0,s.s)(f,e.sh.b[5],e.sh.b[6],e.sh.b[7],e.sh.b[8])))),r.code.add(h.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
800
+ }`)):2===i&&(r.uniforms.add(new d.d("lightingAmbientSH0",(({lighting:e})=>(0,n.i)(p,e.sh.r[0],e.sh.g[0],e.sh.b[0]))),new u.I("lightingAmbientSH_R1",(({lighting:e})=>(0,s.s)(f,e.sh.r[1],e.sh.r[2],e.sh.r[3],e.sh.r[4]))),new u.I("lightingAmbientSH_G1",(({lighting:e})=>(0,s.s)(f,e.sh.g[1],e.sh.g[2],e.sh.g[3],e.sh.g[4]))),new u.I("lightingAmbientSH_B1",(({lighting:e})=>(0,s.s)(f,e.sh.b[1],e.sh.b[2],e.sh.b[3],e.sh.b[4]))),new u.I("lightingAmbientSH_R2",(({lighting:e})=>(0,s.s)(f,e.sh.r[5],e.sh.r[6],e.sh.r[7],e.sh.r[8]))),new u.I("lightingAmbientSH_G2",(({lighting:e})=>(0,s.s)(f,e.sh.g[5],e.sh.g[6],e.sh.g[7],e.sh.g[8]))),new u.I("lightingAmbientSH_B2",(({lighting:e})=>(0,s.s)(f,e.sh.b[5],e.sh.b[6],e.sh.b[7],e.sh.b[8])))),r.code.add(h.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
800
801
  vec3 ambientLight = 0.282095 * lightingAmbientSH0;
801
802
  vec4 sh1 = vec4(
802
803
  0.488603 * normal.x,
@@ -915,7 +916,7 @@ vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceC
915
916
  vec3 outColorLinear = outDiffColor + specularComponent;
916
917
  vec3 outColor = pow(outColorLinear, vec3(INV_GAMMA_SRGB));
917
918
  return outColor;
918
- }`);break;default:(0,n.Xb)(t.pbrMode);case l.A9.COUNT:}}(0,a.vt)()},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>o,SY:()=>c,mb:()=>a});var i=r(38954),n=r(51850);function o({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:a,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==t&&null==a&&(null==s||(0,i.p)(s,n.uY))&&null==c&&(null==o||1===o)&&(null==r||1===r)}const a=(0,n.CN)(1,1,.5),s=(0,n.CN)(0,.6,.2),c=(0,n.CN)(0,1,.2)},76591:(e,t,r)=>{r.d(t,{HQ:()=>l,rA:()=>d});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(40710),c=(r(33079),r(31821));function l(e,t){!function(e,t,...r){h(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (sliceByPlane(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(c.H`void discardBySlice(vec3 pos) { }
919
+ }`);break;default:(0,o.Xb)(t.pbrMode);case l.A9.COUNT:}}(0,a.vt)()},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>c,mb:()=>a});var i=r(38954),o=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:a,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==t&&null==a&&(null==s||(0,i.p)(s,o.uY))&&null==c&&(null==n||1===n)&&(null==r||1===r)}const a=(0,o.CN)(1,1,.5),s=(0,o.CN)(0,.6,.2),c=(0,o.CN)(0,1,.2)},76284:(e,t,r)=>{r.d(t,{g:()=>x});var i=r(49186),o=(r(44208),r(53966)),n=r(97768),a=r(74887),s=r(94656),c=r(63907),l=r(36421),d=r(67171);function u(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&o.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function h(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!h(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===c.Ap.TEXTURE_3D||e===c.Ap.TEXTURE_2D_ARRAY}function f(e,t,r,i=1){let o=Math.max(t,r);return e===c.Ap.TEXTURE_3D&&(o=Math.max(o,i)),Math.floor(Math.log2(o))+1}function v(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case c.ld.FLOAT:switch(e.pixelFormat){case c.Ab.RGBA:return c.H0.RGBA32F;case c.Ab.RGB:return c.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case c.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case c.Ab.RGBA:return c.H0.RGBA8;case c.Ab.RGB:return c.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=t===c.j7.DEPTH_STENCIL?c.iE.DEPTH24_STENCIL8:t===c.j7.DEPTH_COMPONENT?c.SB.DEPTH_COMPONENT24:t,e.internalFormat}class g extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case c.H0.R16F:case c.H0.R32F:case c.H0.R8_SNORM:case c.H0.R8:this.pixelFormat=c.Ab.RED;break;case c.H0.R8I:case c.H0.R8UI:case c.H0.R16I:case c.H0.R16UI:case c.H0.R32I:case c.H0.R32UI:this.pixelFormat=c.Ab.RED_INTEGER}}static validate(e,t){return new g(e,t)}}const _=()=>o.A.getLogger("esri/views/webgl/Texture");let x=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=l.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=g.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===c.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,d.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(c.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){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,this._descriptor.target===c.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e,t){this._descriptor.compressionHandle=e,this._descriptor.compressionCallback=t}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(e){this.abortCompression(),!h(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in c.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),!h(e)&&this._descriptor.compressionHandle&&this._compressOnWorker(e)}updateData(t,r,o,n,a,s,c=0){s||_().error("An attempt to use uninitialized data!"),this._glName||_().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=v(l);const{context:d,pixelFormat:u,dataType:p,target:f,isImmutable:g}=l;if(g&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const x=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||o<0||r+n>l.width||o+a>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=d;c&&(n&&a||_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,c)),m(s)?T.texSubImage2D(f,t,r,o,n,a,u,p,s):h(s)?T.compressedTexSubImage2D(f,t,r,o,n,a,l.internalFormat,s.levels[t]):T.texSubImage2D(f,t,r,o,n,a,u,p,s),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),d.bindTexture(x,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,o,n,a,s,c,l){l||_().error("An attempt to use uninitialized data!"),this._glName||_().error("An attempt to update an uninitialized texture!");const d=this._descriptor;d.internalFormat=v(d);const{context:u,pixelFormat:m,dataType:f,isImmutable:g,target:x}=d;if(g&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");p(x)||_().warn("Attempting to set 3D texture data on a non-3D texture");const T=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||o<0||n<0||r+a>d.width||o+s>d.height||n+c>d.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:b}=u;if(h(l))l=l.levels[t],b.compressedTexSubImage3D(x,t,r,o,n,a,s,c,d.internalFormat,l);else{const e=l;b.texSubImage3D(x,t,r,o,n,a,s,c,m,f,e)}u.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,u(t)}t.samplingMode===c.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=c.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===c.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=c.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.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,u(e)}e.samplingMode===c.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=c.Cj.LINEAR):e.samplingMode===c.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=c.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=(0,n.DC)(this._compressionAbortController))}_setData(t,r){const o=this._descriptor,n=o.context?.gl;if(!n)return;(0,s.Y2)(n),this._glName||(this._glName=n.createTexture(),o.context.instanceCounter.increment(c.vt.Texture,this)),u(o);const a=o.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);o.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,s.Y2)(n);const l=r??o.target,d=p(l);if(m(t))this._setDataFromTexImageSource(t,l);else{const{width:e,height:r,depth:a}=o;if(null==e||null==r)throw new i.A("texture:missing-size","Width and height must be specified!");if(d&&null==a)throw new i.A("texture:missing-depth","Depth must be specified!");if(o.internalFormat=v(o),o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,o.internalFormat,o.hasMipmap,e,r,a),h(t)){if(!(o.internalFormat in c.CQ))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,o.internalFormat,l)}else this._texImage(l,0,o.internalFormat,e,r,a,t),(0,s.Y2)(n),o.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,s.Y2)(n),o.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=c.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=c.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;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=v(i);const o=p(t),{width:n,height:a,depth:c}=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=n),i.height||(i.height=a),o&&i.depth,o&&(i.depth=c),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,a,c),this._texImage(t,0,i.internalFormat,n,a,c,e),(0,s.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,s.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:o,height:n,depth:a}=i,s=e.levels,l=f(r,o,n,a),d=Math.min(l,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,c.H3.MAX_LEVEL,d),this._forEachMipmapLevel(((e,i,o,n)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,o,n,a)}),d)}_texStorage(e,t,r,o,n,a){const{gl:s}=this._descriptor.context;if(!(l=t,l in c.H0||function(e){return e in c.SB}(t)||function(e){return e in c.iE}(t)))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");var l;if(!this._descriptor.isImmutable)return;const d=r?f(e,o,n,a):1;if(p(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,d,t,o,n,a)}else s.texStorage2D(e,d,t,o,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(l){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,o,n,a,u,h,r)}else c.texSubImage2D(e,t,0,0,o,n,u,h,r)}}else{const d=s;if(l){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,o,n,a,0,u,h,d)}else c.texImage2D(e,t,r,o,n,0,u,h,d)}}_compressedTexImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=s)if(l){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else c.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(l){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,o,n,a,0,s)}else c.compressedTexImage2D(e,t,r,o,n,0,s)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const r=!!this._descriptor.context.capabilities.compressedTextureETC,i=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(r||i){const o=new AbortController;this._compressionAbortController=o;const n=this._descriptor.compressionHandle;n.increment();const s=this._descriptor.compressionCallback,c={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!r,hasS3TC:!!i};e.compressionWorkerHandle.invoke(c,this._compressionAbortController.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),s?.()),o===this._compressionAbortController&&(this._compressionAbortController=null),n.decrement()})).catch((e=>{(0,a.zf)(e)||o!==this._compressionAbortController||(this._compressionAbortController=null),n.decrement()}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:n,hasMipmap:a,target:s}=this._descriptor;const l=s===c.Ap.TEXTURE_3D;if(null==r||null==o||l&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,n),a&&(1!==r||1!==o||l&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),l&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;r===c.Cj.LINEAR_MIPMAP_NEAREST||r===c.Cj.LINEAR_MIPMAP_LINEAR?(r=c.Cj.LINEAR,e.hasMipmap||(i=c.Cj.LINEAR)):r!==c.Cj.NEAREST_MIPMAP_NEAREST&&r!==c.Cj.NEAREST_MIPMAP_LINEAR||(r=c.Cj.NEAREST,e.hasMipmap||(i=c.Cj.NEAREST)),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))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},76591:(e,t,r)=>{r.d(t,{HQ:()=>l,rA:()=>d});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(40710),c=(r(33079),r(31821));function l(e,t){!function(e,t,...r){h(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (sliceByPlane(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(c.H`void discardBySlice(vec3 pos) { }
919
920
  vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}(e,t,new s.W("slicePlaneOrigin",((e,r)=>v(t,e,r))),new s.W("slicePlaneBasis1",((e,r)=>g(t,e,r,r.slicePlane?.basis1))),new s.W("slicePlaneBasis2",((e,r)=>g(t,e,r,r.slicePlane?.basis2))))}function d(e,t){h(e,t,new s.W("slicePlaneOrigin",((e,r)=>v(t,e,r))),new s.W("slicePlaneBasis1",((e,r)=>g(t,e,r,r.slicePlane?.basis1))),new s.W("slicePlaneBasis2",((e,r)=>g(t,e,r,r.slicePlane?.basis2))))}r(65786).Y;const u=c.H`struct SliceFactors {
920
921
  float front;
921
922
  float side0;
@@ -954,13 +955,13 @@ return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
954
955
  }
955
956
  bool rejectBySlice(vec3 pos) {
956
957
  return sliceByPlane(pos);
957
- }`;function h(e,t,...r){t.hasSlicePlane?(e.uniforms.add(...r),e.code.add(u)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}function m(e,t,r){return e.instancedDoublePrecision?(0,o.i)(_,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function p(e,t){return null!=e?(0,o.d)(x,t.origin,e):t.origin}function f(e,t,r){return e.hasSliceTranslatedView?null!=t?(0,i.Tl)(b,r.camera.viewMatrix,t):r.camera.viewMatrix:null}function v(e,t,r){if(null==r.slicePlane)return a.uY;const i=m(e,t,r),n=p(i,r.slicePlane),s=f(e,i,r);return null!=s?(0,o.t)(x,n,s):n}function g(e,t,r,i){if(null==i||null==r.slicePlane)return a.uY;const n=m(e,t,r),s=p(n,r.slicePlane),c=f(e,n,r);return null!=c?((0,o.g)(T,i,s),(0,o.t)(x,s,c),(0,o.t)(T,T,c),(0,o.d)(T,T,x)):i}const _=(0,a.vt)(),x=(0,a.vt)(),T=(0,a.vt)(),b=(0,n.vt)()},76597:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(46686),n=r(31821);function o(e){(0,i.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
958
+ }`;function h(e,t,...r){t.hasSlicePlane?(e.uniforms.add(...r),e.code.add(u)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}function m(e,t,r){return e.instancedDoublePrecision?(0,n.i)(_,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function p(e,t){return null!=e?(0,n.d)(x,t.origin,e):t.origin}function f(e,t,r){return e.hasSliceTranslatedView?null!=t?(0,i.Tl)(b,r.camera.viewMatrix,t):r.camera.viewMatrix:null}function v(e,t,r){if(null==r.slicePlane)return a.uY;const i=m(e,t,r),o=p(i,r.slicePlane),s=f(e,i,r);return null!=s?(0,n.t)(x,o,s):o}function g(e,t,r,i){if(null==i||null==r.slicePlane)return a.uY;const o=m(e,t,r),s=p(o,r.slicePlane),c=f(e,o,r);return null!=c?((0,n.g)(T,i,s),(0,n.t)(x,s,c),(0,n.t)(T,T,c),(0,n.d)(T,T,x)):i}const _=(0,a.vt)(),x=(0,a.vt)(),T=(0,a.vt)(),b=(0,o.vt)()},76597:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(46686),o=r(31821);function n(e){(0,i.i$)(e),e.vertex.code.add(o.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
958
959
  vec4 eye = view * vec4(pos, 1.0);
959
960
  depth = calculateLinearDepth(nearFar,eye.z);
960
961
  return proj * eye;
961
- }`),e.vertex.code.add(n.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
962
+ }`),e.vertex.code.add(o.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
962
963
  return proj * (view * vec4(pos, 1.0));
963
- }`)}},77108:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec2",i.c.Bind,((r,i)=>r.setUniform2fv(e,t(i))))}}},77194:(e,t,r)=>{r.d(t,{MD:()=>c,cJ:()=>s,hs:()=>l,m0:()=>a});var i=r(34727),n=(r(17352),r(97937));function o(e,t,r){const i=r.parameters;return d.scale=Math.min(i.divisor/(t-i.offset),1),d.factor=function(e){return Math.abs(e*e*e)}(e),d}function a(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function s(e,t,r,i){i.scale=function(e,t,r){const i=o(e,t,r);return i.minScaleFactor=0,a(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function c(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function l(e,t,r,i){return a(e,o(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const d={scale:0,factor:0,minScaleFactor:0};(0,n.c)()},77695:(e,t,r)=>{r.d(t,{W:()=>f});var i=r(29242),n=r(48163),o=r(53466),a=r(99208),s=r(62602),c=r(47286),l=r(31821),d=r(35644),u=r(15976),h=r(63761),m=r(46540),p=r(69270);function f(e,t){const r=e.fragment,{hasVertexTangents:f,doubleSidedMode:v,hasNormalTexture:g,textureCoordinateType:_,bindType:x,hasNormalTextureTransform:T}=t;f?(e.attributes.add(m.r.TANGENT,"vec4"),e.varyings.add("vTangent","vec4"),v===s.W.WindingOrder?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
964
+ }`)}},77108:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Bind,((r,i)=>r.setUniform2fv(e,t(i))))}}},77194:(e,t,r)=>{r.d(t,{MD:()=>c,cJ:()=>s,hs:()=>l,m0:()=>a});var i=r(34727),o=(r(17352),r(97937));function n(e,t,r){const i=r.parameters;return d.scale=Math.min(i.divisor/(t-i.offset),1),d.factor=function(e){return Math.abs(e*e*e)}(e),d}function a(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function s(e,t,r,i){i.scale=function(e,t,r){const i=n(e,t,r);return i.minScaleFactor=0,a(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function c(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function l(e,t,r,i){return a(e,n(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const d={scale:0,factor:0,minScaleFactor:0};(0,o.c)()},77695:(e,t,r)=>{r.d(t,{W:()=>f});var i=r(29242),o=r(48163),n=r(53466),a=r(99208),s=r(62602),c=r(47286),l=r(31821),d=r(35644),u=r(15976),h=r(63761),m=r(46540),p=r(69270);function f(e,t){const r=e.fragment,{hasVertexTangents:f,doubleSidedMode:v,hasNormalTexture:g,textureCoordinateType:_,bindType:x,hasNormalTextureTransform:T}=t;f?(e.attributes.add(m.r.TANGENT,"vec4"),e.varyings.add("vTangent","vec4"),v===s.W.WindingOrder?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
964
965
  float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
965
966
  vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
966
967
  vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
@@ -981,12 +982,12 @@ T = T - normal * dot(normal, T);
981
982
  T *= inversesqrt(max(dot(T,T), 1.e-10));
982
983
  vec3 B = sign(det) * cross(normal, T);
983
984
  return mat3(T, B, normal);
984
- }`),g&&_!==o.I.None&&(e.include(a.r,t),r.uniforms.add(x===p.c.Pass?new h.N("normalTexture",(e=>e.textureNormal)):new u.o("normalTexture",(e=>e.textureNormal))),T&&(r.uniforms.add(new c.G("scale",(e=>e.scale??n.Un))),r.uniforms.add(new d.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK)))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
985
+ }`),g&&_!==n.I.None&&(e.include(a.r,t),r.uniforms.add(x===p.c.Pass?new h.N("normalTexture",(e=>e.textureNormal)):new u.o("normalTexture",(e=>e.textureNormal))),T&&(r.uniforms.add(new c.G("scale",(e=>e.scale??o.Un))),r.uniforms.add(new d.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK)))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
985
986
  vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),T&&r.code.add(l.H`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
986
987
  normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
987
988
  0.0, 0.0, 0.0 );
988
989
  rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
989
- }`))}},78662:(e,t,r)=>{r.d(t,{Gd:()=>u,VC:()=>h}),r(44208);var i,n,o,a=r(34727),s=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),d=(r(87317),r(91829),r(31756),r(26857),r(65786));(o=i||(i={}))[o.Undefined=0]="Undefined",o[o.DefinedSize=1]="DefinedSize",o[o.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(n||(n={}));class u extends d.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.i)(e,1,1,1),e;if(Number.isNaN(r[0]))return(0,c.c)(e,t.vvSize.fallback);for(let i=0;i<3;++i){const n=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,a.qE)(n,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,s.vt)(),(0,l.vt)(),(0,s.vt)()},80730:(e,t,r)=>{r.d(t,{U:()=>n});var i=r(31821);function n(e){e.code.add(i.H`const float MAX_RGBA4_FLOAT =
990
+ }`))}},78662:(e,t,r)=>{r.d(t,{Gd:()=>u,VC:()=>h}),r(44208);var i,o,n,a=r(34727),s=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),d=(r(87317),r(91829),r(31756),r(26857),r(65786));(n=i||(i={}))[n.Undefined=0]="Undefined",n[n.DefinedSize=1]="DefinedSize",n[n.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(o||(o={}));class u extends d.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.i)(e,1,1,1),e;if(Number.isNaN(r[0]))return(0,c.c)(e,t.vvSize.fallback);for(let i=0;i<3;++i){const o=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,a.qE)(o,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,s.vt)(),(0,l.vt)(),(0,s.vt)()},80730:(e,t,r)=>{r.d(t,{U:()=>o});var i=r(31821);function o(e){e.code.add(i.H`const float MAX_RGBA4_FLOAT =
990
991
  15.0 / 16.0 +
991
992
  15.0 / 16.0 / 16.0 +
992
993
  15.0 / 16.0 / 16.0 / 16.0 +
@@ -1006,11 +1007,11 @@ const vec4 RGBA4_2_FLOAT_FACTORS = vec4(
1006
1007
  );
1007
1008
  float rgba4ToFloat(vec4 rgba) {
1008
1009
  return dot(rgba, RGBA4_2_FLOAT_FACTORS);
1009
- }`)}},82048:(e,t,r)=>{r.d(t,{c:()=>o});var i=r(31821),n=r(46540);function o(e,t=!0){e.attributes.add(n.r.POSITION,"vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
1010
+ }`)}},82048:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821),o=r(46540);function n(e,t=!0){e.attributes.add(o.r.POSITION,"vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
1010
1011
  gl_Position = vec4(position, 0.0, 1.0);
1011
1012
  ${t?i.H`uv = position * 0.5 + vec2(0.5);`:""}
1012
- `)}},87170:(e,t,r)=>{r.d(t,{V:()=>C});var i=r(9093),n=r(38954),o=r(97146),a=r(57917),s=r(29920),c=r(69720),l=r(96672),d=r(51850),u=r(4341),h=r(11964);function m(e,t,r){return(0,n.d)(p,t,e),(0,n.d)(f,r,e),.5*(0,n.l)((0,n.e)(p,p,f))}r(32114),new u.I(h.vt),new u.I((()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e}));const p=(0,d.vt)(),f=(0,d.vt)(),v=(0,d.vt)(),g=(0,d.vt)(),_=(0,d.vt)(),x=(0,d.vt)();var T=r(24326),b=r(89192);class A{constructor(){this.uid=(0,T.c)()}}class E extends A{constructor(e){super(),this.highlightName=e,this.channel=b.Mg.Highlight}}var S=r(620),M=r(46540),w=r(94656);class C extends c.J{constructor(e,t,r=null,i=l.X.Mesh,n=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=n,this.edgeIndicesLength=a,this.highlights=new Set,this._highlightOptionsCounts=new Map,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,o.Dg)(r.indices)}),e===M.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new C(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,a.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,w.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===l.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===l.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,n.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0),(0,n.i)(x,0,0,0);let a=0,s=0;for(let e=0;e<o.length-2;e+=3){const c=o[e]*r,l=o[e+1]*r,d=o[e+2]*r;(0,n.i)(v,i[c],i[c+1],i[c+2]),(0,n.i)(g,i[l],i[l+1],i[l+2]),(0,n.i)(_,i[d],i[d+1],i[d+2]);const u=m(v,g,_);u?((0,n.g)(v,v,g),(0,n.g)(v,v,_),(0,n.h)(v,v,1/3*u),(0,n.g)(t,t,v),a+=u):((0,n.g)(x,x,v),(0,n.g)(x,x,g),(0,n.g)(x,x,_),s+=3)}return!(0===s&&0===a||(0!==a?((0,n.h)(t,t,1/a),0):0===s||((0,n.h)(t,x,1/s),0)))}(this.attributes.get(M.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(M.r.POSITION);return function(e,t,r){if(!e)return!1;(0,n.i)(r,0,0,0),(0,n.i)(x,0,0,0);let i=0,o=0;const{size:a,data:s,indices:c}=e,l=c.length-1,d=l+(t?2:0);for(let e=0;e<d;e+=2){const t=e<l?e+1:0,d=c[e<l?e:l]*a,u=c[t]*a;v[0]=s[d],v[1]=s[d+1],v[2]=s[d+2],g[0]=s[u],g[1]=s[u+1],g[2]=s[u+2],(0,n.h)(v,(0,n.g)(v,v,g),.5);const h=(0,n.G)(v,g);h>0?((0,n.g)(r,r,(0,n.h)(v,v,h)),i+=h):0===i&&((0,n.g)(x,x,v),o++)}return 0!==i?((0,n.h)(r,r,1/i),!0):0!==o&&((0,n.h)(r,x,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<o.length;e++){const n=o[e]*r;a!==n&&(t[0]+=i[n],t[1]+=i[n+1],t[2]+=i[n+2],s++),a=n}return s>1&&(0,n.h)(t,t,1/s),s>0}(this.attributes.get(M.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(M.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===l.X.Mesh?3:1;(0,S.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,o.tM)(e.indices.length/t);return new s.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlightNames(){return this._highlightOptionsCounts}get hasHighlights(){return this._highlightOptionsCounts.size>0}foreachHighlightOptions(e){this._highlightOptionsCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new E(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts.get(t)??0)+1;return this._highlightOptionsCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts.get(t)??0;r<=1?this._highlightOptionsCounts.delete(t):this._highlightOptionsCounts.set(t,r-1)}}}},89192:(e,t,r)=>{var i,n,o,a,s,c,l,d;r.d(t,{Am:()=>a,C7:()=>o,JS:()=>d,Mg:()=>c,dd:()=>s,it:()=>n,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89786:(e,t,r)=>{function i(e){const t=3.141592653589793,r=.3183098861837907;e.vertex.constants.add("PI","float",t),e.fragment.constants.add("PI","float",t),e.fragment.constants.add("LIGHT_NORMALIZATION","float",r),e.fragment.constants.add("INV_PI","float",r),e.fragment.constants.add("HALF_PI","float",1.570796326794897),e.fragment.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>E,RC:()=>s,T8:()=>c,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),n=r(63907);function o(e,t,r=n.Tb.ADD,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 a(e,t,r,i,o=n.Tb.ADD,a=n.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:o,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}o(n.dn.ZERO,n.dn.ONE_MINUS_SRC_ALPHA),o(n.dn.ONE,n.dn.ZERO),o(n.dn.ONE,n.dn.ONE);const s=o(n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA),c=a(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),l={face:n.Y7.BACK,mode:n.Ac.CCW},d={face:n.Y7.FRONT,mode:n.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function p(e){return w.intern(e)}function f(e){return I.intern(e)}function v(e){return O.intern(e)}function g(e){return N.intern(e)}function _(e){return L.intern(e)}function x(e){return H.intern(e)}function T(e){return B.intern(e)}function b(e){return z.intern(e)}function A(e){return V.intern(e)}function E(e){return j.intern(e)}class S{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 M(e){return"["+e.join(",")+"]"}const w=new S(C,(e=>({__tag:"Blending",...e})));function C(e){return e?M([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 I=new S(R,(e=>({__tag:"Culling",...e})));function R(e){return e?M([e.face,e.mode]):null}const O=new S(y,(e=>({__tag:"PolygonOffset",...e})));function y(e){return e?M([e.factor,e.units]):null}const N=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const H=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const B=new S(G,(e=>({__tag:"ColorWrite",...e})));function G(e){return e?M([e.r,e.g,e.b,e.a]):null}const z=new S(U,(e=>({__tag:"StencilWrite",...e})));function U(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([C(e.blending),R(e.culling),y(e.polygonOffset),P(e.depthTest),D(e.stencilTest),F(e.depthWrite),G(e.colorWrite),U(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:p(e.blending),culling:f(e.culling),polygonOffset:v(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:x(e.depthWrite),colorWrite:T(e.colorWrite),stencilWrite:b(e.stencilWrite),drawBuffers:A(e.drawBuffers)})))},92700:(e,t,r)=>{r.d(t,{c:()=>o});var i=r(31821),n=r(46540);function o(e,t){t.hasVertexColors?(e.attributes.add(n.r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}
1013
- void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}),function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(i||(i={}))},94656:(e,t,r)=>{r.d(t,{Y2:()=>d,en:()=>l});var i=r(49186),n=r(44208),o=r(53966),a=r(63907);const s=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),c=!!(0,n.A)("enable-feature:webgl-debug");function l(){return c}function d(e){if(l()){const t=e.getError();if(t){const e=function(e){switch(e){case a.bh.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case a.bh.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case a.bh.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case a.bh.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 a.bh.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case a.bh.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(t),r=(new Error).stack;s().error(new i.A("webgl-error","WebGL error occurred",{message:e,stack:r}))}}}},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),n=r(52540),o=r(68259),a=r(20304),s=r(31821),c=r(15976),l=r(63761),d=r(14113);const u=4;function h(){const e=new d.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(n.E),t.uniforms.add(new l.N("depthMap",(e=>e.depthTexture)),new c.o("tex",(e=>e.colorTexture)),new o.t("blurSize",(e=>e.blurSize)),new a.m("projScale",((e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(s.H`
1013
+ `)}},87170:(e,t,r)=>{r.d(t,{V:()=>C});var i=r(9093),o=r(38954),n=r(97146),a=r(57917),s=r(29920),c=r(69720),l=r(96672),d=r(51850),u=r(4341),h=r(11964);function m(e,t,r){return(0,o.d)(p,t,e),(0,o.d)(f,r,e),.5*(0,o.l)((0,o.e)(p,p,f))}r(32114),new u.I(h.vt),new u.I((()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e}));const p=(0,d.vt)(),f=(0,d.vt)(),v=(0,d.vt)(),g=(0,d.vt)(),_=(0,d.vt)(),x=(0,d.vt)();var T=r(24326),b=r(89192);class A{constructor(){this.uid=(0,T.c)()}}class E extends A{constructor(e){super(),this.highlightName=e,this.channel=b.Mg.Highlight}}var S=r(620),M=r(46540),w=r(94656);class C extends c.J{constructor(e,t,r=null,i=l.X.Mesh,o=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=o,this.edgeIndicesLength=a,this.highlights=new Set,this._highlightOptionsCounts=new Map,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,n.Dg)(r.indices)}),e===M.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new C(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,a.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,w.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===l.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===l.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,o.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.i)(t,0,0,0),(0,o.i)(x,0,0,0);let a=0,s=0;for(let e=0;e<n.length-2;e+=3){const c=n[e]*r,l=n[e+1]*r,d=n[e+2]*r;(0,o.i)(v,i[c],i[c+1],i[c+2]),(0,o.i)(g,i[l],i[l+1],i[l+2]),(0,o.i)(_,i[d],i[d+1],i[d+2]);const u=m(v,g,_);u?((0,o.g)(v,v,g),(0,o.g)(v,v,_),(0,o.h)(v,v,1/3*u),(0,o.g)(t,t,v),a+=u):((0,o.g)(x,x,v),(0,o.g)(x,x,g),(0,o.g)(x,x,_),s+=3)}return!(0===s&&0===a||(0!==a?((0,o.h)(t,t,1/a),0):0===s||((0,o.h)(t,x,1/s),0)))}(this.attributes.get(M.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(M.r.POSITION);return function(e,t,r){if(!e)return!1;(0,o.i)(r,0,0,0),(0,o.i)(x,0,0,0);let i=0,n=0;const{size:a,data:s,indices:c}=e,l=c.length-1,d=l+(t?2:0);for(let e=0;e<d;e+=2){const t=e<l?e+1:0,d=c[e<l?e:l]*a,u=c[t]*a;v[0]=s[d],v[1]=s[d+1],v[2]=s[d+2],g[0]=s[u],g[1]=s[u+1],g[2]=s[u+2],(0,o.h)(v,(0,o.g)(v,v,g),.5);const h=(0,o.F)(v,g);h>0?((0,o.g)(r,r,(0,o.h)(v,v,h)),i+=h):0===i&&((0,o.g)(x,x,v),n++)}return 0!==i?((0,o.h)(r,r,1/i),!0):0!==n&&((0,o.h)(r,x,1/n),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<n.length;e++){const o=n[e]*r;a!==o&&(t[0]+=i[o],t[1]+=i[o+1],t[2]+=i[o+2],s++),a=o}return s>1&&(0,o.h)(t,t,1/s),s>0}(this.attributes.get(M.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(M.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===l.X.Mesh?3:1;(0,S.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,n.tM)(e.indices.length/t);return new s.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlightNames(){return this._highlightOptionsCounts}get hasHighlights(){return this._highlightOptionsCounts.size>0}foreachHighlightOptions(e){this._highlightOptionsCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new E(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts.get(t)??0)+1;return this._highlightOptionsCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts.get(t)??0;r<=1?this._highlightOptionsCounts.delete(t):this._highlightOptionsCounts.set(t,r-1)}}}},89192:(e,t,r)=>{var i,o,n,a,s,c,l,d;r.d(t,{Am:()=>a,C7:()=>n,JS:()=>d,Mg:()=>c,dd:()=>s,it:()=>o,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89786:(e,t,r)=>{function i(e){const t=3.141592653589793,r=.3183098861837907;e.vertex.constants.add("PI","float",t),e.fragment.constants.add("PI","float",t),e.fragment.constants.add("LIGHT_NORMALIZATION","float",r),e.fragment.constants.add("INV_PI","float",r),e.fragment.constants.add("HALF_PI","float",1.570796326794897),e.fragment.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>E,RC:()=>s,T8:()=>c,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),o=r(63907);function n(e,t,r=o.Tb.ADD,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 a(e,t,r,i,n=o.Tb.ADD,a=o.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}n(o.dn.ZERO,o.dn.ONE_MINUS_SRC_ALPHA),n(o.dn.ONE,o.dn.ZERO),n(o.dn.ONE,o.dn.ONE);const s=n(o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA),c=a(o.dn.SRC_ALPHA,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA,o.dn.ONE_MINUS_SRC_ALPHA),l={face:o.Y7.BACK,mode:o.Ac.CCW},d={face:o.Y7.FRONT,mode:o.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function p(e){return w.intern(e)}function f(e){return I.intern(e)}function v(e){return O.intern(e)}function g(e){return N.intern(e)}function _(e){return L.intern(e)}function x(e){return H.intern(e)}function T(e){return B.intern(e)}function b(e){return z.intern(e)}function A(e){return V.intern(e)}function E(e){return j.intern(e)}class S{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 M(e){return"["+e.join(",")+"]"}const w=new S(C,(e=>({__tag:"Blending",...e})));function C(e){return e?M([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 I=new S(R,(e=>({__tag:"Culling",...e})));function R(e){return e?M([e.face,e.mode]):null}const O=new S(y,(e=>({__tag:"PolygonOffset",...e})));function y(e){return e?M([e.factor,e.units]):null}const N=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const H=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const B=new S(G,(e=>({__tag:"ColorWrite",...e})));function G(e){return e?M([e.r,e.g,e.b,e.a]):null}const z=new S(U,(e=>({__tag:"StencilWrite",...e})));function U(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([C(e.blending),R(e.culling),y(e.polygonOffset),P(e.depthTest),D(e.stencilTest),F(e.depthWrite),G(e.colorWrite),U(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:p(e.blending),culling:f(e.culling),polygonOffset:v(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:x(e.depthWrite),colorWrite:T(e.colorWrite),stencilWrite:b(e.stencilWrite),drawBuffers:A(e.drawBuffers)})))},92700:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821),o=r(46540);function n(e,t){t.hasVertexColors?(e.attributes.add(o.r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}
1014
+ void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}),function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(i||(i={}))},94656:(e,t,r)=>{r.d(t,{Y2:()=>d,en:()=>l});var i=r(49186),o=r(44208),n=r(53966),a=r(63907);const s=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),c=!!(0,o.A)("enable-feature:webgl-debug");function l(){return c}function d(e){if(l()){const t=e.getError();if(t){const e=function(e){switch(e){case a.bh.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case a.bh.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case a.bh.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case a.bh.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 a.bh.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case a.bh.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(t),r=(new Error).stack;s().error(new i.A("webgl-error","WebGL error occurred",{message:e,stack:r}))}}}},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),o=r(52540),n=r(68259),a=r(20304),s=r(31821),c=r(15976),l=r(63761),d=r(14113);const u=4;function h(){const e=new d.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(o.E),t.uniforms.add(new l.N("depthMap",(e=>e.depthTexture)),new c.o("tex",(e=>e.colorTexture)),new n.t("blurSize",(e=>e.blurSize)),new a.m("projScale",((e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(s.H`
1014
1015
  void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
1015
1016
  float c = texture(tex, uv).r;
1016
1017
  float d = linearDepthFromTexture(depthMap, uv);
@@ -1033,23 +1034,23 @@ void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}
1033
1034
  vec2 uvOffset = uv + rf * blurSize;
1034
1035
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
1035
1036
  }
1036
- fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},96598:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(52540),n=r(31821),o=r(12791);function a(e,{occlusionPass:t,terrainDepthTest:r,cullAboveTerrain:a}){const{vertex:s,fragment:c,varyings:l}=e;if(!r)return s.code.add("void forwardViewPosDepth(vec3 pos) {}"),void c.code.add(`${t?"bool":"void"} discardByTerrainDepth() { ${(0,n.If)(t,"return false;")}}`);l.add("viewPosDepth","float",{invariant:!0}),s.code.add("void forwardViewPosDepth(vec3 pos) {\n viewPosDepth = pos.z;\n }"),c.include(i.E),c.uniforms.add(new o.x("terrainDepthTexture",(e=>e.terrainDepth?.attachment))).code.add(n.H`
1037
+ fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},96598:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(52540),o=r(31821),n=r(12791);function a(e,{occlusionPass:t,terrainDepthTest:r,cullAboveTerrain:a}){const{vertex:s,fragment:c,varyings:l}=e;if(!r)return s.code.add("void forwardViewPosDepth(vec3 pos) {}"),void c.code.add(`${t?"bool":"void"} discardByTerrainDepth() { ${(0,o.If)(t,"return false;")}}`);l.add("viewPosDepth","float",{invariant:!0}),s.code.add("void forwardViewPosDepth(vec3 pos) {\n viewPosDepth = pos.z;\n }"),c.include(i.E),c.uniforms.add(new n.x("terrainDepthTexture",(e=>e.terrainDepth?.attachment))).code.add(o.H`
1037
1038
  ${t?"bool":"void"} discardByTerrainDepth() {
1038
1039
  float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r;
1039
1040
  float linearDepth = linearizeDepth(depth);
1040
1041
  ${t?"return viewPosDepth < linearDepth && depth < 1.0;":`if(viewPosDepth ${a?">":"<="} linearDepth) discard;`}
1041
- }`)}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98619:(e,t,r)=>{r.d(t,{Gc:()=>o,O4:()=>a,Vt:()=>s});var i=r(23205),n=r(31821);function o(e){e.uniforms.add(new i.d("mainLightDirection",(e=>e.lighting.mainLight.direction)))}function a(e){e.uniforms.add(new i.d("mainLightIntensity",(e=>e.lighting.mainLight.intensity)))}function s(e){o(e.fragment),a(e.fragment),e.fragment.code.add(n.H`vec3 applyShading(vec3 shadingNormalWorld, float shadow) {
1042
+ }`)}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98619:(e,t,r)=>{r.d(t,{Gc:()=>n,O4:()=>a,Vt:()=>s});var i=r(23205),o=r(31821);function n(e){e.uniforms.add(new i.d("mainLightDirection",(e=>e.lighting.mainLight.direction)))}function a(e){e.uniforms.add(new i.d("mainLightIntensity",(e=>e.lighting.mainLight.intensity)))}function s(e){n(e.fragment),a(e.fragment),e.fragment.code.add(o.H`vec3 applyShading(vec3 shadingNormalWorld, float shadow) {
1042
1043
  float dotVal = clamp(dot(shadingNormalWorld, mainLightDirection), 0.0, 1.0);
1043
1044
  return mainLightIntensity * ((1.0 - shadow) * dotVal);
1044
- }`)}},98958:(e,t,r)=>{r.d(t,{w:()=>d});var i=r(53966),n=r(97768),o=r(39341),a=(r(44208),r(94656));class s{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._glProgram=e.programCache.acquire(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear()}bindTexture(e,t){t?.glName||((0,a.en)()&&console.error(`Texture sampler ${e} has no given Texture in ${(new Error).stack} `),t=this._context.emptyTexture);const r=this._ensureTextureUnit(e,t);this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var c=r(63907),l=r(90644);class d{constructor(e,t,r,a=o.D){this.locations=a,this.primitiveType=c.WR.TRIANGLES,this.key=t.key,this._program=new s(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t),this.reload=async o=>{o&&await r.reload(),this.key.equals(t.key)||i.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn("Configuration was changed after construction, cannot reload shader.",r),(0,n.WD)(this._program),this._program=new s(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,n.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,l.Ey)({blending:l.RC,colorWrite:l.kn})}}},99208:(e,t,r)=>{r.d(t,{r:()=>a});var i=r(53466),n=r(31821);function o(e){e.fragment.code.add(n.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
1045
+ }`)}},98958:(e,t,r)=>{r.d(t,{w:()=>d});var i=r(53966),o=r(97768),n=r(39341),a=(r(44208),r(94656));class s{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._glProgram=e.programCache.acquire(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear()}bindTexture(e,t){t?.glName||((0,a.en)()&&console.error(`Texture sampler ${e} has no given Texture in ${(new Error).stack} `),t=this._context.emptyTexture);const r=this._ensureTextureUnit(e,t);this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var c=r(63907),l=r(90644);class d{constructor(e,t,r,a=n.D){this.locations=a,this.primitiveType=c.WR.TRIANGLES,this.key=t.key,this._program=new s(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t),this.reload=async n=>{n&&await r.reload(),this.key.equals(t.key)||i.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn("Configuration was changed after construction, cannot reload shader.",r),(0,o.WD)(this._program),this._program=new s(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,o.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,l.Ey)({blending:l.RC,colorWrite:l.kn})}}},99208:(e,t,r)=>{r.d(t,{r:()=>a});var i=r(53466),o=r(31821);function n(e){e.fragment.code.add(o.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
1045
1046
  vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
1046
1047
  vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
1047
1048
  float maxdUV = 0.125;
1048
1049
  vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
1049
1050
  vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
1050
1051
  return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
1051
- }`)}function a(e,t){const{textureCoordinateType:r}=t;if(r===i.I.None||r===i.I.COUNT)return;e.include(i.U,t);const a=r===i.I.Atlas;a&&e.include(o),e.fragment.code.add(n.H`
1052
+ }`)}function a(e,t){const{textureCoordinateType:r}=t;if(r===i.I.None||r===i.I.COUNT)return;e.include(i.U,t);const a=r===i.I.Atlas;a&&e.include(n),e.fragment.code.add(o.H`
1052
1053
  vec4 textureLookup(sampler2D tex, vec2 uv) {
1053
1054
  return ${a?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
1054
1055
  }
1055
- `)}},99677:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(78888);async function n(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}}}]);
1056
+ `)}},99677:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(78888);async function o(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}}}]);