@arcgis/core 6.0.0-next.43 → 6.0.0-next.44

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 (706) hide show
  1. package/WebMap.d.ts +9 -1
  2. package/WebMap.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.d.ts +3 -1
  5. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.js +1 -1
  6. package/applications/Components/OrientedImageryViewer/VideoFeatureCache.js +2 -0
  7. package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +2 -1
  8. package/applications/Components/OrientedImageryViewer/galleryUtils.js +1 -1
  9. package/applications/Components/OrientedImageryViewer/imageMeasurementUtils.js +2 -0
  10. package/applications/Components/OrientedImageryViewer/imageUtils.d.ts +756 -0
  11. package/applications/Components/OrientedImageryViewer/imageUtils.js +2 -0
  12. package/applications/Components/OrientedImageryViewer/measurementUtils.d.ts +15 -0
  13. package/applications/Components/OrientedImageryViewer/measurementUtils.js +2 -0
  14. package/applications/Components/OrientedImageryViewer/queryFeatures.js +2 -0
  15. package/applications/Components/OrientedImageryViewer/shared/ImageMeasurementWorker.js +2 -0
  16. package/applications/Components/OrientedImageryViewer/shared/constants.js +2 -0
  17. package/applications/Components/OrientedImageryViewer/shared/featureCoverage.js +2 -0
  18. package/applications/Components/OrientedImageryViewer/shared/galleryUtils.js +2 -0
  19. package/applications/Components/OrientedImageryViewer/shared/imageMeasurementWorkerUtils.js +2 -0
  20. package/applications/Components/OrientedImageryViewer/shared/navigation/queries.js +2 -0
  21. package/applications/Components/OrientedImageryViewer/shared/navigation/utils.js +2 -0
  22. package/applications/Components/OrientedImageryViewer/shared/panoramicImageProperties.js +2 -0
  23. package/applications/Components/OrientedImageryViewer/shared/services/ImageMeasurementService.js +2 -0
  24. package/applications/Components/OrientedImageryViewer/shared/services/SuperimposeService.js +2 -0
  25. package/applications/Components/OrientedImageryViewer/shared/services/TransformationService.js +2 -0
  26. package/applications/Components/OrientedImageryViewer/shared/support/NonPanoramicMedia.js +2 -0
  27. package/applications/Components/OrientedImageryViewer/shared/support/dataCaptureUtils.js +2 -0
  28. package/applications/Components/OrientedImageryViewer/shared/support/geometryUtils.js +2 -0
  29. package/applications/Components/OrientedImageryViewer/shared/support/panConstraint.js +2 -0
  30. package/applications/Components/OrientedImageryViewer/shared/support/resolveMediaProps.js +2 -0
  31. package/applications/Components/OrientedImageryViewer/shared/support/superimposeUtils.js +2 -0
  32. package/applications/Components/OrientedImageryViewer/shared/support/typeUtils.js +2 -0
  33. package/applications/Components/OrientedImageryViewer/shared/support/urlUtils.js +2 -0
  34. package/applications/Components/OrientedImageryViewer/shared/symbols.js +2 -0
  35. package/applications/Components/OrientedImageryViewer/shared/utils.js +2 -0
  36. package/applications/Components/OrientedImageryViewer/videoUtils.d.ts +15 -0
  37. package/applications/Components/OrientedImageryViewer/videoUtils.js +2 -0
  38. package/applications/Components/testUtils.d.ts +9 -0
  39. package/applications/Components/testUtils.js +1 -1
  40. package/applications/SceneViewer/sceneViewerUtils.d.ts +117 -1
  41. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  42. package/arcade/Feature.js +1 -1
  43. package/arcade/arcadeAsyncRuntime.js +1 -1
  44. package/arcade/arcadeCompiler.js +4 -4
  45. package/arcade/arcadeRuntime.js +1 -1
  46. package/arcade/compilerUtils.js +1 -1
  47. package/arcade/featureSetUtils.js +1 -1
  48. package/arcade/featureset/support/sqlUtils.js +1 -1
  49. package/arcade/functions/convertdirection.js +1 -1
  50. package/arcade/functions/hash.js +1 -1
  51. package/arcade/functions/string.js +1 -1
  52. package/arcade/geometry/isSelfIntersecting.js +1 -1
  53. package/arcade/treeAnalysis.js +1 -1
  54. package/arcgisGlobal.d.ts +6 -0
  55. package/assets/esri/core/workers/RemoteClient.js +1 -1
  56. package/assets/esri/core/workers/chunks/00620a90b32352bcdc71.js +1 -0
  57. package/assets/esri/core/workers/chunks/{fdffefd7de540272a8a6.js → 02feb2550b6878e62e2d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/06326c8cbe0d644eca16.js +1 -0
  59. package/assets/esri/core/workers/chunks/{3ec3589f6e74d7cb87cf.js → 090a7d0b0128d20879be.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{a33ba23aee3f8f40200f.js → 0ac4a3029ba17a9e2492.js} +1 -1
  61. package/assets/esri/core/workers/chunks/0ae2933ab9b4a6ca56f2.js +1 -0
  62. package/assets/esri/core/workers/chunks/{18dbee576b7b9dbe69fb.js → 0b480583373b69773333.js} +1 -1
  63. package/assets/esri/core/workers/chunks/0bfc4e7640058811e10c.js +1 -0
  64. package/assets/esri/core/workers/chunks/0caaa03659f4f4e8df03.js +1 -0
  65. package/assets/esri/core/workers/chunks/{3de07326da4c47cd2aab.js → 0dc1ac5531f7c8854686.js} +1 -1
  66. package/assets/esri/core/workers/chunks/0e57bac610d41c7c9ad4.js +1 -0
  67. package/assets/esri/core/workers/chunks/{2294254af2c6afb560ee.js → 11e313dfca2579e68419.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{cadd60fa4370284c7ae3.js → 13b40a611224ff5f4697.js} +1 -1
  69. package/assets/esri/core/workers/chunks/15a18c803a3aafa9a65b.js +1 -0
  70. package/assets/esri/core/workers/chunks/15a7a3264915fc8d3188.js +1 -0
  71. package/assets/esri/core/workers/chunks/162de06e54c0f9cba012.js +1 -0
  72. package/assets/esri/core/workers/chunks/1c61ced6079443fc0ce8.js +1 -0
  73. package/assets/esri/core/workers/chunks/1c94d4d79952dc4067be.js +1 -0
  74. package/assets/esri/core/workers/chunks/{804606b194dc9e71d088.js → 1ca9f823caff691e964d.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{8f4fba4d2339c91c8b3f.js → 1d9b0db37d5f3819ffca.js} +1 -1
  76. package/assets/esri/core/workers/chunks/200da109115eab8b2480.js +1 -0
  77. package/assets/esri/core/workers/chunks/{edd36a1fc80b1d29907e.js → 21939ef53bc71b42370f.js} +1 -1
  78. package/assets/esri/core/workers/chunks/230189a28552ab00546d.js +1 -0
  79. package/assets/esri/core/workers/chunks/{81b9894e81cce3490984.js → 2515ce2ef279cdd4d5fa.js} +1 -1
  80. package/assets/esri/core/workers/chunks/27a5c6be4f847900d6ed.js +1 -0
  81. package/assets/esri/core/workers/chunks/{45b5a61c4e9fbd9ca0b3.js → 27f0bbde1e9fa3f06d46.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{d51bb11baadc741c46bc.js → 29a437a2b7b3a9b3e104.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{070684943698fa43c2b4.js → 2a224bc845c9bf682c54.js} +1 -1
  84. package/assets/esri/core/workers/chunks/2c619c50cdcc37652c0b.js +1 -0
  85. package/assets/esri/core/workers/chunks/2c7f3fb74a076acf9b30.js +1 -0
  86. package/assets/esri/core/workers/chunks/{bc38def1983089514e4b.js → 2e9d2f0a4e3c84d2ac2e.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{9fe1812aad6e566aea31.js → 30c5b584e8658b2b3607.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{ae6dc159be974ca0e8da.js → 32ba94e59b411d3ff063.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{67efdd296007a809586c.js → 3463b52d633a9336af28.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{864194927d05ebc4cc31.js → 35426786de409d42a87f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{898359be6996fd9763b8.js → 377158a19c9d6ef11387.js} +1 -1
  92. package/assets/esri/core/workers/chunks/394b329e64d880cdb500.js +1 -0
  93. package/assets/esri/core/workers/chunks/{ca2adcbcf44454484fd5.js → 3a295fab549ae3caf9df.js} +1 -1
  94. package/assets/esri/core/workers/chunks/3a3b57abfb92494cac84.js +1 -0
  95. package/assets/esri/core/workers/chunks/{fd031150d3a7f896e6b3.js → 3cbb3c4e0e60a874ac6d.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{50763ea061d5fb3f2e49.js → 4136c4de42b8818e2710.js} +1 -1
  97. package/assets/esri/core/workers/chunks/41d674e73b57c8abe838.js +1 -0
  98. package/assets/esri/core/workers/chunks/{0cfdeb53fb7d5532cf01.js → 425347186c279bcc595c.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{6ccf9535013fe672c93b.js → 434a7ef5b25d83593b50.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{4fe10650ba3cd30aa9a2.js → 46d0db736c6e7decbcf6.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{cca8bd07bcd1d267a2e8.js → 489b37c459e1af116aeb.js} +1 -1
  102. package/assets/esri/core/workers/chunks/49c21c11621ff077e401.js +1 -0
  103. package/assets/esri/core/workers/chunks/{bfb8fc6b940bd5510e29.js → 4eab4e74c6a479c5f930.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{5fd4d3cb3c9350131a59.js → 4f8a915795f107b772c5.js} +1 -1
  105. package/assets/esri/core/workers/chunks/5565b4e7c31d31a7e546.js +1 -0
  106. package/assets/esri/core/workers/chunks/{344f5334ad95c7974349.js → 5744c7350e4e2eb73aa9.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{8d3e92a3367a3ddc02bd.js → 57e0bf4be8a166d5b1eb.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{3dd49f910834a2fb2142.js → 5b3db2c40feaefb7cbc0.js} +1 -1
  109. package/assets/esri/core/workers/chunks/5ba40e98e9300d1ebc85.js +1 -0
  110. package/assets/esri/core/workers/chunks/60137300db0e0c3caf13.js +1 -0
  111. package/assets/esri/core/workers/chunks/63d2645a744dce469bbb.js +1 -0
  112. package/assets/esri/core/workers/chunks/649e4ecb1d9e6da3fcd7.js +1 -0
  113. package/assets/esri/core/workers/chunks/6637fb99033bfa7646d4.js +1 -0
  114. package/assets/esri/core/workers/chunks/68b4ce0b2e754ac2e552.js +1 -0
  115. package/assets/esri/core/workers/chunks/69c338d1d359075371bc.js +1 -0
  116. package/assets/esri/core/workers/chunks/{6b4c3411f63a9ad9354c.js → 72020d86e3fc7ecc139f.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{9630234267098115de4d.js → 73ab4f0275a85b9671ec.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{449a2dee17b54946f245.js → 7b7208237123e948f170.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{5529831dd891382c79df.js → 7d866911d1171d25ca78.js} +1 -1
  120. package/assets/esri/core/workers/chunks/7eddde6c4249f46c67f3.js +1 -0
  121. package/assets/esri/core/workers/chunks/82160bd873cdb5a23557.js +1 -0
  122. package/assets/esri/core/workers/chunks/82e238375582f90dc94c.js +1 -0
  123. package/assets/esri/core/workers/chunks/831d896587d10fb689dc.js +1 -0
  124. package/assets/esri/core/workers/chunks/{ca204c110438f7315790.js → 834bbda7719b04301f74.js} +1 -1
  125. package/assets/esri/core/workers/chunks/835ccd95f2d312ecda5a.js +1 -0
  126. package/assets/esri/core/workers/chunks/8385bede56cc95d1a388.js +1 -0
  127. package/assets/esri/core/workers/chunks/8a8c9a3969b7016c20d9.js +1 -0
  128. package/assets/esri/core/workers/chunks/8c1ae93dae934aedc6dc.js +1 -0
  129. package/assets/esri/core/workers/chunks/{ef274db3fa260eadf371.js → 8cddfdbab3ad3809462f.js} +1 -1
  130. package/assets/esri/core/workers/chunks/8cec3f48e995aab3d62e.js +1 -0
  131. package/assets/esri/core/workers/chunks/{076e8d2e08ff2a013736.js → 8f1dd383502432d8a039.js} +1 -1
  132. package/assets/esri/core/workers/chunks/{78a69594c82d37aecbfb.js → 90a7cd7564f2a92199cc.js} +1 -1
  133. package/assets/esri/core/workers/chunks/98e3f7ab4bfbabf0b952.js +1 -0
  134. package/assets/esri/core/workers/chunks/99a72b65afdcd3ee091a.js +1 -0
  135. package/assets/esri/core/workers/chunks/{be04f40f8b403befd0ef.js → 9bb90097368b200fa730.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{f7398cfd8bbd041bd635.js → 9bf77f92760aacbd636f.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{237a1f68a0efbfe5b77c.js → 9e7622379d777ea88018.js} +1 -1
  138. package/assets/esri/core/workers/chunks/9fb4c10d5b3e32bc86e9.js +1 -0
  139. package/assets/esri/core/workers/chunks/{564d7f2e58fbc16853c0.js → a8bedc53d4a316953108.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{f2dab9fcd90ce38ae3d1.js → a8fbef765a6fb68e1115.js} +1 -1
  141. package/assets/esri/core/workers/chunks/aaac620f93a20fbd3f08.js +1 -0
  142. package/assets/esri/core/workers/chunks/ab684cce869973ea71cf.js +1 -0
  143. package/assets/esri/core/workers/chunks/ad787100602e18dde650.js +1 -0
  144. package/assets/esri/core/workers/chunks/{cb1642ea8b66231cbfb5.js → af70a81620203c030f5b.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{efff269424d76f1dbb15.js → b10850c48f4eee60b8a9.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{f11eaab5354cc6aa9569.js → b25104337f2495a4296a.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{784d6c6949284ed6e10b.js → b3707d2cd2f4b2f70889.js} +1 -1
  148. package/assets/esri/core/workers/chunks/b89b634e9d38b5a51d33.js +1 -0
  149. package/assets/esri/core/workers/chunks/bb6573d794bbe670216a.js +1 -0
  150. package/assets/esri/core/workers/chunks/{8ebaf5754e86a45b0497.js → be11cec9979ed5e9738e.js} +1 -1
  151. package/assets/esri/core/workers/chunks/c063de8f57a393280c39.js +1 -0
  152. package/assets/esri/core/workers/chunks/c420ab79d85e5dbddb0b.js +29 -0
  153. package/assets/esri/core/workers/chunks/{14ed0c34b910eba3434e.js → c473c8b480de9802711b.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{b3dbcf43f136ba2dadc5.js → c67ce7896789ac7275b2.js} +1 -1
  155. package/assets/esri/core/workers/chunks/c75cc72a306a617d9cd8.js +1 -0
  156. package/assets/esri/core/workers/chunks/{394ae3199c78a94c6a2a.js → c85336a50a4994a2a7eb.js} +1 -1
  157. package/assets/esri/core/workers/chunks/ccb0046b883286e65429.js +1 -0
  158. package/assets/esri/core/workers/chunks/cf684026e7f1ab7df4f7.js +1 -0
  159. package/assets/esri/core/workers/chunks/d19ac8368bb769fa5fba.js +1 -0
  160. package/assets/esri/core/workers/chunks/d26c9db8c0a772d0923c.js +1 -0
  161. package/assets/esri/core/workers/chunks/{58d10e0b35968680fd9f.js → d31f6598b76380e8688a.js} +1 -1
  162. package/assets/esri/core/workers/chunks/d3cd09b2d78ce9f2ea42.js +1 -0
  163. package/assets/esri/core/workers/chunks/{ad94f54b4c88b3a047bc.js → d4028536542db8b623cc.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{cb6fb04fe5c8d90d4196.js → d4fe26716c4eca13d493.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{c86d3af148b28ded5875.js → d64054cd6865d3a1af78.js} +38 -44
  166. package/assets/esri/core/workers/chunks/d7270a2db6f3bfcf0565.js +1 -0
  167. package/assets/esri/core/workers/chunks/d85d1064ba87ea1b1410.js +1 -0
  168. package/assets/esri/core/workers/chunks/{7a8ca15271e42b6131ac.js → d8b9d14f8d3e82ad26dc.js} +1 -1
  169. package/assets/esri/core/workers/chunks/{63c4412c16d8a44a5668.js → d99d5aa04e2d74ef57a7.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{dfd4782b11d6fdca0492.js → d9e75266ac28f934eb61.js} +1 -1
  171. package/assets/esri/core/workers/chunks/dbf37b1c4e0567d9fb32.js +1 -0
  172. package/assets/esri/core/workers/chunks/{0c948ad4572000218afc.js → dc9792b2aa55975b8a95.js} +1 -1
  173. package/assets/esri/core/workers/chunks/dca0e2505a6cbef6f7f5.js +1 -0
  174. package/assets/esri/core/workers/chunks/ddaa8f8098e4a663e4e5.js +1 -0
  175. package/assets/esri/core/workers/chunks/df88bb9117967fe72eb4.js +1 -0
  176. package/assets/esri/core/workers/chunks/{1c378d489c5402888f76.js → e1f5da51115472347b55.js} +1 -1
  177. package/assets/esri/core/workers/chunks/e2535c83b97725e89256.js +1 -0
  178. package/assets/esri/core/workers/chunks/{406f24ec13eb30d43405.js → e2ebf0ea3af2e6907987.js} +1 -1
  179. package/assets/esri/core/workers/chunks/{ffe2077a9df7c838ea27.js → e7719bfbc5875a515a2b.js} +1 -1
  180. package/assets/esri/core/workers/chunks/{26ceb0ff8d93dbb9b84f.js → ec88631b5033c19f569e.js} +1 -1
  181. package/assets/esri/core/workers/chunks/{a2cc53ad1a514167e4b8.js → ef8f9b61b829c3bdf999.js} +1 -1
  182. package/assets/esri/core/workers/chunks/ef9740c4d1bd808af38a.js +1 -0
  183. package/assets/esri/core/workers/chunks/{f08a2a262a3b55149396.js → f0b897319ca8578df63f.js} +1 -1
  184. package/assets/esri/core/workers/chunks/{acea0946049136578354.js → f1e87e3ff65d8594e6b3.js} +1 -1
  185. package/assets/esri/core/workers/chunks/f36376b126c80d0983fb.js +1 -0
  186. package/assets/esri/core/workers/chunks/f3ca7fa35eb8d55f5907.js +1 -0
  187. package/assets/esri/core/workers/chunks/{1f9d6180a96d557838e9.js → f4d714d0a1a513861704.js} +1 -1
  188. package/assets/esri/core/workers/chunks/{14ded73842154d91ef4e.js → f7f73de8c63924e347ab.js} +1 -1
  189. package/assets/esri/core/workers/chunks/f91e36a104e84d985517.js +1 -0
  190. package/assets/esri/core/workers/chunks/{69f6d5997b8ff1326e39.js → fa5d4b9a098441ebf505.js} +1 -1
  191. package/assets/esri/core/workers/chunks/{9c3db7a7c05fa0e81f0a.js → fc9d66fe2cc9e2d31964.js} +1 -1
  192. package/chunks/Bufferer-CclWhXVb.js +1 -1
  193. package/chunks/ColorMaterial.glsl.js +26 -16
  194. package/chunks/Component.glsl.js +0 -1
  195. package/chunks/CypherParser.js +1 -1
  196. package/chunks/DefaultMaterial.glsl.js +1 -1
  197. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  198. package/chunks/EdgeShader.glsl.js +1 -1
  199. package/chunks/Envelope.js +1 -1
  200. package/chunks/Envelope2D.js +1 -1
  201. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  202. package/chunks/GeodeticUtils.js +1 -1
  203. package/chunks/Geometry.js +1 -1
  204. package/chunks/Jpg.js +1 -1
  205. package/chunks/MultiPathImpl.js +1 -1
  206. package/chunks/OperatorAffineTransform.js +1 -1
  207. package/chunks/OperatorClip.js +1 -1
  208. package/chunks/OperatorCrosses.js +1 -1
  209. package/chunks/OperatorCut.js +1 -1
  210. package/chunks/OperatorDensify.js +1 -1
  211. package/chunks/OperatorDistance.js +1 -1
  212. package/chunks/OperatorEquals.js +1 -1
  213. package/chunks/OperatorGeneralize.js +1 -1
  214. package/chunks/OperatorGeodesicBuffer.js +1 -1
  215. package/chunks/OperatorGeodeticArea.js +1 -1
  216. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  217. package/chunks/OperatorGeodeticDistance.js +1 -1
  218. package/chunks/OperatorGeodeticLength.js +1 -1
  219. package/chunks/OperatorGraphicBuffer.js +1 -1
  220. package/chunks/OperatorIntegrate.js +1 -1
  221. package/chunks/OperatorIntersects.js +1 -1
  222. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  223. package/chunks/OperatorOverlaps.js +1 -1
  224. package/chunks/OperatorProximity.js +1 -1
  225. package/chunks/OperatorProximityGeodesic.js +1 -1
  226. package/chunks/OperatorRelate.js +1 -1
  227. package/chunks/OperatorShapePreservingLength.js +1 -1
  228. package/chunks/OperatorShapePreservingProject.js +1 -1
  229. package/chunks/OperatorSimplifyOGC.js +1 -1
  230. package/chunks/OperatorTouches.js +1 -1
  231. package/chunks/OperatorWithin.js +1 -1
  232. package/chunks/Point2D.js +1 -1
  233. package/chunks/RealisticTree.glsl.js +1 -1
  234. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  235. package/chunks/Transformation2D.js +1 -1
  236. package/chunks/UnitFactory.js +1 -1
  237. package/chunks/antlr4.web.js +3 -3
  238. package/chunks/arcgis-knowledge-client-core-simd.js +3 -3
  239. package/chunks/arcgis-knowledge-client-core.js +3 -3
  240. package/chunks/basis_encoder.js +2 -2
  241. package/chunks/basis_transcoder.js +2 -2
  242. package/chunks/draco_mesh_decoder.js +2 -2
  243. package/chunks/dxt_encoder.js +3 -3
  244. package/chunks/earcut.js +1 -1
  245. package/chunks/i3s.js +2 -2
  246. package/chunks/index.js +2 -2
  247. package/chunks/lclayout.js +2 -2
  248. package/chunks/lerc-wasm.js +1 -1
  249. package/chunks/libtess-f32.js +1 -1
  250. package/chunks/libtess-f64.js +1 -1
  251. package/chunks/lyr3DMain.js +1 -1
  252. package/chunks/lyr3DWorker.js +1 -1
  253. package/chunks/parquet.js +1 -1
  254. package/chunks/pe-wasm.js +1 -1
  255. package/chunks/projector.js +1 -1
  256. package/chunks/qb3-wasm.js +1 -1
  257. package/chunks/text.js +1 -1
  258. package/chunks/urlUtils.js +2 -0
  259. package/chunks/vxlLayer.js +1 -1
  260. package/config.js +1 -1
  261. package/core/Accessor.js +1 -1
  262. package/core/Clonable.js +1 -1
  263. package/core/Collection.js +1 -1
  264. package/core/MD5.js +1 -1
  265. package/core/MemCache.js +1 -1
  266. package/core/ObjectPool.js +1 -1
  267. package/core/RandomLCG.js +1 -1
  268. package/core/accessorSupport/decorators/subclass.js +1 -1
  269. package/core/accessorSupport/diffUtils.js +1 -1
  270. package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
  271. package/core/accessorSupport/get.js +1 -1
  272. package/core/colorUtils.js +1 -1
  273. package/core/has.js +1 -1
  274. package/core/image/apng.js +1 -1
  275. package/core/lang.js +1 -1
  276. package/core/object.js +1 -1
  277. package/core/pbf.js +1 -1
  278. package/core/sql/StandardizedFunctions.js +1 -1
  279. package/core/string.js +1 -1
  280. package/core/typedArrayUtil.js +1 -1
  281. package/core/urlUtils.js +1 -1
  282. package/core/workers/RemoteClient.js +1 -1
  283. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  284. package/geometry/Circle.js +1 -1
  285. package/geometry/SpatialReference.d.ts +12 -3
  286. package/geometry/geodesicUtils.js +1 -1
  287. package/geometry/geometryEngine.js +1 -1
  288. package/geometry/libtess.js +1 -1
  289. package/geometry/operators/extendOperator.js +1 -1
  290. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  291. package/geometry/operators/geodeticLengthOperator.js +1 -1
  292. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  293. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  294. package/geometry/operators/gx/operatorBoundary.js +1 -1
  295. package/geometry/operators/gx/operatorBuffer.js +1 -1
  296. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  297. package/geometry/operators/gx/operatorDifference.js +1 -1
  298. package/geometry/operators/gx/operatorIntersection.js +1 -1
  299. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  300. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  301. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  302. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  303. package/geometry/operators/gx/operatorOffset.js +1 -1
  304. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  305. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  306. package/geometry/operators/gx/operatorSimplify.js +1 -1
  307. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  308. package/geometry/operators/intersectionOperator.js +1 -1
  309. package/geometry/operators/isNearOperator.js +1 -1
  310. package/geometry/operators/reshapeOperator.js +1 -1
  311. package/geometry/operators/simplifyOperator.js +1 -1
  312. package/geometry/operators/support/jsonConverter.js +2 -2
  313. package/geometry/projectionUtils.js +1 -1
  314. package/geometry/support/buffer/types.js +1 -1
  315. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  316. package/geometry/support/frustumPlanes.js +1 -1
  317. package/geometry/support/heightModelInfoUtils.js +1 -1
  318. package/geometry/support/intersectsBase.js +1 -1
  319. package/geometry/support/meshUtils/External.js +1 -1
  320. package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
  321. package/geometry/support/plane.js +1 -1
  322. package/interfaces.d.ts +16 -41
  323. package/kernel.js +1 -1
  324. package/layers/GaussianSplatLayer.d.ts +1 -9
  325. package/layers/GaussianSplatLayer.js +1 -1
  326. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  327. package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -5
  328. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  329. package/layers/IntegratedMeshLayer.d.ts +25 -2
  330. package/layers/IntegratedMeshLayer.js +1 -1
  331. package/layers/LinkChartLayer.js +1 -1
  332. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  333. package/layers/MapNotesLayer.js +1 -1
  334. package/layers/ParquetLayer.d.ts +0 -32
  335. package/layers/ParquetLayer.js +1 -1
  336. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
  337. package/layers/graphics/OptimizedGeometry.js +1 -1
  338. package/layers/graphics/applyEditsUtils.js +1 -1
  339. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  340. package/layers/graphics/data/FeatureIdInfo.js +1 -1
  341. package/layers/graphics/data/StreamFeatureManager.js +1 -1
  342. package/layers/graphics/dehydratedFeatures.js +1 -1
  343. package/layers/graphics/sources/csv/csv.js +2 -2
  344. package/layers/graphics/sources/geojson/geojson.js +1 -1
  345. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  346. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  347. package/layers/mixins/SceneService.js +1 -1
  348. package/layers/orientedImagery/core/NavigationNode.js +2 -0
  349. package/layers/orientedImagery/core/imageNavigationUtils.d.ts +2 -0
  350. package/layers/orientedImagery/core/imageNavigationUtils.js +2 -0
  351. package/layers/orientedImagery/core/utils.js +1 -1
  352. package/layers/orientedImagery/queries.js +1 -1
  353. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  354. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  355. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  356. package/layers/orientedImagery/transformations/utils.js +1 -1
  357. package/layers/orientedImagery/types.d.ts +3 -0
  358. package/layers/raster/datasets/RasterFactory.js +1 -1
  359. package/layers/raster/datasets/xmlUtilities.js +1 -1
  360. package/layers/raster/formats/Lerc.js +1 -1
  361. package/layers/raster/formats/pixelRangeUtils.js +1 -1
  362. package/layers/raster/functions/convolutionUtils.js +1 -1
  363. package/layers/raster/functions/customBandIndexUtils.js +1 -1
  364. package/layers/support/I3SIntegratedMeshElevationQuery.js +1 -1
  365. package/layers/support/MosaicRule.js +1 -1
  366. package/layers/support/PixelBlock.js +1 -1
  367. package/layers/support/SpriteSource.js +1 -1
  368. package/layers/support/arcgisLayers.js +1 -1
  369. package/layers/support/csvUtils.js +1 -1
  370. package/layers/support/featureLayerUtils.js +1 -1
  371. package/layers/support/fieldUtils.js +1 -1
  372. package/layers/support/floorFilterUtils.js +1 -1
  373. package/layers/support/layersCreator.js +1 -1
  374. package/layers/support/tiles3DUtils.js +1 -1
  375. package/layers/support/wmtsUtils.js +1 -1
  376. package/layers/video/VideoController.js +21 -21
  377. package/libs/ajv/ajv.bundle-wrapper.js +1 -1
  378. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  379. package/networks/Network.js +1 -1
  380. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  381. package/package.json +2 -2
  382. package/parcelFabric/ParcelFabric.d.ts +760 -0
  383. package/parcelFabric/ParcelFabric.js +2 -0
  384. package/parcelFabric/support/ParcelJobInfo.d.ts +97 -0
  385. package/parcelFabric/support/ParcelJobInfo.js +2 -0
  386. package/parcelFabric/support/ParcelParameters.d.ts +48 -0
  387. package/parcelFabric/support/ParcelParameters.js +2 -0
  388. package/popup/FeatureModel.d.ts +2 -2
  389. package/popup/FeaturesModel.d.ts +2 -2
  390. package/popup/support/featureUtils.js +1 -1
  391. package/portal/support/loadUtils.js +1 -1
  392. package/portal/support/portalLayers.js +1 -1
  393. package/renderers/support/RasterSymbolizer.js +1 -1
  394. package/renderers/support/rendererConversion.js +1 -1
  395. package/request/queue.js +1 -1
  396. package/rest/geoprocessor/utils.js +1 -1
  397. package/rest/parcelFabric/analyzeByLeastSquaresAdjustment.js +2 -0
  398. package/rest/parcelFabric/applyLeastSquaresAdjustment.js +2 -0
  399. package/rest/parcelFabric/assignFeaturesToRecord.js +2 -0
  400. package/rest/parcelFabric/build.js +2 -0
  401. package/rest/parcelFabric/changeParcelType.js +2 -0
  402. package/rest/parcelFabric/clip.js +2 -0
  403. package/rest/parcelFabric/copyLinesToParcelType.js +2 -0
  404. package/rest/parcelFabric/createSeeds.js +2 -0
  405. package/rest/parcelFabric/deleteParcels.js +2 -0
  406. package/rest/parcelFabric/divide.js +2 -0
  407. package/rest/parcelFabric/duplicateParcels.js +2 -0
  408. package/rest/parcelFabric/merge.js +2 -0
  409. package/rest/parcelFabric/mergeParcelPoints.js +2 -0
  410. package/rest/parcelFabric/reassignFeaturesToRecord.js +2 -0
  411. package/rest/parcelFabric/reconstructFromSeeds.js +2 -0
  412. package/rest/parcelFabric/setParcelLineLabelPosition.js +2 -0
  413. package/rest/parcelFabric/shrinkToSeed.js +2 -0
  414. package/rest/parcelFabric/transferParcel.js +2 -0
  415. package/rest/parcelFabric/updateParcelHistory.js +2 -0
  416. package/rest/parcelFabric/utils.js +2 -0
  417. package/rest/support/JobInfo.js +1 -1
  418. package/rest/support/printTaskUtils.js +1 -1
  419. package/smartMapping/heuristics/scaleRange.js +1 -1
  420. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  421. package/smartMapping/renderers/color.js +1 -1
  422. package/smartMapping/renderers/location.js +1 -1
  423. package/smartMapping/renderers/support/utils.js +1 -1
  424. package/smartMapping/renderers/univariateColorSize.js +1 -1
  425. package/support/basemapUtils.js +1 -1
  426. package/symbols/cim/utils.js +1 -1
  427. package/symbols/support/cimSymbolUtils.js +1 -1
  428. package/undoredo/support/ServiceVersionInfo.js +1 -1
  429. package/views/2d/engine/flow/dataUtils.js +1 -1
  430. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  431. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  432. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  433. package/views/2d/engine/webgl/TextureManager.js +1 -1
  434. package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
  435. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
  436. package/views/2d/engine/webgl/definitions.js +1 -1
  437. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  438. package/views/2d/engine/webgl/number.js +1 -1
  439. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  440. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  441. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  442. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  443. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  444. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  445. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  446. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  447. package/views/2d/layers/features/support/ComputedAttributeStorage.js +1 -1
  448. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  449. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  450. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  451. package/views/2d/layers/features/support/StaticBitSet.js +1 -1
  452. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  453. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  454. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  455. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  456. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  457. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  458. package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
  459. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
  460. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  461. package/views/3d/glTF/internal/Resource.js +1 -1
  462. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  463. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  464. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  465. package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
  466. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  467. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  468. package/views/3d/interactive/manipulatorUtils.js +1 -1
  469. package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
  470. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  471. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  472. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  473. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  474. package/views/3d/layers/I3SMeshView3D.js +1 -1
  475. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  476. package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +1 -1
  477. package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
  478. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  479. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  480. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  481. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  482. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  483. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  484. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  485. package/views/3d/layers/graphics/extrudePolygon.js +1 -1
  486. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  487. package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
  488. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  489. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  490. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  491. package/views/3d/layers/i3s/IDBCache.js +1 -1
  492. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  493. package/views/3d/layers/support/patternUtils.js +1 -1
  494. package/views/3d/support/PBFDecoder.js +1 -1
  495. package/views/3d/support/cameraUtils.js +1 -1
  496. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  497. package/views/3d/support/meshProcessing.js +1 -1
  498. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  499. package/views/3d/support/sunUtils.js +1 -1
  500. package/views/3d/terrain/PatchRenderData.js +1 -1
  501. package/views/3d/terrain/TerrainRenderer.js +1 -1
  502. package/views/3d/terrain/TerrainSurface.js +1 -1
  503. package/views/3d/webgl/RenderCamera.js +1 -1
  504. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  505. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  506. package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
  507. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
  508. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -6
  509. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -4
  510. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -19
  511. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +16 -15
  512. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  513. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  514. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -5
  515. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  516. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  517. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  518. package/views/3d/webgl-engine/lib/Program.js +1 -1
  519. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  520. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  521. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  522. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +1 -2
  523. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  524. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  525. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  526. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  527. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  528. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  529. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  530. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  531. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  532. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  533. package/views/draw/DrawManipulator3D.js +1 -1
  534. package/views/draw/support/managers/TooltipManager.js +1 -1
  535. package/views/draw/support/reshapeUtils.js +1 -1
  536. package/views/interactive/options/SnappingOptions.d.ts +3 -2
  537. package/views/interactive/sketch/constraints.js +1 -1
  538. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  539. package/views/interactive/snapping/FeatureSnappingLayerSource.d.ts +6 -3
  540. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  541. package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
  542. package/views/selection/SelectionOperation.js +1 -1
  543. package/views/support/GeometryWorker.js +1 -1
  544. package/views/support/flow/dataUtils.js +1 -1
  545. package/views/support/screenUtils.js +1 -1
  546. package/views/support/screenshotUtils.js +1 -1
  547. package/views/support/waitForResources.js +1 -1
  548. package/views/webgl/InstanceCounter.js +1 -1
  549. package/views/webgl/Program.js +1 -1
  550. package/views/webgl/RenderingContext.js +1 -1
  551. package/webdoc/support/webdocLoadUtils.js +1 -1
  552. package/webscene/spec-certification/api.js +1 -1
  553. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
  554. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  555. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +2 -2
  556. package/widgets/BasemapLayerList/types.d.ts +3 -3
  557. package/widgets/BasemapLayerList.d.ts +2 -2
  558. package/widgets/BasemapLayerList.js +1 -1
  559. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  560. package/widgets/BatchAttributeForm.js +1 -1
  561. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
  562. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  563. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
  564. package/widgets/CatalogLayerList/types.d.ts +3 -3
  565. package/widgets/CatalogLayerList.d.ts +3 -3
  566. package/widgets/CatalogLayerList.js +1 -1
  567. package/widgets/Editor/workflowUtils.js +1 -1
  568. package/widgets/Editor.js +1 -1
  569. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  570. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  571. package/widgets/FeatureForm.js +1 -1
  572. package/widgets/LayerList/LayerListViewModel.js +1 -1
  573. package/widgets/LayerList/LayerListVisibleElements.d.ts +2 -2
  574. package/widgets/LayerList/ListItem.d.ts +1 -1
  575. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  576. package/widgets/LayerList/types.d.ts +1 -1
  577. package/widgets/Measurement.js +1 -1
  578. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  579. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  580. package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
  581. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  582. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  583. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  584. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  585. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  586. package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
  587. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  588. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  589. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  590. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  591. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  592. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  593. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  594. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  595. package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
  596. package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
  597. package/widgets/OrientedImageryViewer/constants.js +1 -1
  598. package/widgets/OrientedImageryViewer/featureCoverage.js +1 -1
  599. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  600. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  601. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
  602. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  603. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  604. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  605. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  606. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  607. package/widgets/OrientedImageryViewer/panoramicImageProperties.js +1 -1
  608. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  609. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  610. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  611. package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
  612. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
  613. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  614. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
  615. package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
  616. package/widgets/OrientedImageryViewer/support/navigationViewStateUtils.js +1 -1
  617. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  618. package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +1 -1
  619. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  620. package/widgets/OrientedImageryViewer/support/typeUtils.js +1 -1
  621. package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
  622. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  623. package/widgets/OrientedImageryViewer/types.d.ts +10 -0
  624. package/widgets/OrientedImageryViewer/utils.js +1 -1
  625. package/widgets/OrientedImageryViewer.js +1 -1
  626. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  627. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  628. package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
  629. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  630. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  631. package/widgets/Sketch/support/PluginManager.js +1 -1
  632. package/widgets/TableList/ListItem.d.ts +2 -2
  633. package/widgets/TableList/ListItemPanel.d.ts +4 -4
  634. package/widgets/TableList/TableListViewModel.d.ts +4 -4
  635. package/widgets/TableList/TableListViewModel.js +1 -1
  636. package/widgets/TableList/TableListVisibleElements.d.ts +2 -2
  637. package/widgets/TableList/types.d.ts +5 -5
  638. package/widgets/TableList.d.ts +3 -3
  639. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  640. package/widgets/UtilityNetworkTrace.js +1 -1
  641. package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +0 -1
  642. package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +0 -1
  643. package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +0 -1
  644. package/assets/esri/core/workers/chunks/1e5c5029b0653047a769.js +0 -1
  645. package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +0 -1
  646. package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +0 -1
  647. package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +0 -1
  648. package/assets/esri/core/workers/chunks/2e760d04641755d1820d.js +0 -1
  649. package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +0 -1
  650. package/assets/esri/core/workers/chunks/361d620b3f91868b1490.js +0 -1
  651. package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +0 -1
  652. package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +0 -1
  653. package/assets/esri/core/workers/chunks/3a90b6eafa92f1a68ac5.js +0 -1
  654. package/assets/esri/core/workers/chunks/3b552afffaa78bf4fe18.js +0 -1
  655. package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +0 -1
  656. package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +0 -1
  657. package/assets/esri/core/workers/chunks/47f0c717acc2c33ea670.js +0 -1
  658. package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +0 -1
  659. package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +0 -1
  660. package/assets/esri/core/workers/chunks/4e03aa5518d46a36661c.js +0 -1
  661. package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +0 -1
  662. package/assets/esri/core/workers/chunks/59295b99bdff4045a0e7.js +0 -1
  663. package/assets/esri/core/workers/chunks/5c2fe67527c9d7b4dba3.js +0 -1
  664. package/assets/esri/core/workers/chunks/5d908a823b324bafda1e.js +0 -1
  665. package/assets/esri/core/workers/chunks/5dea74fe52583e77f3ce.js +0 -1
  666. package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +0 -29
  667. package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +0 -1
  668. package/assets/esri/core/workers/chunks/67c2e5953087dadfd245.js +0 -1
  669. package/assets/esri/core/workers/chunks/6f3732e7ba2d031ba789.js +0 -1
  670. package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +0 -1
  671. package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +0 -1
  672. package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +0 -1
  673. package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +0 -1
  674. package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +0 -1
  675. package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +0 -1
  676. package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +0 -1
  677. package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +0 -1
  678. package/assets/esri/core/workers/chunks/919a6aedf38e9631ee09.js +0 -1
  679. package/assets/esri/core/workers/chunks/9869c696e6321c8db0a9.js +0 -1
  680. package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +0 -1
  681. package/assets/esri/core/workers/chunks/a332e31165b65a6fb92e.js +0 -1
  682. package/assets/esri/core/workers/chunks/a4d3944700f1cc240176.js +0 -1
  683. package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +0 -1
  684. package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +0 -1
  685. package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +0 -1
  686. package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +0 -1
  687. package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +0 -1
  688. package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +0 -1
  689. package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +0 -1
  690. package/assets/esri/core/workers/chunks/c7f49493bd548d5dc1e0.js +0 -1
  691. package/assets/esri/core/workers/chunks/cb62326b6526cde429c1.js +0 -1
  692. package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +0 -1
  693. package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +0 -1
  694. package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +0 -1
  695. package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +0 -1
  696. package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +0 -1
  697. package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +0 -1
  698. package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +0 -1
  699. package/assets/esri/core/workers/chunks/eaf720dfdf6ceca31249.js +0 -1
  700. package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +0 -1
  701. package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +0 -1
  702. package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +0 -1
  703. package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +0 -1
  704. package/assets/esri/core/workers/chunks/fd17c4a9e13bf77aa86a.js +0 -1
  705. package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +0 -2
  706. package/widgets/OrientedImageryViewer/videoViewerUtils.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as n,cross as r,transformMat4 as i,normalize as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{sv3d as o,sm4d as s}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{manipulatedObjectGeometry as l}from"./editingTools/manipulatedObjectUtils.js";import{computeCentroid as u}from"../layers/graphics/graphicUtils.js";import{createSphereGeometry as d}from"../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as f}from"../webgl-engine/materials/ColorMaterial.js";function p(t,n=4,r=!0,i){let a=e(t),o=!(t[3]<1);return new f({color:a,writeDepth:o,cullFace:2,renderOccluded:n,isDecoration:!0,shadingEnabled:r,screenSizeScale:i,screenSizeEnabled:i!=null})}function m({color:e,focusedColor:t,outlineColor:n,focusedOutlineColor:r,screenSize:i,renderOccluded:a=4,shaded:o=!0}){let s=p(e,a,o,i?.size),c,l;if(n!=null){let e=r??n,t=i==null?void 0:i.size+i.outlineSize*2;c=h(e,a,t),l=h(n,a,t)}else c=p(t??e,a,o,i?.size),l=s;return{material:s,focusedMaterial:c,outlineMaterial:l}}function h(t,n=4,r){return new f({color:e(t),writeDepth:!0,cullFace:1,renderOccluded:n,isDecoration:!0,forceTransparentMode:!0,shadingEnabled:!1,...r==null?{}:{screenSizeEnabled:!0,screenSizeScale:r}})}function g(e,t=.5,n=[0,0,0]){return d(e,t,16,16,{offset:n})}const _=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0}),v=Object.freeze({calloutLength:40,calloutWidth:1,discRadius:27,focusMultiplier:1.1}),y=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0});function b(e,a,c,l){let u=n(o.get(),e,c),d=x(u,r(o.get(),l,u),c,s.get());t(d,d);let f=i(o.get(),a,d);return Math.atan2(f[1],f[0])}function x(e,t,n,i){let s=a(o.get(),e),c=a(o.get(),t),l=r(o.get(),s,c);return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=0,i[4]=c[0],i[5]=c[1],i[6]=c[2],i[7]=0,i[8]=l[0],i[9]=l[1],i[10]=l[2],i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function S(e,t){let n=e.getViewForGraphic(t);return n!=null&&`computeAttachmentOrigin`in n?n.computeAttachmentOrigin(t,e.spatialReference):null}function C(e,t){let n=t.origin;n==null?w(e,l(t)):e.elevationAlignedLocation=n}function w(e,t){if(t==null)return;let n=t.type===`mesh`?t.origin:u(t);n!=null&&(e.location=c(n))}export{b as calculateInputRotationTransform,x as calculateTranslateRotateFromBases,p as createManipulatorMaterial,m as createManipulatorMaterials,g as createSphereGeometryAsOffsets,S as getGraphicAttachmentOrigin,C as placeAtObject,v as rotateManipulatorDefaults,_ as screenSizeManipulatorSettings,y as worldScaledManipulatorSettings};
2
+ import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as n,cross as r,transformMat4 as i,normalize as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{sv3d as o,sm4d as s}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{manipulatedObjectGeometry as l}from"./editingTools/manipulatedObjectUtils.js";import{computeCentroid as u}from"../layers/graphics/graphicUtils.js";import{createSphereGeometry as d}from"../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as f}from"../webgl-engine/materials/ColorMaterial.js";function p(t,n,r=4,i=!0,a){let o=e(n),s=!(n[3]<1);return new f({color:o,writeDepth:s,cullFace:2,renderOccluded:r,isDecoration:!0,shading:i?2:0,screenSizeScale:a,screenSizeEnabled:a!=null},t)}function m({spherical:e,color:t,focusedColor:n,outlineColor:r,focusedOutlineColor:i,screenSize:a,renderOccluded:o=4,shaded:s=!0}){let c=p(e,t,o,s,a?.size),l,u;if(r!=null){let t=i??r,n=a==null?void 0:a.size+a.outlineSize*2;l=h(e,t,o,n),u=h(e,r,o,n)}else l=p(e,n??t,o,s,a?.size),u=c;return{material:c,focusedMaterial:l,outlineMaterial:u}}function h(t,n,r=4,i){return new f({color:e(n),writeDepth:!0,cullFace:1,renderOccluded:r,isDecoration:!0,forceTransparentMode:!0,...i==null?{}:{screenSizeEnabled:!0,screenSizeScale:i}},t)}function g(e,t=.5,n=[0,0,0]){return d(e,t,16,16,{offset:n})}const _=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0}),v=Object.freeze({calloutLength:40,calloutWidth:1,discRadius:27,focusMultiplier:1.1}),y=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0});function b(e,a,c,l){let u=n(o.get(),e,c),d=x(u,r(o.get(),l,u),c,s.get());t(d,d);let f=i(o.get(),a,d);return Math.atan2(f[1],f[0])}function x(e,t,n,i){let s=a(o.get(),e),c=a(o.get(),t),l=r(o.get(),s,c);return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=0,i[4]=c[0],i[5]=c[1],i[6]=c[2],i[7]=0,i[8]=l[0],i[9]=l[1],i[10]=l[2],i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function S(e,t){let n=e.getViewForGraphic(t);return n!=null&&`computeAttachmentOrigin`in n?n.computeAttachmentOrigin(t,e.spatialReference):null}function C(e,t){let n=t.origin;n==null?w(e,l(t)):e.elevationAlignedLocation=n}function w(e,t){if(t==null)return;let n=t.type===`mesh`?t.origin:u(t);n!=null&&(e.location=c(n))}export{b as calculateInputRotationTransform,x as calculateTranslateRotateFromBases,p as createManipulatorMaterial,m as createManipulatorMaterials,g as createSphereGeometryAsOffsets,S as getGraphicAttachmentOrigin,C as placeAtObject,v as rotateManipulatorDefaults,_ as screenSizeManipulatorSettings,y as worldScaledManipulatorSettings};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../Color.js";import{getContrast as t}from"../../../../core/colorUtils.js";import{watch as n,initial as r}from"../../../../core/reactiveUtils.js";import{identity as i,translate as a,scale as o,fromQuat as s,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as u}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{subtract as d,normalize as f,scale as p,add as m,set as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as v,sm4d as y,sq4d as b}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as x,shiftRestartTipRadius as S,shiftRestartTipLength as C,shiftRestartArrowOutlineWidth as w,shiftRestartArrowLength as T,shiftRestartTubeRadius as E,shiftRestartTubeFocusMultiplier as D,shiftRestartTipFocusMultiplier as O}from"../../analysis/Slice/sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as k,IsShiftEdgeOnScreenFlag as A}from"../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as j}from"../Manipulator3D.js";import{RenderObject as M}from"../RenderObject.js";import{createPolylineGeometry as N,createConeGeometry as P,createPathExtrusionGeometry as F}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as I}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as L}from"../../webgl-engine/materials/RibbonLineMaterial.js";class R extends j{constructor(i,a,o=4){let s=new L({width:1,renderOccluded:o,isDecoration:!0},i),c=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),l=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),u=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),d=new I({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0});super({view:i,...z({offsetMode:a,tubeMaterial:c,tipMaterial:l,capMaterial:u,outlineMaterial:d,calloutMaterial:s})}),this._themeHandle=n(()=>i.effectiveTheme.accentColor,n=>{let r=t(n),i=n.toUnitRGBA(),a=r.toUnitRGBA(),o=e.blendColors(r,n,.4).toUnitRGBA(),f=e.blendColors(r,n,.14).toUnitRGBA();s.setParameters({color:i}),c.setParameters({color:f}),l.setParameters({color:a}),u.setParameters({color:o}),d.setParameters({color:i})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function z({offsetMode:e,tubeMaterial:t,tipMaterial:n,capMaterial:r,outlineMaterial:i,calloutMaterial:a}){let o=e===0?x:0,s=[_(o,0,-T/2),_(o,0,T/2)],c=H(s),l=B({vertices:s,padding:0,materials:{tube:t,tip:n,cap:r}}),u=B({vertices:s,padding:w,materials:{tube:i,tip:i,cap:i}}),d=N(a,[[o,0,0],[o-x,0,0]]),f=N(a,[[o,0,0],[o-x,0,0]]);return{renderObjects:[...l.normal.map(e=>new M(e,1|k)),...u.normal.map(e=>new M(e,1|k)),new M(d,1|k|A),...l.focused.map(e=>new M(e,2|k)),...u.focused.map(e=>new M(e,2|k)),new M(f,2|k|A)],autoScaleRenderObjects:!1,collisionType:{type:`line`,paths:[c]},collisionPriority:1,radius:S,state:k}}function B({vertices:e,padding:t,materials:n}){let r=r=>{let x=e.slice(),w=d(v.get(),x[0],x[1]);f(w,w);let T=d(v.get(),x[x.length-1],x[x.length-2]);if(f(T,T),t>0){let e=p(g(),T,-t);x[x.length-1]=m(e,e,x[x.length-1]);let n=p(g(),w,-t);x[0]=m(n,n,x[0])}let k=r?O:1,A=C*k,j=S*k,M=i(y.get());if(t>0){let e=A/4,n=h(v.get(),0,e,0),r=1+t/e;a(M,M,n),o(M,M,h(v.get(),r,r,r)),a(M,M,p(n,n,-1/r))}let N=i(l()),F=_(0,1,0),I=s(l(),u(b.get(),F,T));I[12]=x[x.length-1][0],I[13]=x[x.length-1][1],I[14]=x[x.length-1][2],c(I,I,M);let L=n.tube,R=V(E*(r?D:1)+t,x,L);R.transformation=N;let z=[R],B=n.tip,H=P(B,A,j,24,!1,!1,!0);H.transformation=I,z.push(H);let U=n.cap,W=P(U,A,j,24,!1,!0,!1);W.transformation=I,z.push(W);let G=s(l(),u(b.get(),F,w));return G[12]=x[0][0],G[13]=x[0][1],G[14]=x[0][2],c(G,G,M),z.push(H.instantiate({transformation:G})),z.push(W.instantiate({transformation:G})),z};return{normal:r(!1),focused:r(!0)}}function V(e,t,n){let r=[];for(let t=0;t<12;t++){let n=t/12*2*Math.PI;r.push([Math.cos(n)*e,Math.sin(n)*e])}return F(n,r,t,[],[],!1)}function H(e,t){let n=d(g(),e[e.length-1],e[e.length-2]);f(n,n),p(n,n,C),m(n,n,e[e.length-1]);{let t=d(g(),e[0],e[1]);return f(t,t),p(t,t,C),m(t,t,e[0]),[t,...e,n]}}export{R as ShiftManipulator};
2
+ import e from"../../../../Color.js";import{getContrast as t}from"../../../../core/colorUtils.js";import{watch as n,initial as r}from"../../../../core/reactiveUtils.js";import{identity as i,translate as a,scale as o,fromQuat as s,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as u}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{subtract as d,normalize as f,scale as p,add as m,set as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as v,sm4d as y,sq4d as b}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as x,shiftRestartTipRadius as S,shiftRestartTipLength as C,shiftRestartArrowOutlineWidth as w,shiftRestartArrowLength as T,shiftRestartTubeRadius as E,shiftRestartTubeFocusMultiplier as D,shiftRestartTipFocusMultiplier as O}from"../../analysis/Slice/sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as k,IsShiftEdgeOnScreenFlag as A}from"../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as j}from"../Manipulator3D.js";import{RenderObject as M}from"../RenderObject.js";import{createPolylineGeometry as N,createConeGeometry as P,createPathExtrusionGeometry as F}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as I}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as L}from"../../webgl-engine/materials/RibbonLineMaterial.js";class R extends j{constructor(i,a,o=4){let s=new L({width:1,renderOccluded:o,isDecoration:!0},i),c=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),l=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),u=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),d=new I({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0},i.state.isGlobal);super({view:i,...z({offsetMode:a,tubeMaterial:c,tipMaterial:l,capMaterial:u,outlineMaterial:d,calloutMaterial:s})}),this._themeHandle=n(()=>i.effectiveTheme.accentColor,n=>{let r=t(n),i=n.toUnitRGBA(),a=r.toUnitRGBA(),o=e.blendColors(r,n,.4).toUnitRGBA(),f=e.blendColors(r,n,.14).toUnitRGBA();s.setParameters({color:i}),c.setParameters({color:f}),l.setParameters({color:a}),u.setParameters({color:o}),d.setParameters({color:i})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function z({offsetMode:e,tubeMaterial:t,tipMaterial:n,capMaterial:r,outlineMaterial:i,calloutMaterial:a}){let o=e===0?x:0,s=[_(o,0,-T/2),_(o,0,T/2)],c=H(s),l=B({vertices:s,padding:0,materials:{tube:t,tip:n,cap:r}}),u=B({vertices:s,padding:w,materials:{tube:i,tip:i,cap:i}}),d=N(a,[[o,0,0],[o-x,0,0]]),f=N(a,[[o,0,0],[o-x,0,0]]);return{renderObjects:[...l.normal.map(e=>new M(e,1|k)),...u.normal.map(e=>new M(e,1|k)),new M(d,1|k|A),...l.focused.map(e=>new M(e,2|k)),...u.focused.map(e=>new M(e,2|k)),new M(f,2|k|A)],autoScaleRenderObjects:!1,collisionType:{type:`line`,paths:[c]},collisionPriority:1,radius:S,state:k}}function B({vertices:e,padding:t,materials:n}){let r=r=>{let x=e.slice(),w=d(v.get(),x[0],x[1]);f(w,w);let T=d(v.get(),x[x.length-1],x[x.length-2]);if(f(T,T),t>0){let e=p(g(),T,-t);x[x.length-1]=m(e,e,x[x.length-1]);let n=p(g(),w,-t);x[0]=m(n,n,x[0])}let k=r?O:1,A=C*k,j=S*k,M=i(y.get());if(t>0){let e=A/4,n=h(v.get(),0,e,0),r=1+t/e;a(M,M,n),o(M,M,h(v.get(),r,r,r)),a(M,M,p(n,n,-1/r))}let N=i(l()),F=_(0,1,0),I=s(l(),u(b.get(),F,T));I[12]=x[x.length-1][0],I[13]=x[x.length-1][1],I[14]=x[x.length-1][2],c(I,I,M);let L=n.tube,R=V(E*(r?D:1)+t,x,L);R.transformation=N;let z=[R],B=n.tip,H=P(B,A,j,24,!1,!1,!0);H.transformation=I,z.push(H);let U=n.cap,W=P(U,A,j,24,!1,!0,!1);W.transformation=I,z.push(W);let G=s(l(),u(b.get(),F,w));return G[12]=x[0][0],G[13]=x[0][1],G[14]=x[0][2],c(G,G,M),z.push(H.instantiate({transformation:G})),z.push(W.instantiate({transformation:G})),z};return{normal:r(!1),focused:r(!0)}}function V(e,t,n){let r=[];for(let t=0;t<12;t++){let n=t/12*2*Math.PI;r.push([Math.cos(n)*e,Math.sin(n)*e])}return F(n,r,t,[],[],!1)}function H(e,t){let n=d(g(),e[e.length-1],e[e.length-2]);f(n,n),p(n,n,C),m(n,n,e[e.length-1]);{let t=d(g(),e[0],e[1]);return f(t,t),p(t,t,C),m(t,t,e[0]),[t,...e,n]}}export{R as ShiftManipulator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{multiplyOpacityToUnitRGBA as e,colorEquals as t,getContrast as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,sync as o}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as s}from"../../../../../core/screenUtils.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as d}from"../../manipulatorUtils.js";import{RenderObject as f}from"../../RenderObject.js";import{PickResult as p}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as h}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as g}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as _}from"../../../../interactive/ToolIntersector.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=c();let{analysisViewData:t,manipulators:n,toolState:r,view:i,visible:a}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new g:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=i,this._intersector=_(i.state.viewingMode);let o=d(this._handleColor);o.setParameters({testsTransparentRenderOrder:4});let s=[new f(h(o,1,32,32))],l=new u({view:i,renderObjects:s});l.available=!1,l.radius=C,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._manipulatorMaterial=o,this._laserLine=new m({view:i,attached:!0,style:{glowWidth:b,glowFalloff:x,innerWidth:S},isDecoration:!0}),this._updateVisibility(a??!0)}destroy(){this._listenerHandles=i(this._listenerHandles),this._manipulators=this._isManipulatorsOwner?i(this._manipulators):null,this._laserLine=i(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(e){!this._destroyed&&this._visible!==e&&this._updateVisibility(e)}_updateVisibility(e){this._visible=e,this._laserLine.visible=e,e?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(e=>this._removeVertexManipulator(e)),this.vertexManipulators=[])}vertexHandleAt(e,t){return this._manipulators.intersect(e,t)?.metadata}pick(e){let t=this._view.spatialReference,n=s(e.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(n,this._intersector);let r=this._intersector.results.min,i=c();if(!r.getIntersectionPoint(i))return null;let a=this._view.renderCoordsHelper.fromRenderCoords(i,new l({spatialReference:t}));return a==null?null:new p(i,a)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){let e=[new f(h(this._manipulatorMaterial,1,32,32))],t=new u({view:this._view,renderObjects:e});return t.radius=C,this._manipulators.add(t),t}_removeVertexManipulator(e){this._manipulators.remove(e)}_updateVertexManipulators(){let{viewData:e}=this._analysisViewData,t=this._analysisViewData.path?this._analysisViewData.path.vertices:[],n=this.vertexManipulators;y(n,t.length,()=>this._createVertexManipulator(),e=>this._removeVertexManipulator(e)),n.forEach((n,r)=>{n.metadata=t[r],n.renderLocation=e.vertexData.positionsRender[r],n.cursor=r===0&&this._toolState.polygonState===`drawing`?`crosshair`:null}),this._toolState.polygonState===`drawing`&&this._analysisViewData.stagedPoint!=null?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){let{lastDraggedVertex:e}=this._analysisViewData;switch(this._toolState.polygonState){case`drawing`:return this._analysisViewData.stagedPoint==null?e==null?this._analysisViewData.path.lastPoint:this._analysisViewData.path.getVertexPositionAsPoint(e):this._analysisViewData.stagedPoint;case`editing`:return e==null?null:this._analysisViewData.path.getVertexPositionAsPoint(e);default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){let e=this._toolState.polygonState!==`measured`&&this._toolState.active,t=this._getFocusPoint();if(e&&t!=null){let e=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(t,e),this._laserLine.heightManifoldTarget=e}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new r,this._listenerHandles.add([a(()=>this._toolState.polygonState,()=>this._updateLaserLine()),a(()=>this._analysisViewData.viewData,()=>this._updateAll(),o),a(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),a(()=>this._toolState.active,()=>this._updateAll()),a(()=>this._view.effectiveTheme.accentColor,t=>{let r=e(t,.5);this._manipulatorMaterial.setParameters({color:r});let i=t.toUnitRGB(),a=n(t).toUnitRGB(),o=t.a*.75,s=this._laserLine;s.style={...s.style,glowColor:i,innerColor:a,globalAlpha:o}},{initial:!0,equals:t})])}_destroyListeners(){this._listenerHandles=i(this._listenerHandles)}}function y(e,t,n,r){for(;e.length<t;)e.push(n());if(r)for(;e.length>t;)r(e.pop());else e.length=t}const b=8,x=8,S=1,C=5;export{v as default};
2
+ import{multiplyOpacityToUnitRGBA as e,colorEquals as t,getContrast as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,sync as o}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as s}from"../../../../../core/screenUtils.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as d}from"../../manipulatorUtils.js";import{RenderObject as f}from"../../RenderObject.js";import{PickResult as p}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as h}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as g}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as _}from"../../../../interactive/ToolIntersector.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=c();let{analysisViewData:t,manipulators:n,toolState:r,view:i,visible:a}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new g:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=i,this._intersector=_(i.state.viewingMode);let o=d(i.state.isGlobal,this._handleColor);o.setParameters({testsTransparentRenderOrder:4});let s=[new f(h(o,1,32,32))],l=new u({view:i,renderObjects:s});l.available=!1,l.radius=C,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._manipulatorMaterial=o,this._laserLine=new m({view:i,attached:!0,style:{glowWidth:b,glowFalloff:x,innerWidth:S},isDecoration:!0}),this._updateVisibility(a??!0)}destroy(){this._listenerHandles=i(this._listenerHandles),this._manipulators=this._isManipulatorsOwner?i(this._manipulators):null,this._laserLine=i(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(e){!this._destroyed&&this._visible!==e&&this._updateVisibility(e)}_updateVisibility(e){this._visible=e,this._laserLine.visible=e,e?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(e=>this._removeVertexManipulator(e)),this.vertexManipulators=[])}vertexHandleAt(e,t){return this._manipulators.intersect(e,t)?.metadata}pick(e){let t=this._view.spatialReference,n=s(e.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(n,this._intersector);let r=this._intersector.results.min,i=c();if(!r.getIntersectionPoint(i))return null;let a=this._view.renderCoordsHelper.fromRenderCoords(i,new l({spatialReference:t}));return a==null?null:new p(i,a)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){let e=[new f(h(this._manipulatorMaterial,1,32,32))],t=new u({view:this._view,renderObjects:e});return t.radius=C,this._manipulators.add(t),t}_removeVertexManipulator(e){this._manipulators.remove(e)}_updateVertexManipulators(){let{viewData:e}=this._analysisViewData,t=this._analysisViewData.path?this._analysisViewData.path.vertices:[],n=this.vertexManipulators;y(n,t.length,()=>this._createVertexManipulator(),e=>this._removeVertexManipulator(e)),n.forEach((n,r)=>{n.metadata=t[r],n.renderLocation=e.vertexData.positionsRender[r],n.cursor=r===0&&this._toolState.polygonState===`drawing`?`crosshair`:null}),this._toolState.polygonState===`drawing`&&this._analysisViewData.stagedPoint!=null?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){let{lastDraggedVertex:e}=this._analysisViewData;switch(this._toolState.polygonState){case`drawing`:return this._analysisViewData.stagedPoint==null?e==null?this._analysisViewData.path.lastPoint:this._analysisViewData.path.getVertexPositionAsPoint(e):this._analysisViewData.stagedPoint;case`editing`:return e==null?null:this._analysisViewData.path.getVertexPositionAsPoint(e);default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){let e=this._toolState.polygonState!==`measured`&&this._toolState.active,t=this._getFocusPoint();if(e&&t!=null){let e=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(t,e),this._laserLine.heightManifoldTarget=e}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new r,this._listenerHandles.add([a(()=>this._toolState.polygonState,()=>this._updateLaserLine()),a(()=>this._analysisViewData.viewData,()=>this._updateAll(),o),a(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),a(()=>this._toolState.active,()=>this._updateAll()),a(()=>this._view.effectiveTheme.accentColor,t=>{let r=e(t,.5);this._manipulatorMaterial.setParameters({color:r});let i=t.toUnitRGB(),a=n(t).toUnitRGB(),o=t.a*.75,s=this._laserLine;s.style={...s.style,glowColor:i,innerColor:a,globalAlpha:o}},{initial:!0,equals:t})])}_destroyListeners(){this._listenerHandles=i(this._listenerHandles)}}function y(e,t,n,r){for(;e.length<t;)e.push(n());if(r)for(;e.length>t;)r(e.pop());else e.length=t}const b=8,x=8,S=1,C=5;export{v as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n,getContrast as r,colorVectorEquals as i,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as s,initial as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as _}from"../../../webgl-engine/lib/GeometryUtil.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new g({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(s(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=o(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:r(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:n(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=d(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=d(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=d(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.viewingMode!==`local`&&i&&!!this.analysis.startPoint&&a===`geodesic`,s=i&&r.viewMode===2;return{heightManifoldTarget:a===`euclidean`?e:null,pointDistanceLine:o?this._pointDistanceLine:null,lineVerticalPlaneSegment:s?f(this._startPosition,this._endPosition):null}}get _focusPosition(){let{lineState:e}=this.toolState,t=this.analysisViewData,n=t!=null&&!t.destroyed&&t.measurementMode===1&&t.viewMode===1;switch(e){case`drawing`:return n?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case`editing`:return n?this._lastDraggedHandle===`start`?this._endPosition:this._startPosition:this._lastDraggedHandle===`start`?this._startPosition:this._endPosition;default:return this.cursorPoint==null?null:this._cursorPosition}}get _pointDistanceLine(){return{origin:this.toolState.lineState===`drawing`||this._lastDraggedHandle===`end`?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){let e=this._params,{view:t}=this,n=()=>{let n=m(e.handleColor);n.setParameters({testsTransparentRenderOrder:5});let r=[new h(_(n,1,32,32))],i=new p({view:t,renderObjects:r});return i.available=!1,i.radius=e.handleRadius,[i,n]},[r,o]=n(),[c,l]=n(),u=new p({view:this.view,available:!1,interactive:!1}),{elevationAlignedStartPoint:d,elevationAlignedEndPoint:f}=this.analysisViewData;d!=null&&(r.location=d,r.available=!0),f!=null&&(c.location=f,c.available=!0);let g=()=>{let e=this._lastDraggedHandle;r.grabbing&&!c.grabbing&&(e=`start`),c.grabbing&&!r.grabbing&&(e=`end`),!r.grabbing&&!c.grabbing&&(e=null),this._lastDraggedHandle=e},v=r.events.on(`grab-changed`,g),y=c.events.on(`grab-changed`,g);return this.addHandles([v,y,s(()=>a(this._params.handleColor),e=>{o.setParameters({color:e}),l.setParameters({color:e})},{equals:i})],`manipulators`),{start:r,end:c,cursor:u}}show(){!this.destroyed&&!this._visible&&this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles(`analysis-view`),this.addHandles([s(()=>this.analysisViewData?.destroyed,e=>{e&&this.removeHandles(`analysis-view`)},c),s(()=>[this.toolState.lineState===`measured`,this.analysisViewData],([e,t])=>{t!=null&&!t.destroyed&&(t.allowVisualElementsOrientationChange=!e)},c),s(()=>this._laserLineParams,e=>{let t=this._laserLine;t.heightManifoldTarget=e.heightManifoldTarget,t.pointDistanceLine=e.pointDistanceLine,t.lineVerticalPlaneSegment=e.lineVerticalPlaneSegment},c)],`analysis-view`)}_updateVisibility(e){this.initialized&&(this._visible=e,e&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=e)}};e([l({constructOnly:!0})],v.prototype,`view`,void 0),e([l()],v.prototype,`_params`,null),e([l({constructOnly:!0})],v.prototype,`analysis`,void 0),e([l({constructOnly:!0})],v.prototype,`analysisViewData`,void 0),e([l()],v.prototype,`cursorPoint`,void 0),e([l()],v.prototype,`toolState`,void 0),e([l()],v.prototype,`visible`,null),e([l()],v.prototype,`testData`,null),e([l()],v.prototype,`_visible`,void 0),e([l()],v.prototype,`_laserLine`,void 0),e([l({constructOnly:!0})],v.prototype,`laserLineEnabled`,void 0),e([l()],v.prototype,`_cursorPosition`,null),e([l()],v.prototype,`_startPosition`,null),e([l()],v.prototype,`_endPosition`,null),e([l()],v.prototype,`_lastDraggedHandle`,void 0),e([l()],v.prototype,`_laserLineParams`,null),e([l()],v.prototype,`_focusPosition`,null),e([l()],v.prototype,`_pointDistanceLine`,null),v=e([u(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView`)],v);export{v as DirectLineMeasurement3DView};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n,getContrast as r,colorVectorEquals as i,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as s,initial as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as _}from"../../../webgl-engine/lib/GeometryUtil.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new g({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(s(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=o(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:r(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:n(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=d(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=d(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=d(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.viewingMode!==`local`&&i&&!!this.analysis.startPoint&&a===`geodesic`,s=i&&r.viewMode===2;return{heightManifoldTarget:a===`euclidean`?e:null,pointDistanceLine:o?this._pointDistanceLine:null,lineVerticalPlaneSegment:s?f(this._startPosition,this._endPosition):null}}get _focusPosition(){let{lineState:e}=this.toolState,t=this.analysisViewData,n=t!=null&&!t.destroyed&&t.measurementMode===1&&t.viewMode===1;switch(e){case`drawing`:return n?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case`editing`:return n?this._lastDraggedHandle===`start`?this._endPosition:this._startPosition:this._lastDraggedHandle===`start`?this._startPosition:this._endPosition;default:return this.cursorPoint==null?null:this._cursorPosition}}get _pointDistanceLine(){return{origin:this.toolState.lineState===`drawing`||this._lastDraggedHandle===`end`?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){let e=this._params,{view:t}=this,n=()=>{let n=m(t.state.isGlobal,e.handleColor);n.setParameters({testsTransparentRenderOrder:5});let r=[new h(_(n,1,32,32))],i=new p({view:t,renderObjects:r});return i.available=!1,i.radius=e.handleRadius,[i,n]},[r,o]=n(),[c,l]=n(),u=new p({view:this.view,available:!1,interactive:!1}),{elevationAlignedStartPoint:d,elevationAlignedEndPoint:f}=this.analysisViewData;d!=null&&(r.location=d,r.available=!0),f!=null&&(c.location=f,c.available=!0);let g=()=>{let e=this._lastDraggedHandle;r.grabbing&&!c.grabbing&&(e=`start`),c.grabbing&&!r.grabbing&&(e=`end`),!r.grabbing&&!c.grabbing&&(e=null),this._lastDraggedHandle=e},v=r.events.on(`grab-changed`,g),y=c.events.on(`grab-changed`,g);return this.addHandles([v,y,s(()=>a(this._params.handleColor),e=>{o.setParameters({color:e}),l.setParameters({color:e})},{equals:i})],`manipulators`),{start:r,end:c,cursor:u}}show(){!this.destroyed&&!this._visible&&this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles(`analysis-view`),this.addHandles([s(()=>this.analysisViewData?.destroyed,e=>{e&&this.removeHandles(`analysis-view`)},c),s(()=>[this.toolState.lineState===`measured`,this.analysisViewData],([e,t])=>{t!=null&&!t.destroyed&&(t.allowVisualElementsOrientationChange=!e)},c),s(()=>this._laserLineParams,e=>{let t=this._laserLine;t.heightManifoldTarget=e.heightManifoldTarget,t.pointDistanceLine=e.pointDistanceLine,t.lineVerticalPlaneSegment=e.lineVerticalPlaneSegment},c)],`analysis-view`)}_updateVisibility(e){this.initialized&&(this._visible=e,e&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=e)}};e([l({constructOnly:!0})],v.prototype,`view`,void 0),e([l()],v.prototype,`_params`,null),e([l({constructOnly:!0})],v.prototype,`analysis`,void 0),e([l({constructOnly:!0})],v.prototype,`analysisViewData`,void 0),e([l()],v.prototype,`cursorPoint`,void 0),e([l()],v.prototype,`toolState`,void 0),e([l()],v.prototype,`visible`,null),e([l()],v.prototype,`testData`,null),e([l()],v.prototype,`_visible`,void 0),e([l()],v.prototype,`_laserLine`,void 0),e([l({constructOnly:!0})],v.prototype,`laserLineEnabled`,void 0),e([l()],v.prototype,`_cursorPosition`,null),e([l()],v.prototype,`_startPosition`,null),e([l()],v.prototype,`_endPosition`,null),e([l()],v.prototype,`_lastDraggedHandle`,void 0),e([l()],v.prototype,`_laserLineParams`,null),e([l()],v.prototype,`_focusPosition`,null),e([l()],v.prototype,`_pointDistanceLine`,null),v=e([u(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView`)],v);export{v as DirectLineMeasurement3DView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{watch as e}from"../../../../core/reactiveUtils.js";import{fromTranslation as t,scale as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as i,normalize as a,subtract as o,copy as s,exactEquals as c,add as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,ZEROS as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as f}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as h}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as g}from"./EngineVisualElement.js";import{drapedZ as _}from"../../terrain/DrapedZ.js";import{Attribute as v}from"../../webgl-engine/lib/Attribute.js";import{Geometry as y}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as b}from"../../webgl-engine/lib/GeometryUtil.js";import{Object3D as x}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as S}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as C}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class T extends g{constructor(e){super(e),this._maxSize=0,this._position=u(),this._up=u(),this._right=u(),this._renderOccluded=4,this._color=p(1,0,0,1),this._outlineColor=p(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createObject:()=>new x({castShadow:!1}),createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D(),forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:E,forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateQuadMaterial())}get transparentRenderOrder(){return this._transparentRenderOrder}set transparentRenderOrder(e){this._transparentRenderOrder=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get color(){return this._color}set color(e){f(this._color,e),this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(e){f(this._outlineColor,e),this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(e){let t=this._outlineSize===0!=(e===0);this._outlineSize=e,t?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(e){this._outlineRenderOccluded=e,this._updateOutlineMaterial()}set geometry({previous:e,center:t,next:n}){this._maxSize=Math.min(i(t,e),i(t,n))/3,a(this._up,o(this._up,e,t)),a(this._right,o(this._right,n,t)),s(this._position,t),this.recreateGeometry()}_createObject3DResources(e){let t=new C(this._quadMaterialParameters),n=this._outlineSize===0?void 0:new w(this._outlineMaterialParameters,this.view);return this._createObject3DGeometries(e,t,n),{quadMaterial:t,outlineMaterial:n}}_createObject3DGeometries(e,t,n){if(c(this._up,d)&&c(this._right,d))return;let r=this._createGeometries(t,n);for(let t of r)e.addGeometry(t);this._updateTransformObject3D(e)}_createDrapedResources(){let t=new C(this._quadMaterialParameters),n=this._outlineSize===0?void 0:new w(this._outlineMaterialParameters,this.view),r=this._createGeometries(t,n).map(e=>new S(e));return this._setTransformDraped(r),{quadMaterial:t,outlineMaterial:n,geometries:r,pixelRatioHandle:e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry())}}_createGeometries(e,t){let{up:n,right:r,corner:i}=this._getVertices(),a=D(n,r,i,e);return t?[a,b(t,[n,i,r])]:[a]}_getVertices(){let e=this._up,t=this._right,n=l(m.get(),e,t);return this.isDraped&&(e=s(m.get(),e),t=s(m.get(),t),e[2]=0,t[2]=0,n[2]=0),{up:e,right:t,corner:n}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(e=this.object3dResources.object){if(!e)return;let r=this.view.state.camera,i=this._size*r.computeScreenPixelSizeAt(this._position),a=Math.min(this._maxSize,i);t(O,this._position),n(O,O,[a,a,a]),e.transformation=O}_setTransformDraped(e){if(e.length===0)return;let{view:{overlayManager:r,state:{contentPixelRatio:i}}}=this,{_position:a,_size:o}=this,c=s(m.get(),a);c[2]=_;let l=k;l.spatialReference=r.spatialReference,l.x=c[0],l.y=c[1];let u=o*(this.view.overlayPixelSizeInMapUnits(l)*i),d=Math.min(this._maxSize,u);t(O,c),n(O,O,[d,d,1]);for(let t of e)t.transformation=O}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:1,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration,testsTransparentRenderOrder:this._transparentRenderOrder}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters),this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,testsTransparentRenderOrder:this._transparentRenderOrder,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters),this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}function E(e){e.pixelRatioHandle.remove(),e.geometries=[]}function D(e,t,n,r){return new y(r,[[`position`,new v([0,0,0,...t,...e,...n],[0,1,2,1,2,3],3,!0)]])}const O=r(),k=h(0,0,void 0,null);export{T as RightAngleQuadVisualElement};
2
+ import{watch as e}from"../../../../core/reactiveUtils.js";import{fromTranslation as t,scale as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as i,normalize as a,subtract as o,copy as s,exactEquals as c,add as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,ZEROS as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as f}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as h}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as g}from"./EngineVisualElement.js";import{drapedZ as _}from"../../terrain/DrapedZ.js";import{Attribute as v}from"../../webgl-engine/lib/Attribute.js";import{Geometry as y}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as b}from"../../webgl-engine/lib/GeometryUtil.js";import{Object3D as x}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as S}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as C}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class T extends g{constructor(e){super(e),this._maxSize=0,this._position=u(),this._up=u(),this._right=u(),this._renderOccluded=4,this._color=p(1,0,0,1),this._outlineColor=p(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createObject:()=>new x({castShadow:!1}),createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D(),forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:E,forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateQuadMaterial())}get transparentRenderOrder(){return this._transparentRenderOrder}set transparentRenderOrder(e){this._transparentRenderOrder=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get color(){return this._color}set color(e){f(this._color,e),this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(e){f(this._outlineColor,e),this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(e){let t=this._outlineSize===0!=(e===0);this._outlineSize=e,t?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(e){this._outlineRenderOccluded=e,this._updateOutlineMaterial()}set geometry({previous:e,center:t,next:n}){this._maxSize=Math.min(i(t,e),i(t,n))/3,a(this._up,o(this._up,e,t)),a(this._right,o(this._right,n,t)),s(this._position,t),this.recreateGeometry()}_createObject3DResources(e){let t=new C(this._quadMaterialParameters,this.view.state.isGlobal),n=this._outlineSize===0?void 0:new w(this._outlineMaterialParameters,this.view);return this._createObject3DGeometries(e,t,n),{quadMaterial:t,outlineMaterial:n}}_createObject3DGeometries(e,t,n){if(c(this._up,d)&&c(this._right,d))return;let r=this._createGeometries(t,n);for(let t of r)e.addGeometry(t);this._updateTransformObject3D(e)}_createDrapedResources(){let t=new C(this._quadMaterialParameters,this.view.state.isGlobal),n=this._outlineSize===0?void 0:new w(this._outlineMaterialParameters,this.view),r=this._createGeometries(t,n).map(e=>new S(e));return this._setTransformDraped(r),{quadMaterial:t,outlineMaterial:n,geometries:r,pixelRatioHandle:e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry())}}_createGeometries(e,t){let{up:n,right:r,corner:i}=this._getVertices(),a=D(n,r,i,e);return t?[a,b(t,[n,i,r])]:[a]}_getVertices(){let e=this._up,t=this._right,n=l(m.get(),e,t);return this.isDraped&&(e=s(m.get(),e),t=s(m.get(),t),e[2]=0,t[2]=0,n[2]=0),{up:e,right:t,corner:n}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(e=this.object3dResources.object){if(!e)return;let r=this.view.state.camera,i=this._size*r.computeScreenPixelSizeAt(this._position),a=Math.min(this._maxSize,i);t(O,this._position),n(O,O,[a,a,a]),e.transformation=O}_setTransformDraped(e){if(e.length===0)return;let{view:{overlayManager:r,state:{contentPixelRatio:i}}}=this,{_position:a,_size:o}=this,c=s(m.get(),a);c[2]=_;let l=k;l.spatialReference=r.spatialReference,l.x=c[0],l.y=c[1];let u=o*(this.view.overlayPixelSizeInMapUnits(l)*i),d=Math.min(this._maxSize,u);t(O,c),n(O,O,[d,d,1]);for(let t of e)t.transformation=O}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:1,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration,testsTransparentRenderOrder:this._transparentRenderOrder}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters),this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,testsTransparentRenderOrder:this._transparentRenderOrder,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters),this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}function E(e){e.pixelRatioHandle.remove(),e.geometries=[]}function D(e,t,n,r){return new y(r,[[`position`,new v([0,0,0,...t,...e,...n],[0,1,2,1,2,3],3,!0)]])}const O=r(),k=h(0,0,void 0,null);export{T as RightAngleQuadVisualElement};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{set as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{exactEquals as n,copy as r}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromArray as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{createSphereGeometryAsOffsets as a}from"../manipulatorUtils.js";import{Object3DVisualElement as o}from"./Object3DVisualElement.js";import{ElevationContext as s}from"../../layers/graphics/ElevationContext.js";import{geometryToRenderInfo as c}from"../../support/renderInfoUtils/point.js";import{ColorMaterial as l}from"../../webgl-engine/materials/ColorMaterial.js";class u extends o{constructor(e){super(e),this.view=null,this._renderOccluded=4,this._vertices=null,this._spatialReference=null,this._color=i([1,127/255,0,1]),this._size=11,this._outlineColor=i([0,0,0,.5]),this._outlineSize=1,this._elevationInfo=null,this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(e){this._vertices=e,this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(e){this._spatialReference=e,this.recreateGeometry()}get color(){return this._color}set color(e){n(e,this._color)||(r(this._color,e),this._updateMaterial())}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){n(e,this._outlineColor)||(r(this._outlineColor,e),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,screenSizeScale:this.size+this.outlineSize*2,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){let t=this.vertices;if(t==null||t.length===0)return[];let n=c(t,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,s.fromElevationInfo(this.elevationInfo)),r=[],i=n.numVertices,o=n.position;for(let t=0;t<i;++t){let n=e(d,o[t*3],o[t*3+1],o[t*3+2]),i=a(this._vertexMaterial,.5,n),s=a(this._vertexOutlineMaterial,.5,n);r.push({vertexGeometry:i,vertexOutlineGeometry:s})}return r}createGeometries(e){let t=this._createRenderGeometries();for(let{vertexGeometry:n,vertexOutlineGeometry:r}of t)e.addGeometry(n),e.addGeometry(r)}createExternalResources(){this._vertexMaterial=new l({...this._vertexMaterialParameters,writeDepth:!0,cullFace:2,screenSizeEnabled:!0,shadingEnabled:!0}),this._vertexOutlineMaterial=new l({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:1,screenSizeEnabled:!0,shadingEnabled:!1})}destroyExternalResources(){this._vertexMaterial=null,this._vertexOutlineMaterial=null}forEachMaterial(e){e(this._vertexMaterial),e(this._vertexOutlineMaterial)}}const d=t();export{u as VerticesVisualElement};
2
+ import{set as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{exactEquals as n,copy as r}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromArray as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{createSphereGeometryAsOffsets as a}from"../manipulatorUtils.js";import{Object3DVisualElement as o}from"./Object3DVisualElement.js";import{ElevationContext as s}from"../../layers/graphics/ElevationContext.js";import{geometryToRenderInfo as c}from"../../support/renderInfoUtils/point.js";import{ColorMaterial as l}from"../../webgl-engine/materials/ColorMaterial.js";class u extends o{constructor(e){super(e),this.view=null,this._renderOccluded=4,this._vertices=null,this._spatialReference=null,this._color=i([1,127/255,0,1]),this._size=11,this._outlineColor=i([0,0,0,.5]),this._outlineSize=1,this._elevationInfo=null,this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(e){this._vertices=e,this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(e){this._spatialReference=e,this.recreateGeometry()}get color(){return this._color}set color(e){n(e,this._color)||(r(this._color,e),this._updateMaterial())}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){n(e,this._outlineColor)||(r(this._outlineColor,e),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,screenSizeScale:this.size+this.outlineSize*2,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){let t=this.vertices;if(t==null||t.length===0)return[];let n=c(t,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,s.fromElevationInfo(this.elevationInfo)),r=[],i=n.numVertices,o=n.position;for(let t=0;t<i;++t){let n=e(d,o[t*3],o[t*3+1],o[t*3+2]),i=a(this._vertexMaterial,.5,n),s=a(this._vertexOutlineMaterial,.5,n);r.push({vertexGeometry:i,vertexOutlineGeometry:s})}return r}createGeometries(e){let t=this._createRenderGeometries();for(let{vertexGeometry:n,vertexOutlineGeometry:r}of t)e.addGeometry(n),e.addGeometry(r)}createExternalResources(){this._vertexMaterial=new l({...this._vertexMaterialParameters,writeDepth:!0,cullFace:2,screenSizeEnabled:!0,shading:2},this.view.state.isGlobal),this._vertexOutlineMaterial=new l({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:1,screenSizeEnabled:!0},this.view.state.isGlobal)}destroyExternalResources(){this._vertexMaterial=null,this._vertexOutlineMaterial=null}forEachMaterial(e){e(this._vertexMaterial),e(this._vertexOutlineMaterial)}}const d=t();export{u as VerticesVisualElement};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import n from"../../../Graphic.js";import{removeUnordered as r,isSome as i}from"../../../core/arrayUtils.js";import has from"../../../core/has.js";import a from"../../../core/Logger.js";import{equals as o}from"../../../core/MapUtils.js";import{destroyMaybe as s}from"../../../core/maybe.js";import c from"../../../core/PooledArray.js";import{ignoreAbortErrors as l,isAbortError as u,throwIfAborted as d}from"../../../core/promiseUtils.js";import{initial as f,watch as p}from"../../../core/reactiveUtils.js";import{schedule as m}from"../../../core/scheduling.js";import{equals as h}from"../../../core/SetUtils.js";import{isArrayBuffer as g}from"../../../core/typedArrayUtil.js";import{property as _,subclass as v}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as y,exactEquals as ee,invert as te}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as ne,IDENTITY as re}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as ie,getTranslation as ae}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as oe,create as se}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as ce}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{set as b,transformMat4 as x,transformMat3 as le,sub as ue,add as S,scale as de,subtract as C}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as T}from"../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as fe}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as E}from"../../../core/support/UpdatingHandles.js";import{getSphericalPCPF as D}from"../../../geometry/spatialReferenceEllipsoidUtils.js";import{localLinearScaleFactors as pe}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectBoundingSphere as me}from"../../../geometry/projection/projectBoundingSphere.js";import{projectBuffer as he}from"../../../geometry/projection/projectBuffer.js";import{getProjectorName as O}from"../../../geometry/projection/projectors.js";import{projectVectorToVector as k}from"../../../geometry/projection/projectVectorToVector.js";import{create as A,fromBuffer as ge,toRect as j}from"../../../geometry/support/aaBoundingBox.js";import{create as M,intersects as N}from"../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as P,ensurePackedMat4f64 as _e}from"../../../geometry/support/DoubleArray.js";import{compactFloatArray as ve}from"../../../geometry/support/FloatArray.js";import{compactIndices as ye}from"../../../geometry/support/Indices.js";import{Sphere as F}from"../../../geometry/support/sphere.js";import{newUByteArray as I}from"../../../geometry/support/UByteArray.js";import{fallbackObjectIDAttribute as L}from"../../../layers/LayerConstants.js";import be from"../../../layers/graphics/controllers/I3SOnDemandController.js";import{fixFields as xe}from"../../../layers/support/fieldUtils.js";import{I3SExtractChanges as Se}from"../../../layers/support/I3SExtractChanges.js";import R from"../../../layers/support/SceneModification.js";import{getColor as Ce,getOpacity as we}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{isBasemapLayerView as z}from"../../../support/basemapUtils.js";import{getElevationOffset as B}from"../../../support/elevationInfoUtils.js";import{loadArcade as Te}from"../../../support/loadArcade.js";import V from"../../../symbols/MeshSymbol3D.js";import Ee from"../../../symbols/SimpleFillSymbol.js";import{ContentGeometryUpdateEvent as De}from"./ContentGeometryLayerView.js";import Oe from"./I3SMeshViewLabeler.js";import{I3SMeshViewPerformanceInfo as ke}from"./I3SMeshViewPerformanceInfo.js";import{initialize as Ae,setModificationsSync as je,filterObbsForModificationsSync as Me,interpretObbModificationResults as Ne}from"./SceneLayerWorker.js";import{SceneLayerWorkerHandle as Pe,toWasmModification as Fe}from"./SceneLayerWorkerHandle.js";import{overrideColor as Ie}from"./graphics/graphicUtils.js";import{areLabelsVisible as Le}from"./graphics/Labeler.js";import Re from"./i3s/Highlights.js";import{I3SAsyncElevationUpdater as ze}from"./i3s/I3SAsyncElevationUpdater.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SCrossfadeHelper as Be,NodeCrossfadeMetaData as Ve}from"./i3s/I3SCrossfadeHelper.js";import{boundingBoxCornerPoints as He}from"./i3s/I3SGeometryUtil.js";import{I3SIntersectionHandler as Ue,TraversedIntersectionNode as We}from"./i3s/I3SIntersectionHandler.js";import{getSupportedEncodings as Ge,selectEncoding as Ke,defaultMaterial as qe,createTexture as Je,configureMaterial as Ye}from"./i3s/I3SMaterialUtil.js";import{I3SOverrides as Xe}from"./i3s/I3SOverrides.js";import{computeGlobalTransformation as Ze}from"./i3s/I3SProjectionUtil.js";import{rendererNeedsTextures as Qe,checkSceneLayerValid as $e,checkSceneLayerCompatibleWithView as et,whenGraphicAttributes as tt,computeVisibilityObb as nt,filterInPlace as rt,intersectBoundingRectWithMbs as it,addWraparound as U,getSymbolInfo as at,transparentEdgeMaterial as W,getClipRect as ot}from"./i3s/I3SUtil.js";import{IDBCache as st}from"./i3s/IDBCache.js";import{IDBMockCache as ct}from"./i3s/IDBMockCache.js";import{LayerElevationProvider as lt}from"./i3s/LayerElevationProvider.js";import{SymbologyInfo as ut}from"./i3s/SymbologyInfo.js";import{attributeLookup as G}from"./support/attributeUtils.js";import{normalizeHighlightTarget as dt,emptyHighlightHandle as ft}from"./support/highlightUtils.js";import{makeScheduleFunction as pt}from"./support/makeScheduleFunction.js";import{debugFlags as K}from"../support/debugFlags.js";import{ElevationRange as q}from"../support/ElevationRange.js";import{toBoundingRect as mt}from"../support/extentUtils.js";import{Obb as J,ensurePackedObbData as ht}from"../support/orientedBoundingBox.js";import{updatingProgress as gt}from"../support/updatingProperties.js";import{glLayout as _t}from"../support/buffer/glUtil.js";import{ObjectParameters as vt}from"../webgl-engine/collections/Component/ObjectParameters.js";import{createVertexBufferLayout as yt,ComponentGeometryParameters as bt,SourceGeometry as xt,VertexBufferLayoutCreationParameters as St}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as Ct}from"../webgl-engine/collections/Component/Transform.js";import{emissiveStrengthDefault as Y}from"../webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js";import{getHighlightName as wt}from"../../support/highlightOptionsUtils.js";import{TextureCompressionTracker as Tt}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as Et}from"../../../webscene/support/AlphaCutoff.js";const Dt=[1,1,1,1];class Ot extends Ve{constructor(e,t,n,r,i,a,o,s,c,l,u){super(),this.node=e,this.featureIds=t,this.objectHandle=n,this.cachedRendererVersion=r,this.attributeInfo=i,this.material=a,this.textures=o,this.anchorIds=s,this.anchors=c,this._elevationAlignmentRange=new q,this._geometryElevationRange=new q,this.cachedElevationAnchors=null,this.cachedEdgeMaterials=[],this.edgeMemoryUsage=0,this.cachedSymbologyStride=5,this.elevationAlignmentOffset=0,this._baseGeometryElevationRange=new q(l,u),this.updateGeometryElevationRange()}get geometryElevationRange(){return this._geometryElevationRange}updateGeometryElevationRange(){let e=this._baseGeometryElevationRange;if(!e.elevationRangeValid||e.isEmpty){this._elevationAlignmentRange.invalidateElevationRange(),this._geometryElevationRange.invalidateElevationRange();return}let t=this.elevationOffsets;if(!t||t.length===0){let t=this.elevationAlignmentOffset;this._elevationAlignmentRange.setElevationRangeValues(t,t),this._geometryElevationRange.setElevationRangeValues(e.minElevation+t,e.maxElevation+t);return}let n=1/0,r=-1/0;for(let e=0;e<t.length;++e){let i=this.elevationAlignmentOffset+(t[e]??0);n=Math.min(n,i),r=Math.max(r,i)}this._elevationAlignmentRange.setElevationRangeValues(n,r),this._geometryElevationRange.setElevationRangeValues(e.minElevation+n,e.maxElevation+r)}get usedMemory(){return this.node.memory}get featureExtents(){return this._featureExtents??=new Float64Array(6*this.featureIds.length).fill(1/0),this._featureExtents}}const kt=t=>{let g=t,F=class extends g{constructor(){super(...arguments),this._extractChanges=null,this._applySSAO=!0,this._imShading=!!has(`enable-feature:im-shading`),this._imVertexNormals=!!has(`enable-feature:im-vertex-normals`),this._updatingHandles=new E,this._highlights=null,this._nodeId2Meta=new Map,this._nodeId2MetaReloading=new Map,this._i3sWasmLoaded=!1,this._snappingSourcesTrackers=[],this._compressionTracker=new Tt,this._hasLoadedPBRTextures=!1,this._asyncModuleLoading=0,this._addTasks=new Map,this._currentRenderer=null,this._rendererVersion=0,this._colorVariable=null,this._opacityVariable=null,this._rendererFields=null,this._symbologyFields=null,this._symbologyOverride=null,this._symbologyOverrideFields=null,this._symbolInfos=new Map,this._visibleGeometryChangedSchedulerHandle=null,this._hasComponentData=!1,this._hasVertexColors=!1,this._nodeColorOverride=null,this.updating=!0,this.holeFilling=`auto`,this._hasColors=!1,this._hasTextures=!1,this._hasData=!1,this.slicePlaneEnabled=!1,this._modifications=[],this.ignoresMemoryFactor=!1,this._layerUrl=``,this._cacheKeySuffix=null,this._meshUtilsImporterModule=null,this._meshUtilsImporterPromise=null,this._planetRadiusInGlobalMode=0,this._elevationTask=null,this._needFilterResolve=!1,this._filters=[],this._arcade=null,this._tmpAttributeOnlyGraphic=new n,this._crossfadeHelper=new Be(this)}get lodCrossfadeoutDuration(){return 0}get lodCrossfadeinDuration(){return 0}get lodCrossfadeUncoveredDuration(){return 0}get extractChanges(){return this._extractChanges?.layer!==this.layer&&(this._extractChanges?.destroy(),this._extractChanges=new Se({layer:this.layer})),this._extractChanges}get layerViewUid(){return this.uid}get layerId(){return this.layer.id}get sublayerId(){return null}get _isIntegratedMesh(){return this.layer.type===`integrated-mesh`}get contentVisible(){return!this.suspended&&this._controller?.rootNodeVisible&&this.fullOpacity>=Et}get legendEnabled(){return this.contentVisible&&this.layer?.legendEnabled===!0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get hasTexturesOrVertexColors(){return this._hasData?this._hasTextures||this._hasColors?`yes`:`probably-not`:`unknown`}get rendererTextureUsage(){return Qe(this._currentRenderer)?this._usePBR||this._hasLoadedPBRTextures?63:53:this._usePBR||this._hasLoadedPBRTextures?44:36}get elevationOffset(){let e=this.layer?.elevationInfo;return e?.mode===`absolute-height`?B(e,this.layer.spatialReference):0}get elevationInfo(){let e=this.layer?.elevationInfo;switch(e?.mode){case`absolute-height`:return new Z(0,B(e,this.layer.spatialReference));case`relative-to-ground`:return new Z(1,B(e,this.layer.spatialReference));case`on-the-ground`:return new Z(2,0);default:return new Z(0,0)}}get supportedTextureEncodings(){return Ge(this.view.stage.renderView.capabilities)}get clientGeometry(){return this.i3sOverrides.geometryOverrides}get elevationRange(){let e=this._nodeId2Meta,t=new q;for(let n of e.values()){let e=n?.geometryElevationRange;e?.elevationRangeValid&&!e.isEmpty&&t.expandElevationRange(e)}return t.elevationRangeValid&&!t.isEmpty?t:null}get fullExtent(){return this.layer.fullExtent}initialize(){let e=has(`enable-feature:idb-mock-cache`);this._idbCache=e?new ct(this.view,e):new st(`esri-scenelayer-cache`,`geometries`),this.addResolvingPromise(this.layer.indexInfo);let t=this.view.resourceController,n=t.memoryController;this.i3sOverrides=new Xe({view:this.view,layer:this.layer,memoryController:n,extractChanges:this.extractChanges}),this._workerHandle=new Pe(pt(t)),this.addResolvingPromise(this._workerHandle.promise),$e(this.layer),et(this.layer,this.view);let r=this.layer.store.defaultGeometrySchema;if(this.addResolvingPromise(this._workerHandle.setLegacySchema(this.uid,r).catch(l)),this._layerUrl=this.layer.parsedUrl.path,this._controller=new be({layerView:this,worker:this._workerHandle}),this._gpuMemoryEstimate=0,this._texMemoryEstimate=0,this._geoMemoryEstimate=0,this._stage=this.view.stage,this._collection=this._stage.renderView.componentObjectCollection,this._isIntegratedMesh||!r)this._hasComponentData=!1;else{let e=r.featureAttributes;this._hasComponentData=!!(e&&e.faceRange&&e.id)}this._hasVertexColors=(r?.vertexAttributes.color??null)!=null&&!this.layer.cachedDrawingInfo?.color;let i=this.view.resourceController.memoryController.newCache(`sl-${this.uid}`,e=>this._deleteComponentObject(e));this._memCache=i;let o=this._controller,c=this._nodeId2Meta,u=this._nodeId2MetaReloading;function*d(e){let t=o.index;if(!t)return;let n=t.rootNode;if(!n)return;let r=null;for(let i of t.traverseValues(n,t=>(r=(c.get(t.index)||u.get(t.index))?.objectHandle??null,e(t,r))))yield new We(i,r)}this._intersectionHandler=new Ue({layerViewUid:this.layerViewUid,sublayerId:this.sublayerId,collection:this._collection,slicePlaneEnabled:this.slicePlaneEnabled,isGround:has(`enable-feature:im-as-ground`)?this.layer.isUsedAsGroundLayer:this._isIntegratedMesh,traverseNodeHierarchy:d}),this._elevationProvider=new lt({view:this.view,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),this._hasLoadedPBRTextures=this._usePBR,this._updatingHandles.add(()=>this.view.clippingArea,()=>this._clippingAreaChanged(),f),this._updatingHandles.add(()=>this.fullOpacity,e=>this._opacityChange(e)),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this.elevationOffset,(e,t)=>{this._reloadAll(t),this._controller.invalidateVisibilityObbs()}),this._updatingHandles.add(()=>this.elevationInfo,(e,t)=>this._elevationInfoChanged(e,t),f),this._updatingHandles.add(()=>!this.suspended&&this.elevationInfo.mode!==0,(e,t)=>{e?this.addHandles(this.view.groundView.on(`elevation-change`,({extent:e})=>this._ensureElevationTask().addExtent(e)),Wt):t&&this.removeHandles(Wt)},f),this._updatingHandles.add(()=>this._usePBR,e=>this._updatePBR(e)),this._updatingHandles.add(()=>this.rendererTextureUsage,()=>{this._reloadAll(),this.clearMemCache()}),this._updatingHandles.add(()=>this.contentVisible,e=>this._contentVisibleChanged(e),f),this._updatingHandles.add(()=>this.layer.labelsVisible,()=>this._labelingChanged(),f),this._updatingHandles.add(()=>this.layer.labelingInfo,()=>this._labelingChanged(),f),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),f),this.addHandles([p(()=>K.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){let e=this._controller.crsIndex;import(`./support/I3STreeDebugger.js`).then(({I3STreeDebugger:t})=>{!this._treeDebugger&&K.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else!e&&!K.I3S_TREE_SHOW_TILES&&(this._treeDebugger=s(this._treeDebugger))},f),p(()=>K.I3S_SHOW_MODIFICATIONS,()=>this._showModifications(),f)]),this._cacheKeySuffix=this._getCacheKeySuffix(),this._idbCache.init().catch(e=>a.getLogger(this).warn(`Failed to initialize IndexedDB cache: ${e}`));let{view:m}=this,{viewingMode:h,renderCoordsHelper:g}=m;this._planetRadiusInGlobalMode=h===`local`?0:g.referenceEllipsoid.radius}destroy(){this._clearAddTasks(),this._elevationTask=s(this._elevationTask),this.i3sOverrides=s(this.i3sOverrides),this._extractChanges=s(this._extractChanges),this._elevationProvider&&=(this._elevationProvider.notifyObjectsChanged(this.getVisibleObbs()),this.view.elevationProvider.unregister(this._elevationProvider),null),this._intersectionHandler&&=(this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),null);let e=this._workerHandle;e&&(e.destroyContextAndSelf(this.uid),this._workerHandle=null),this._removeAllNodeDataFromStage(),this._memCache=s(this._memCache),this._collection=null,this._stage=null,this._edgeView=null,this._labeler=s(this._labeler),this._treeDebugger=s(this._treeDebugger),this._controller=s(this._controller),this._highlights=s(this._highlights),this._nodeId2Meta.clear(),this._nodeId2MetaReloading.clear(),this._crossfadeHelper=s(this._crossfadeHelper),this.emit(`visible-geometry-changed`),this._visibleGeometryChangedSchedulerHandle&&=(this._visibleGeometryChangedSchedulerHandle.remove(),null),this._updatingHandles=s(this._updatingHandles)}_memEstimateTextureAdded(e){let t=e.usedMemory;return this._gpuMemoryEstimate+=t,this._texMemoryEstimate+=t,t}_memEstimateTextureRemoved(e){if(e!=null){let t=e.usedMemory;this._gpuMemoryEstimate-=t,this._texMemoryEstimate-=t}}_memEstimateGeometryAdded(e){let t=this._collection.getObjectGPUMemoryUsage(e);return this._gpuMemoryEstimate+=t,this._geoMemoryEstimate+=t,t}_memEstimateGeometryRemoved(e){let t=this._collection.getObjectGPUMemoryUsage(e);this._gpuMemoryEstimate-=t,this._geoMemoryEstimate-=t}isNodeLoaded(e){return this._nodeId2Meta.has(e)}isNodeReloading(e){return this._nodeId2MetaReloading.has(e)}get usedMemory(){let e=this._labeler==null?0:this._labeler.usedMemory;return this._nodeId2Meta.forEach(t=>e+=t==null?0:t.node.memory),this._nodeId2MetaReloading.forEach(t=>e+=t==null?0:t.node.memory),e}get unloadedMemory(){return(this._controller==null?0:this._controller.unloadedMemoryEstimate)+(this._labeler==null?0:this._labeler.unloadedMemoryEstimate)}_labelingChanged(){if(!(Le(this.layer)&&this._supportsLabeling)){this._labeler!=null&&(this._labeler.destroy(),this._labeler=null);return}if(this._labeler!=null)return;let e=new Oe({view:this.view,layer:this.layer,collection:this._collection,overrides:this.i3sOverrides,layerViewUid:this.uid});this._nodeId2Meta.forEach(t=>t!=null&&this._addMetaToLabeler(e,t)),this._labeler=e}_loadAsyncModule(e){return++this._asyncModuleLoading,e.then(e=>(--this._asyncModuleLoading,e),e=>{throw--this._asyncModuleLoading,e})}_modificationsChanged(){if(!this._i3sWasmLoaded&&this.hasModifications){this._i3sWasmLoaded=Ae().then(()=>{this._i3sWasmLoaded=!0,this._modificationsChanged(),this.notifyUpdate()},()=>{}),this.notifyUpdate();return}if(this._i3sWasmLoaded!==!0)return;let e=e=>a.getLogger(this).error(`set-modifications-error`,`Error when setting modifications:`,e),t=this.uid,n=this.layer.spatialReference,r=n.isGeographic,i=Fe(this._layerClippingArea,this._modifications,n,this.view.state.isGlobal);this._workerHandle.setModifications(t,i,r).catch(e);try{je({context:t,modifications:i,isGeodetic:r})}catch(t){e(t)}this._controller.modificationsChanged();let o=this.hasModifications?new c:null;this._nodeId2Meta.forEach((e,t)=>{e==null?(this._nodeId2Meta.delete(t),this._controller.updateLoadStatus(t,!1)):e.node.hasModifications?(this._updateFeatureIdCounts(e,-1),this._nodeId2Meta.delete(t),this._nodeId2MetaReloading.set(t,e)):o?.push(e.node)}),this.notifyChange(`elevationRange`),o!=null&&this._nodeId2MetaReloading.forEach(e=>o.push(e.node)),o!=null&&o.length>0&&(this.updateNodeModificationStatus(o),o.forAll(e=>{if(e.imModificationImpact!==2){let t=this._nodeId2Meta.get(e.index);this._controller.invalidateGeometryVisibility(e.index),t==null?this._nodeId2Meta.has(e.index)&&(this._nodeId2Meta.delete(e.index),this._controller.updateLoadStatus(e.index,!1)):(this._updateFeatureIdCounts(t,-1),this._nodeId2Meta.delete(e.index),this._nodeId2MetaReloading.set(e.index,t),this.notifyChange(`elevationRange`))}})),this.clearMemCache(),this._controller.restartNodeLoading(),this._showModifications()}_showModifications(){if(this._modificationGraphics!=null&&(this.view.graphics.removeMany(this._modificationGraphics),this._modificationGraphics=null),!K.I3S_SHOW_MODIFICATIONS||this._modifications.length===0)return;let e={clip:[227,227,79,.8],mask:[227,139,79,.8],replace:[139,227,79,.8]},t={outline:{color:[255,255,255],width:1}};this._modificationGraphics=[];for(let r of this._modifications){let i=r.geometry;i.spatialReference=this.layer.spatialReference;let a=new Ee({...t,color:e[r.type]});this._modificationGraphics.push(new n({geometry:i,symbol:a}))}this.view.graphics.addMany(this._modificationGraphics)}_addMetaToLabeler(e,t){e.addNodeMeta(t,(e,t)=>this._createAttributes(e,t))}_contentVisibleChanged(e){e?(this.view.elevationProvider.register(this._elevationContext,this._elevationProvider),this._stage.view.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler)):(this._removeAllNodeDataFromStage(),this.view.elevationProvider&&this.view.elevationProvider.unregister(this._elevationProvider),this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler))}getLoadedAttributes(e){let t=this._nodeId2Meta.get(e);if(t?.attributeInfo!=null)return t.attributeInfo.loadedAttributes}getAttributeData(e){let t=this._nodeId2Meta.get(e);if(t?.attributeInfo!=null)return t.attributeInfo.attributeData}setAttributeData(e,t){let n=this._nodeId2Meta.get(e);n?.attributeInfo!=null&&(n.attributeInfo.attributeData=t,this._attributeValuesChanged(n))}async updateAttributes(e,t,n){let r=this._nodeId2Meta.get(e);r!=null&&(await this.i3sOverrides.applyAttributeOverrides(r.featureIds,t,n,this._controller.requiredAttributes),r.attributeInfo=t,this._controller.reschedule(()=>{this._nodeId2Meta.get(e)===r&&this._attributeValuesChanged(r)},n).catch(e=>{u(e)||a.getLogger(this).warn(`Error while updating attribute values. Layer might not display correctly.`,e)}))}_attributeValuesChanged(e){e.cachedRendererVersion=this._getInvalidRendererVersion(),e.appliedFilters=null,this._labeler!=null&&this._labeler.setNodeMetaAttributes(e,(e,t)=>this._createAttributes(e,t)),this._updateEngineObject(e)}clearMemCache(){this._memCache!=null&&this._memCache.clear(),this._addTasks.forEach(e=>e.allowMemCache=!1)}getVisibleNodes(){let e=[];return this._nodeId2Meta.forEach(t=>t!=null&&e.push(t.node)),e}getVisibleObbs(){let e=[];return this._nodeId2Meta.forEach(t=>t&&e.push(this._collection.getComponentObb(t.objectHandle))),e}getLoadedNodeIndices(e){this._nodeId2Meta.forEach((t,n)=>e.push(n)),this._nodeId2MetaReloading.forEach((t,n)=>e.push(n))}_getVertexBufferLayout(e,t){return _t(yt(this._getGeometryParameters({hasTexture:It(e.params.material),hasNormals:t.normal,hasRegions:t.uvRegion})))}_getObjectIdField(){return this.layer.objectIdField||L}_getGlobalIdField(){return this.layer.globalIdField}_findGraphicNodeAndIndex(e){let t=G(this.layer.fieldsIndex,e.attributes,this._getObjectIdField());for(let e of this._nodeId2Meta.values()){let n=e?.featureIds.indexOf(t);if(n!=null&&n>=0)return{node:e.node,index:n}}return null}_getGraphicIndices(e,t){let n=this._nodeId2Meta.get(e.index);if(n==null)return[];let r=[],i=this._getObjectIdField(),a=this.layer.fieldsIndex;for(let e of t){let t=G(a,e.attributes,i),o=n.featureIds.indexOf(t);o!==-1&&r.push(o)}return r}whenGraphicBounds(e){let t=this._findGraphicNodeAndIndex(e);if(!t)return Promise.reject();let n=this.getAABB(t.node.index,t.index);return n==null?Promise.reject():Promise.resolve({boundingBox:n,screenSpaceObjects:[]})}getAABBFromIntersectorTarget(e){return e.nodeIndex==null||e.componentIndex==null?null:this.getAABB(e.nodeIndex,e.componentIndex)}getAABB(e,t){let n=this._nodeId2Meta.get(e);if(n?.featureIds==null||t>=n.featureIds.length)return null;let r=n.objectHandle,i=He(t,this._collection,r,P(24),0),a=this.view.renderSpatialReference,o=this.view.spatialReference;return he(i,a,0,i,o,0)?ge(i):null}whenGraphicAttributes(e,t){return tt(this.layer,e,this._getObjectIdField(),t,()=>this._nodeId2Meta.values().filter(i).toArray())}getGraphicFromIntersectorTarget(e,t){if(e.nodeIndex==null||e.componentIndex==null)return null;let n=this._nodeId2Meta.get(e.nodeIndex);if(n?.featureIds==null||e.componentIndex>=n.featureIds.length)return null;let r=this._createLayerGraphic(this._createAttributes(e.componentIndex,n));return r?this._meshUtilsImporterModule?(r.geometry=this._meshUtilsImporterModule.createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),r):t.defer?(t.defer(async()=>(r.geometry=(await this._meshUtilsImporter).createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),r)),null):r:null}_getCacheKey(e){return`${this._layerUrl}/v30/${e}${this._cacheKeySuffix}`}get _meshUtilsImporter(){return this._meshUtilsImporterPromise||(this._meshUtilsImporterPromise=import(`./i3s/meshUtils.js`),this._meshUtilsImporterPromise.then(e=>this._meshUtilsImporterModule=e,()=>{})),this._meshUtilsImporterPromise}_getCacheKeySuffix(){let e=this.view.renderSpatialReference;return e==null?Kt:e===D(e)?qt:this.layer.spatialReference.equals(e)?Gt:e.wkid==null?null:`@${e.wkid}`}_getMemCacheKey(e,t=this.elevationOffset){return e+`#`+t}get _idbCacheEnabled(){return!this._controller.disableIDBCache&&!this.hasModifications&&this.elevationOffset===0&&this._cacheKeySuffix!=null}loadCachedGPUData(e){return this._memCache==null?null:this._memCache.pop(this._getMemCacheKey(e))}deleteCachedGPUData(e){e!=null&&this._deleteComponentObject(e)}_cacheGPUData(e,t=this.elevationOffset){if(this._memCache==null){this._deleteComponentObject(e);return}let n=this._controller.indexDepth-e.node.level;this._memCache.put(this._getMemCacheKey(e.node.index,t),e,n)}loadMissingTextures(e,t,n,r){let i=e?.filter((e,n)=>{if((e.usage&this.rendererTextureUsage)===0)return!1;if(t==null)return!0;let r=Ke(e.encodings,this.supportedTextureEncodings),i=t[n];return!!(i?.data==null||r&&i.encoding!==r.encoding)})??[];return i.length===0?Promise.resolve(!1):n(i,r).then(n=>{let r=0;for(let i=0;i<e.length;i++)r<n.length&&n[r].id===e[i].id&&(t[i]=n[r],r++);return!0})}loadCachedNodeData(e,t,n){return this._idbCacheEnabled?this._idbCache.get(this._getCacheKey(e.id),t).then(r=>r==null?null:(r.globalTrafo=_e(r.globalTrafo),r.nodeVersion===e.version?(this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=J.fromData(r.geometryObbData)),this.loadMissingTextures(r.requiredTextures,r.textureData,n,t).then(n=>(n&&this._idbCache.initialized&&r.textureData!=null&&(r.byteSize=zt(r.transformedGeometry,r.textureData),r.textureData.every(Rt)&&this._indexedDbSizeCheck(e,r)&&this._idbCache.put(this._getCacheKey(e.id),r).catch(t=>a.getLogger(this).warn(`Failed to update node with textures in IndexedDB cache: ${e.id}: ${t}`))),d(t),r))):(this._idbCache.remove(this._getCacheKey(e.id)),null))):Promise.resolve(null)}addNode(e,t,n){return Lt(t)?t.geometryBuffer==null?(this._addNodeMeta(e.index,null),Promise.resolve()):this._addData(e,t.attributeDataInfo,()=>this._transformNode(e,t,n).then(r=>this._safeReschedule(()=>{if(r==null)return e.hasModifications=!1,this._addCachedNodeData(e,null,n);let{obb:i,componentOffsets:o,featureIds:s,anchorIds:c,anchors:l,transformedGeometry:u,geometryMinElevation:d,geometryMaxElevation:f}=r;e.hasModifications=u.hasModifications;let p=_e(r.globalTrafo),m=b(Ht,i.center.x,i.center.y,i.center.z);x(m,m,p);let h=new J(m,[i.extents.x,i.extents.y,i.extents.z],ce(i.orientation.x,i.orientation.y,i.orientation.z,i.orientation.w));this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=h),t.geometryData.componentOffsets=o,s&&(t.geometryData.featureIds=Array.from(s)),t.geometryData.anchorIds=c,t.geometryData.anchors=l;let g={nodeVersion:e.version,geometryData:t.geometryData,requiredTextures:t.requiredTextures,textureData:t.textureData,transformedGeometry:u,globalTrafo:p,geometryObbData:h.data,geometryMinElevation:d,geometryMaxElevation:f,byteSize:zt(u,t.textureData)};if(this._idbCacheEnabled&&this._idbCache.initialized&&this._indexedDbSizeCheck(e,g)){let t=g.textureData==null?null:g.textureData.map(e=>Rt(e)?e:null);this._idbCache.put(this._getCacheKey(e.id),{...g,textureData:t}).catch(t=>a.getLogger(this).warn(`Failed to store node in IndexedDB cache: ${e.id}: ${t}`))}return this._addCachedNodeData(e,g,n)},n))):Promise.reject()}getElevationRange(e){let t=new q,n=this._controller,{index:r}=n;if(!r)return t;let{rootNode:i}=r;if(!i)return t;let a=this._nodeId2Meta,o=n.viewportQueries;return r.traverse(i,n=>{let{childrenLoaded:r}=n;if(r===0)return!1;let i=o.getAndUpdateVisibilityObbInRenderSR(n),s=null;if(i){if(!i.intersectSphereWithMBS(e,i.radius))return!1}else if(s=o.calculateServiceMbsInRenderSRElevationAdjusted(n),s?.isValid&&!e.intersects(s))return!1;let c=a.get(n.index);if(c){let{geometryObbInRenderSR:r}=n;if(!r||r.intersectSphereWithMBS(e)){let e=c.geometryElevationRange;e.elevationRangeValid&&!e.isEmpty&&t.expandElevationRange(e)}}return r-+!!c>0}),t}computeVisibilityObb(e){return nt(e,this.view.renderSpatialReference,this._controller.crsIndex,this.layer.spatialReference,this.elevationOffset,this._modifications,this.view.renderCoordsHelper.sphericalPCPF)}_transformNode(e,t,n){let r=t.geometryData.geometries??[],i=Array(r.length);for(let e=0;e<r.length;++e)i[e]=this._getVertexBufferLayout(r[e],t.geometryDescriptor);let a=this.layer.normalReferenceFrame,o=t.normalReferenceFrame??a??`none`,s=e.serviceMbsInIndexSR,c=this.elevationOffset,l=this._controller.crsIndex,u=this._controller.crsVertex,d=this.view.renderSpatialReference,f=Ze(s,c,o,l,d),p=O(l,u),m=O(u,d);if(p==null||m==null)return Promise.resolve(null);let h={context:this.uid,geometryBuffer:t.geometryBuffer,geometryData:t.geometryData,geometryDescriptor:t.geometryDescriptor,layouts:i,globalTrafo:f,geometryElevationOffset:c,mbs:s.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:c,planetRadiusInGlobalMode:this._planetRadiusInGlobalMode,needNormals:this._controller.isMeshPyramid||this._imVertexNormals,computeNormals:this._isIntegratedMesh&&this._imVertexNormals,normalReferenceFrame:o,indexToVertexProjector:p,vertexToRenderProjector:m};return this._workerHandle.invoke(h,n)}get _supportsNodeCrossFading(){return!this.view?.stage?.renderer.shadowsEnabled}get nodeCrossfadingEnabled(){return this._supportsNodeCrossFading&&(this.lodCrossfadeinDuration>0||this.lodCrossfadeoutDuration>0||this.lodCrossfadeUncoveredDuration>0)}get nodeFadeoutEnabled(){return this._supportsNodeCrossFading&&this.lodCrossfadeoutDuration>0}_setNewNodeOpacity(e){let t=this.nodeCrossfadingEnabled?0:this.fullOpacity;this._setNodeOpacity(e,t)}addCachedGPUData(e,t,n){if(this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=this._collection.getComponentObb(t.objectHandle).clone()),!this._controller.isGeometryVisible(e)){this._cacheGPUData(t);return}let r=e.index;this._addNodeMeta(r,t),this.updateNodeState(r,n),this._collection.setObjectVisibility(t.objectHandle,!0),this._updateElevationOffsets(t),this._labeler!=null&&this._addMetaToLabeler(this._labeler,t),this._updateMaterial(t),this._setNewNodeOpacity(t),this.elevationInfo.mode!==0&&this._ensureElevationTask().schedule(r),this._updateEngineObject(t),this._highlights?.objectCreated(t),this._treeDebugger!=null&&this._treeDebugger.update()}addCachedNodeData(e,t,n,r){return this._addData(e,n,()=>this._addCachedNodeData(e,t,r))}async deleteCachedNodeData(e){if(this._idbCacheEnabled)return this._idbCache.remove(this._getCacheKey(e))}async _addCachedNodeData(e,t,n){if(!this.contentVisible||!this._controller.isGeometryVisible(e)){this._removeNodeStageData(e.index,this.elevationOffset,this._nodeId2MetaReloading);return}if(t==null){this._addNodeMeta(e.index,null);return}let r=this._addTasks.get(e.index),{geometryData:i,transformedGeometry:o}=t;await this.i3sOverrides.applyAttributeOverrides(i.featureIds,r.attributeInfo,n,this._controller.requiredAttributes);let s=t.textureData==null?[]:t.textureData.filter(e=>e!=null&&(e.usage&this.rendererTextureUsage)!==0);e.memory=0;let{componentOffsets:c,geometries:l,featureIds:u,anchorIds:d,anchors:f}=i,p=this._collection,m=l[0],{layout:h,indices:g,interleavedVertexData:_,positionData:v,hasColors:ce}=o,{material:b,geometryParameters:x}=this._materialParameters(m,h),S=_.byteLength/h[0].stride,de=c||new Uint32Array([0,g?g.length:S]),C=m.transformation?oe(m.transformation):se(),T=_e(t.globalTrafo);ie(C,T,C);let E=ae(w(),C),D=y(ne(),C),me=this._isIntegratedMesh?this._imShading?2:0:1,he=x.textureCoordinateType,O=!ee(D,re),A=new bt(h,me,he,+!!O),ge=new xt({interleavedVertexData:_,vertexCount:S,indexData:g},{positions:ve(v.data),indices:ye(v.indices)},de,A),j=this.view.renderSpatialReference,M=this.view.groundView.spatialReference,N=J.fromData(ht(t.geometryObbData)).getCenter(Xt),P=[1,1,1];pe(N,j,P,M)||a.getLogger(this).errorOnce(`Unsupported coordinate system for IM overlay`);let F=w();k(N,j,F,M);let I=ne();te(I,D);let L=w();le(L,ue(L,N,E),I);let be=F[0]-L[0]*P[0],xe=F[1]-L[1]*P[1],Se=x.textureCoordinateType===2,{textures:R,texturePromise:Ce,materialParameters:we}=this._initMaterialAndTextures(b,s,Se,e),z=p.createObject(new vt(fe(be,xe,P[0],P[1]),new Ct(E,D),J.fromData(ht(t.geometryObbData)),ge,has(`enable-feature:im-as-ground`)?!this.layer.isUsedAsGroundLayer:!this._isIntegratedMesh),we);e.memory+=this._memEstimateGeometryAdded(z),e.memory+=R.reduce((e,t)=>e+(t==null?0:this._memEstimateTextureAdded(t)),0);let B=!!b.hasParametersFromSource,Te=b.alphaMode!==`blend`&&b.metallicRoughness.baseColorFactor[3]>=1,V=new Ot(e,u,z,this._getInvalidRendererVersion(),r.attributeInfo,{hasParametersFromSource:B,isOpaque:Te},R,d,f,t.geometryMinElevation,t.geometryMaxElevation);r.meta=V,this._hasTextures||=t.requiredTextures?.some(({usage:e})=>!!(e&19))||!!e.resources.texture,this._hasData=!0,this._hasColors||=ce,this.notifyChange(`hasTexturesOrVertexColors`);let Ee=this.slicePlaneEnabled;return Promise.all([this._addOrUpdateEdgeRendering(V),Ce]).then(([t,r])=>(this._addTasks.has(e.index)&&t?.updateObjectVisibility(V.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.layer.title)),this._safeReschedule(()=>{let n=this._addTasks.get(e.index);if(!n)return;if(this._addNodeMeta(e.index,V),n.meta=null,!this.contentVisible){this._removeNodeStageData(e.index,this.elevationOffset);return}p.setObjectVisibility(z,!0),t?.updateObjectVisibility(V.objectHandle,!0).catch(e=>this._logEdgeViewError(e,this.layer.title)),V.attributeInfo=n.attributeInfo;let r=V.cachedRendererVersion!==this._rendererVersion,i=Ee!==this.slicePlaneEnabled;this._updateElevationOffsets(V);let a=V.elevationOffsets;this._updateComponentData(V);let o=this._applyFiltersToNode(V);(r||t!=null&&(i||o||a))&&this._addOrUpdateEdgeRendering(V).catch(()=>{}),this._labeler!=null&&this._addMetaToLabeler(this._labeler,V),this._visibleGeometryChanged(V,0),this._highlights?.objectCreated(V),this._updateMaterial(V),this._setNewNodeOpacity(V),this._treeDebugger!=null&&this._treeDebugger.update()},n))).catch(e=>{let{meta:t,allowMemCache:n}=r;throw r.meta=null,t&&n?this._cacheGPUData(t):t&&this._deleteComponentObject(t),e})}_addNodeMeta(e,t){if(this._removeNodeStageData(e,this.elevationOffset,this._nodeId2MetaReloading),this._nodeId2Meta.has(e)){a.getLogger(this).error(`Removing duplicated node`);let t=this._nodeId2Meta.get(e);t&&(this._deleteComponentObject(t),this._updateFeatureIdCounts(t,-1))}else this._controller.updateLoadStatus(e,!0);t&&(t.lodCrossfadeProgress=null,this.nodeCrossfadingEnabled&&X(t.cachedEdgeMaterials,0),this._updateFeatureIdCounts(t,1)),this._nodeId2Meta.set(e,t),this.notifyChange(`elevationRange`)}_updateElevationOffsets(e){if(!e.node.serviceMbsInIndexSR)return;let{view:t,elevationInfo:n}=this,r=this._controller.crsIndex,{groundView:i,groundSpatialReference:a,renderSpatialReference:o}=t,s=n.mode;if(s===0){e.elevationAlignmentOffset=n.offset,e.elevationOffsets=null,e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`);return}if(e.elevationAlignmentOffset=0,o==null||a==null){e.elevationOffsets=null,e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`);return}let c=this._collection.getObjectTransform(e.objectHandle);e.elevationOffsets=e.elevationOffsets??[];let l=Ht,u=Ut,d=s===2,f=this.view.renderCoordsHelper,p=e.featureIds.length,m=(()=>{if(e.cachedElevationAnchors)return e.cachedElevationAnchors;let t=P(p*3);e.cachedElevationAnchors=t;let{center:n}=e.node.serviceMbsInIndexSR;for(let i=0;i<p;i++){let s=i*3,d=e.anchorIds?.indexOf(i)??-1;e.anchors&&d>=0?(b(l,e.anchors[d*3],e.anchors[d*3+1],e.anchors[d*3+2]),S(l,l,n),k(l,r,l,o),t[s+2]=f.getAltitude(l),k(l,o,l,a),t[s]=l[0],t[s+1]=l[1]):(this._collection.getComponentAabb(e.objectHandle,i,u,!0),b(l,(u[0]+u[3])/2,(u[1]+u[4])/2,u[2]),le(l,l,c.rotationScale),S(l,l,c.position),t[s+2]=f.getAltitude(l),k(l,o,l,a),t[s]=l[0],t[s+1]=l[1])}return t})(),h=n.offset,g=e.elevationOffsets;i.getElevations(m,p,(e,t)=>{let n=d?m[e*3+2]:0;g[e]=h+(t??0)-n}),e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`)}_ensureElevationTask(){return this._elevationTask??=new ze(this.view.resourceController.scheduler,e=>this._controller.updateElevationChanged(e,this.view.groundView.spatialReference)?.filterInPlace(e=>this._nodeId2Meta.get(e)!=null),e=>this._nodeElevationAlignmentChanged(this._nodeId2Meta.get(e)),()=>this.elevationInfo?.mode),this._elevationTask}_elevationInfoChanged(e,t){let n=e.mode!==0,r=!!t&&t!==e&&t.mode!==0;this._intersectionHandler.updateElevationAlignState(n,this.view.state.viewingMode),n&&!r&&this._controller.removeAllGeometryObbs(),this._nodeId2Meta.forEach(e=>this._nodeElevationAlignmentChanged(e))}_nodeElevationAlignmentChanged(e){e!=null&&(this._updateElevationOffsets(e),this._updateComponentData(e),this._updateEdgeRendering(e),this._labeler!=null&&this._labeler.updateLabelPositions(e),this._updateSnappingSources(e,2),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}_safeReschedule(e,t){return d(t),this._controller.reschedule(e,t)}_materialParameters(e,t){let n=e.params.material==null?qe():e.params.material,r=t.some(({name:e})=>e===`uvRegion`),i=t.some(({name:e})=>e===`normalCompressed`),a=It(n);return{geometryParameters:this._getGeometryParameters({hasTexture:a,hasNormals:i,hasRegions:r}),material:n}}_initMaterialAndTextures(e,t,n,r){let i=this._stage.renderView,a=e=>{this._gpuMemoryEstimate-=e,this._texMemoryEstimate-=e,r.memory-=e},o=t.map(t=>Je(t,e,n,i,this._compressionTracker,a));this._stage.addTextures(o);let{materialParameters:s,texturePromise:c}=Ye(e,o,t,this.view.stage.renderView.textures,{rendererTextureUsage:this.rendererTextureUsage,usePBR:this._usePBR,isIntegratedMesh:this._isIntegratedMesh,isGround:this.layer.isUsedAsGroundLayer,slicePlaneEnabled:this.slicePlaneEnabled,viewSpatialReference:this.view.spatialReference,applySSAO:this._applySSAO});return{textures:o,texturePromise:c,materialParameters:s}}_getGeometryParameters(e){return new St(this._hasVertexColors,e.hasNormals,e.hasTexture?e.hasRegions?2:1:0)}_addData(e,t,n){let r=this._addTasks.get(e.index);if(r)r.attributeInfo=t;else{let i=Promise.withResolvers();r=new Vt(t,null,i.promise),this._addTasks.set(e.index,r),n().then(i.resolve,i.reject).then(()=>this._addTasks.delete(e.index)).catch(t=>{throw this._addTasks.delete(e.index),t})}return r.promise}_clearAddTasks(){this._addTasks.forEach(e=>{e.meta!=null&&(this._cacheGPUData(e.meta),e.meta=null)}),this._addTasks.clear()}_clippingAreaChanged(){let e=this.view.renderSpatialReference,t=this.layer.spatialReference,n=M();this._renderClippingArea=mt(this.view.clippingArea,n,e)?n:null;let r=M();this._layerClippingArea=mt(this.view.clippingArea,r,t)?r:null,this._filterChange(),this._controller&&this._controller.updateClippingArea(this.view.clippingArea),this._isIntegratedMesh&&this._modificationsChanged()}get hasGeometryFilter(){return!1}_geometryFilterChange(){let e=this.hasGeometryFilter;this._controller.geometryFilterChanged(e),this._applyFilters(e),this._assertFeatureIdNodeCounts(e)}_assertFeatureIdNodeCounts(e){e&&!this._featureIdCounts?(this._featureIdCounts=$(this._nodeId2Meta.values()),this._filteredIdCounts=$(this._nodeId2Meta.values(),1),this._weaklyRemovedIdCounts=$(this._nodeId2Meta.values(),2),this.addHandles(p(()=>this._controller.updating,e=>{!e&&this._needFilterResolve&&(this.multiGeometryFilterResolve(),this._needFilterResolve=!1,this.notifyUpdate())},{sync:!0}),`updateFinished`)):!e&&this._featureIdCounts&&(this._featureIdCounts=null,this._filteredIdCounts=null,this._weaklyRemovedIdCounts=null,this._mismatchShow=null,this._mismatchHide=null,this.removeHandles(`updateFinished`),this._needFilterResolve=!1,this.notifyUpdate())}_updateFeatureIdCounts(e,t){this._featureIdCounts&&(this._needFilterResolve=!0,Q(this._featureIdCounts,e.featureIds,t),Q(this._filteredIdCounts,e.filteredIds,t),Q(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,t))}_updateFilteredIdCounts(e,t,n){this._filteredIdCounts&&(this._needFilterResolve=!0,Q(this._filteredIdCounts,t,-1),Q(this._filteredIdCounts,e.filteredIds,1),Q(this._weaklyRemovedIdCounts,n,-1),Q(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,1))}_checkFeatureIdNodeCountInvariant(){let e=this._featureIdCounts!=null;if(this.hasGeometryFilter!==e&&a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`LayerView should have feature id node counts if and only if it has a geometry filter`,{layerView:this,hasNodeCounts:e}),!this._featureIdCounts||!this._filteredIdCounts)return;let t=$(this._nodeId2Meta.values());o(this._featureIdCounts,t)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _featureIdCounts`,{layerView:this,counts:this._featureIdCounts,expected:t});let n=$(this._nodeId2Meta.values(),1);o(this._filteredIdCounts,n)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _filteredIdCounts`,{layerView:this,counts:this._filteredIdCounts,expected:n});let r=$(this._nodeId2Meta.values(),2);o(this._weaklyRemovedIdCounts,r)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _weaklyRemovedIdCounts`,{layerView:this,counts:this._weaklyRemovedIdCounts,expected:n})}multiGeometryFilterResolve(){if(!this._featureIdCounts||!this._filteredIdCounts)return;let e=null,t=null;for(let[n,r]of this._filteredIdCounts){let i=this._featureIdCounts.get(n);i!==r&&(r+(this._weaklyRemovedIdCounts?.get(n)??0)===i?(e??=new Set,e.add(n)):(t??=new Set,t.add(n)))}h(e,this._mismatchShow)&&h(t,this._mismatchHide)||(this._mismatchShow=e,this._mismatchHide=t,this._nodeId2Meta.forEach(e=>{if(!e?.filteredIds)return;let t=Yt(e,this._mismatchShow,this._mismatchHide);this._collection.setAllComponentVisibilities(e.objectHandle,t),this._visibleGeometryChanged(e,2)}))}_filterChange(){this._applyFilters(this.hasGeometryFilter)}_applyFilters(e){this._filters=this.getFilters(),e?this._controller&&this._controller.requestUpdate():this._nodeId2Meta.forEach(e=>{e&&this._applyFiltersToNode(e)&&(this._addOrUpdateEdgeRendering(e).catch(()=>{}),this._visibleGeometryChanged(e,2))})}getFilters(){let e=[],t=this._renderClippingArea;return t!=null&&e.push((e,n)=>this._boundingRectFilter(e,n,t)),e}addSqlFilter(e,t,n){if(t!=null){let r=t.fieldNames;e.push((e,i)=>this._sqlFilter(e,i,t,r,n))}}_sqlFilter(e,t,n,r,i){let a={},o=this._createLayerGraphic(a);if(!o)return;let s=this.layer.objectIdField,c=t.featureIds,l=t.attributeInfo?.attributeData;r.every(e=>e===s||l?.[e]!=null)&&rt(e,c,e=>{a[s]=c[e];for(let t of r)t!==s&&(a[t]=l?H(l[t],e):null);try{return n.testFeature(o)}catch(e){return i(e),!1}})}_boundingRectNodeTest(e,t){return me(e.node.serviceMbsInIndexSR,this._controller.crsIndex,Ft,this.view.renderSpatialReference),it(t,Ft)}_boundingRectFeatureTest(e,t,n){return this._collection.getComponentAabb(e.objectHandle,t,At),j(At,jt),N(n,jt)}_boundingRectFilter(e,t,n){let r=this._collection,i=this._boundingRectNodeTest(t,n);if(i===3)return;if(i===0){e.length=0;return}let a=r.getComponentCount(t.objectHandle);if(a.invisible+a.visible!==t.featureIds.length)return;let o=this._transformClippingArea(Mt,n,t.objectHandle);rt(e,t.featureIds,e=>this._boundingRectFeatureTest(t,e,o))}_transformClippingArea(e,t,n){let r=this._collection.getObjectTransform(n),i=r.position,a=r.rotationScale;return e[0]=(t[0]-i[0])/a[0],e[1]=(t[1]-i[1])/a[4],e[2]=(t[2]-i[0])/a[0],e[3]=(t[3]-i[1])/a[4],e}async _addOrUpdateEdgeRendering(e,t=!0){let n=e.objectHandle,{hasEdges:r,perFeatureEdgeMaterials:i}=this._getFilteredEdgeMaterials(e);if(r&&!this._edgeView)try{this._edgeView=await this._stage.renderer.loadEdgeView()}catch(e){if(!u(e))throw e}let a=this._edgeView;if(!a)return null;let o=a.hasObject(n);if(r){if(o)return this.nodeCrossfadingEnabled&&X(i,this.getNodeOpacity(e)),a.updateAllComponentMaterials(n,i,this.slicePlaneEnabled,t).catch(e=>this._logEdgeViewError(e,this.layer.title)),a.updateObjectVisibility(n,!0).catch(e=>this._logEdgeViewError(e,this.layer.title)),a.updateAllVerticalOffsets(n,e.elevationOffsets).catch(e=>this._logEdgeViewError(e,this.layer.title)),a;let r=await this._collection.addEdges(n,a,i,this.slicePlaneEnabled,e.elevationOffsets);return e.edgeMemoryUsage=r,e.node.memory+=r,a}return o&&(e.node.memory-=e.edgeMemoryUsage,e.edgeMemoryUsage=0,a.removeObject(n)),null}_applyFiltersToNode(e){let{filteredIds:t,weaklyRemovedIds:n}=e,r=this._applyFiltersToNodeComponents(e);return this._updateFilteredIdCounts(e,t,n),r&&this._labeler?.applyFilterChange(e),r}_applyFiltersToNodeComponents(e){let t=this._collection,n=t.getComponentCount(e.objectHandle),r=e.filteredIds!=null,i=n.invisible===0;if(t.setAllComponentVisibilities(e.objectHandle,`all`),this._filters.length===0)return e.filteredIds=null,!i;if((e.filteredIds==null||e.appliedFilters!==this._filters)&&(e.weaklyRemovedIds=null,e.filteredIds=Jt(e,this._filters),e.appliedFilters=this._filters),r&&e.filteredIds===e.featureIds&&(!this._mismatchHide||e.filteredIds.every(e=>!this._mismatchHide?.has(e))))return!i;let a=Yt(e,this._mismatchShow,this._mismatchHide);return t.setAllComponentVisibilities(e.objectHandle,a),!0}_removeAllNodeDataFromStage(e=this.elevationOffset){this._nodeId2Meta.forEach((t,n)=>this._removeNodeStageData(n,e)),this._nodeId2MetaReloading.forEach((t,n)=>this._removeNodeStageData(n,e,this._nodeId2MetaReloading)),this._elevationTask=s(this._elevationTask)}removeNode(e){let t=this.elevationOffset;this._removeNodeStageData(e,t),this._removeNodeStageData(e,t,this._nodeId2MetaReloading),this._elevationTask!=null&&this._elevationTask.remove(e)}_removeNodeStageData(e,t,n=this._nodeId2Meta){n.has(e)&&this._controller.updateLoadStatus(e,!1);let r=n.get(e);r==null?n.delete(e):(this._collection.setObjectVisibility(r.objectHandle,!1),this._edgeView!=null&&this._edgeView.hasObject(r.objectHandle)&&this._edgeView.updateObjectVisibility(r.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.layer.title)),this._visibleGeometryChanged(r,1),this._labeler!=null&&this._labeler.removeNodeMeta(r),n.delete(e),this._highlights?.objectDeleted(r),n===this._nodeId2Meta?(this._updateFeatureIdCounts(r,-1),this._cacheGPUData(r,t),this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopNodeFading(r)):this._deleteComponentObject(r),this._treeDebugger!=null&&this._treeDebugger.update())}_deleteComponentObject(e){if(this._edgeView!=null&&this._edgeView.removeObject(e.objectHandle),this._memEstimateGeometryRemoved(e.objectHandle),this._collection.destroyObject(e.objectHandle),e.textures)for(let t of e.textures)this._memEstimateTextureRemoved(t),this._stage.removeTexture(t)}updateNodeState(e,t){this._nodeId2Meta.get(e)?.objectHandle.updatePolygonOffset(+(t===0))}updateNodeIndex(e,t){if(this._nodeId2Meta.has(e)){let n=this._nodeId2Meta.get(e);this._nodeId2Meta.delete(e),this._nodeId2Meta.set(t,n),this.notifyChange(`elevationRange`)}let n=this._nodeId2MetaReloading.get(e);n&&(this._nodeId2MetaReloading.delete(e),this._nodeId2MetaReloading.set(t,n))}_invalidateAllSymbols(){this._rendererVersion=U(this._rendererVersion,1),this._controller?.requestUpdate()}_getInvalidRendererVersion(){return U(this._rendererVersion,-1)}async _rendererChange(e){if(this._currentRenderer=e,this.notifyChange(`rendererTextureUsage`),this._rendererVersion=U(this._rendererVersion,1),this._rendererFields=null,this._colorVariable=null,this._opacityVariable=null,this._invalidateAllSymbols(),e&&(this._rendererFields=await e.getRequiredFields(this.layer.fieldsIndex)),this._updateSymbologyFields(),!this._arcade&&e&&`arcadeRequired`in e&&e.arcadeRequired&&(this._arcade=await Te()),e&&`visualVariables`in e&&e.visualVariables)for(let t of e.visualVariables)t.type===`color`?this._colorVariable=t:t.type===`opacity`?this._opacityVariable=t:a.getLogger(this).warn(`Unsupported visual variable type for 3D Object Scene Services: ${t.type}`);if(e)for(let t of e.symbols)t.type!==`mesh-3d`&&a.getLogger(this).error(`Symbols of type '${t.type}' are not supported for 3D Object Scene Services.`);this._controller&&this._controller.requestUpdate()}_getCachedEdgeMaterials(e){return this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e),e.cachedEdgeMaterials}_getComponentParameters(e){this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e);let t=e.cachedSymbology;return(n,r)=>{let i=n*e.cachedSymbologyStride;T(r.externalColor,t[i]/255,t[i+1]/255,t[i+2]/255,t[i+3]/255);let a=this._stage.renderView.olidRenderHelper;if(a){let t=e.featureIds[n],i=this.sublayerId?`${this.layerViewUid}_${this.sublayerId}`:this.layerViewUid,o=z(this.view,this.uid);a.setUidToObjectAndLayerId(t,t,this.layerId,i,this.layerPopupEnabledAndHasTemplate&&!o,e.node.resources.attributes,n,this.sublayerId),r.olidColor=a.getObjectAndLayerIdColor({graphicUid:t,layerViewUid:i})}r.externalColorMixMode=t[i+4]&15,r.castShadows=!!(t[i+4]&16),r.pickable=!!(t[i+4]&32),r.elevationOffset=e.elevationOffsets?.[n]??0,r.emissiveStrength=e.emissiveStrengths?.[n]??1,r.emissiveSource=e.emissiveSources?.[n]??0}}_getSymbolInfo(e,t){let n=e?.getSymbol(t,{arcade:this._arcade});if(!(n instanceof V))return null;let r=n.id;if(this._symbolInfos.has(r))return this._symbolInfos.get(r);let i=at(n);return this._symbolInfos.set(r,i),i}_setSymbologyOverride(e,t){this._symbologyOverride!==e&&(this._symbologyOverride=e,this._symbologyOverrideFields=t,this._invalidateAllSymbols(),this._updateSymbologyFields())}_updateSymbologyFields(){this._symbologyFields=this._symbologyOverrideFields!=null&&this._symbologyOverrideFields.length>0?this._rendererFields!=null&&this._rendererFields.length>0?xe(this.layer.fieldsIndex,[...this._rendererFields,...this._symbologyOverrideFields]):this._symbologyOverrideFields:this._rendererFields}_updateCachedRendererData(e){if(e.cachedRendererVersion=this._rendererVersion,!this._hasComponentData)return;let t=this._tmpAttributeOnlyGraphic,n={};t.attributes=n;let r=this._currentRenderer,i=e.attributeInfo?.attributeData,a=e.featureIds?this.layer.objectIdField:null,o=i!=null&&this._symbologyFields!=null&&this._symbologyFields.length>0,s=null,c=null;if(o&&this._symbologyFields!=null){s=[],c=[];for(let e of this._symbologyFields){let t=i[e];t&&(s.push(e),c.push(t))}}e.cachedSymbology||=I(e.featureIds.length*e.cachedSymbologyStride);let l=new ut,u=this.fullOpacity,d=this.nodeCrossfadingEnabled?this.getNodeOpacity(e):u,f=null,p=1,m=W,h=0;for(let i=0;i<e.featureIds.length;i++){if(a!=null&&(n[a]=e.featureIds[i]),o&&s)for(let e=0;e<s.length;e++)n[s[e]]=H(c[e],i);let u=r?this._getSymbolInfo(r,t):null,g,_;if(l.pickable=!0,r&&`visualVariables`in r){if(this._colorVariable){let e=Ce(this._colorVariable,t,{color:Pt,arcade:this._arcade});e&&(g=l.color,g[0]=e.r/255,g[1]=e.g/255,g[2]=e.b/255,g[3]=e.a??1,!this._opacityVariable&&e.a!==null&&(_=e.a))}this._opacityVariable&&(_=we(this._opacityVariable,t,{arcade:this._arcade}))}if(u?.material){let e=u.material;g=g==null||_==null?Ie(g,_,e.color,e.alpha,Dt,l.color):Ie(g,_,null,null,Dt,l.color)}g??=T(l.color,1,1,1,1);let v=u?.material;if(l.colorMixMode=v?.colorMixMode??1,l.edgeMaterial=u?.edgeMaterial,this._symbologyOverride?.(t,l),this._nodeColorOverride!=null&&(this._nodeColorOverride(e.node,g),l.colorMixMode=3),l.pickable&&=g[3]>=Et,l.castShadows=u?u.castShadows:l.pickable,l.edgeMaterial!=null){let t=g[3]>=1&&(e.material.isOpaque||l.colorMixMode===3)?1:0;(l.edgeMaterial!==f||t!==p)&&(m={...l.edgeMaterial,opacity:d,objectTransparency:t},f=l.edgeMaterial,p=t),e.cachedEdgeMaterials[i]=m}else e.cachedEdgeMaterials[i]=W;e.cachedSymbology[h++]=Math.round(g[0]*255),e.cachedSymbology[h++]=Math.round(g[1]*255),e.cachedSymbology[h++]=Math.round(g[2]*255),e.cachedSymbology[h++]=Math.round(g[3]*255),e.cachedSymbology[h++]=l.colorMixMode|l.castShadows<<4|l.pickable<<5;let y=v?.emissive?.strength==null?Y:v?.emissive?.strength;y!==Y&&!e.emissiveStrengths&&(e.emissiveStrengths=Array(e.featureIds.length).fill(Y)),e.emissiveStrengths&&(e.emissiveStrengths[i]=y);let ee=v?.emissive?.source||0;ee!==0&&!e.emissiveSources&&(e.emissiveSources=Array(e.featureIds.length).fill(0)),e.emissiveSources&&(e.emissiveSources[i]=ee)}}_getFilteredEdgeMaterials(e){let t=this._getCachedEdgeMaterials(e);this.nodeCrossfadingEnabled||X(t,this.fullOpacity);let n=e.filteredIds;if(n==null)return{hasEdges:t.some(e=>e!==W),perFeatureEdgeMaterials:t};let r=0,i=!1,a=t.map((t,a)=>e.featureIds[a]===n[r]?(i||=t!==W,r++,t):W);return{hasEdges:i,perFeatureEdgeMaterials:a}}_updateComponentData(e){if(!this._hasComponentData)return;let{objectHandle:t}=e,n=this._getComponentParameters(e);this._collection.setComponentData(t,n),this._stage.renderView.requestRender()}_reloadAll(e=this.elevationOffset){this._removeAllNodeDataFromStage(e),this._controller!=null&&this._controller.restartNodeLoading()}_refreshGroundUsage(){this._intersectionHandler.isGround=has(`enable-feature:im-as-ground`)?this.layer.isUsedAsGroundLayer:this._isIntegratedMesh,this.contentVisible&&(this.view.elevationProvider.unregister(this._elevationProvider),this.view.elevationProvider.register(this._elevationContext,this._elevationProvider)),this._reloadAll(),this.clearMemCache()}_opacityChange(e){this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopAllNodeFading(),this._nodeId2Meta.forEach(t=>{t!=null&&(this._collection.updateObjectOpacity(t.objectHandle,e),X(t.cachedEdgeMaterials,e),this._updateEdgeRendering(t))})}_updateMaterial(e){e.objectHandle.updateMaterial({slicePlaneEnabled:this.slicePlaneEnabled,usePBR:this._usePBR})}_updateEngineObject(e){this._updateComponentData(e),this._applyFiltersToNode(e),this._addOrUpdateEdgeRendering(e).catch(()=>{}),this._visibleGeometryChanged(e,2)}intersect(e,t,n,r){this._intersectionHandler.intersectRay(e,t,n,r,null,!1)}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),this._labeler!=null&&(this._labeler.slicePlaneEnabled=e),this._foreachMeta(t=>{t.objectHandle.updateMaterial({slicePlaneEnabled:e}),this._updateEdgeRendering(t,!1)})}_updatePBR(e){this._foreachMeta(t=>t.objectHandle.updateMaterial({usePBR:e})),this._hasLoadedPBRTextures=!0}_foreachMeta(e){this._nodeId2Meta.forEach(t=>{t!=null&&e(t)})}get _usePBR(){return this._imShading&&this.view.qualitySettings.physicallyBasedRenderingEnabled}_updateEdgeRendering(e,t=!0){this._edgeView!=null&&this._edgeView.hasObject(e.objectHandle)&&this._addOrUpdateEdgeRendering(e,t).catch(()=>{})}_forAllNodes(e){this._nodeId2Meta.forEach(e)}_ignoreClientNodeOverriddenFeatures(e){return this.i3sOverrides.hasGeometryChanges?(t,n,r)=>r.node.index>=0&&this.i3sOverrides.featureHasGeometryChanges(t)?0:e(t,n,r):e}_forAllFeatures(e,t,n){for(let r of this._nodeId2Meta.values())if(r!=null&&!(t&&r.node.serviceMbsInIndexSR&&t(r.node.serviceMbsInIndexSR)===1))switch(n){case 1:this._forAllFeaturesOfNode(r,e);break;case 0:this._forAllVisibleFeaturesOfNode(r,e);break;case 2:this._forAllQueryableFeaturesOfNode(r,e)}}_forAllFeaturesOfNode(e,t){e.featureIds.forEach((n,r)=>t(n,r,e))}_forAllVisibleFeaturesOfNode(e,t){let n=e.featureIds;this._collection.forEachVisibleComponent(e.objectHandle,r=>t(n[r],r,e)===0)}_forAllQueryableFeaturesOfNode(e,t){let n=this._ignoreClientNodeOverriddenFeatures(t);if(this._renderClippingArea==null)return this._forAllFeaturesOfNode(e,n);let r=this._boundingRectNodeTest(e,this._renderClippingArea);if(r===0)return;if(r===3)return this._forAllFeaturesOfNode(e,n);let i=e.featureIds,a=e.objectHandle,o=ot(this._renderClippingArea,this._collection.getObjectTransform(a));for(let t=0;t<i.length;t++)this._boundingRectFeatureTest(e,t,o)&&n(i[t],t,e)}_createAttributes(e,t){let n={};t.featureIds!=null&&(n[this._getObjectIdField()]=t.featureIds[e]);let r=t.attributeInfo?.attributeData;if(r!=null)for(let t of Object.keys(r))n[t]=H(r[t],e);return n}_createGraphic(e,t){return this._createLayerGraphic(this._createAttributes(e,t))}highlight(e,t){let r=dt(e);if(r.length===0)return ft;let i=wt(t),a=r[0]instanceof n?this._featureIdsFromGraphics(r):typeof r[0]==`number`?r:null;if(!a)return ft;let o=this._ensureHighlights(),{set:s,handle:c}=o.acquireSet(i);return o.setFeatureIds(s,a),c}_featureIdsFromGraphics(e){let t=this.layer.fieldsIndex,n=this._getObjectIdField();return e.map(e=>G(t,e.attributes,n))}_ensureHighlights(){return this._highlights??=new Re({collection:this._collection,forAllFeatures:e=>this._forAllFeatures(e,null,1),forAllFeaturesOfNode:(e,t)=>this._forAllFeaturesOfNode(e,t)}),this._highlights}resetHighlights(){this._highlights=s(this._highlights)}_visibleGeometryChanged(e,t){this._elevationProvider&&(this._visibleGeometryChangedSchedulerHandle??=m(()=>{let{node:t}=e,n=t.visibilityObbInRenderSR??t.geometryObbInRenderSR??t.serviceObbInRenderSR;if(n!=null){let e=A();n.toAaBoundingBox(e),this.emit(`visible-geometry-changed`,new De(e))}else this.emit(`visible-geometry-changed`);this._visibleGeometryChangedSchedulerHandle=null}),this._updateSnappingSources(e,t),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}get performanceInfo(){return new ke(this.usedMemory,this._nodeId2Meta.size,Math.round(this._gpuMemoryEstimate/1048576),Math.round(this._geoMemoryEstimate/1048576),Math.round(this._texMemoryEstimate/1048576),Math.round(this.unloadedMemory/1048576),this._idbCacheEnabled?Math.round(this._idbCache.getHitRate()*100):0)}checkInvariants(){}get test(){}getNodeOpacityByIndex(e){let t=this._nodeId2Meta.get(e);return this.getNodeOpacity(t)}getNodeOpacity(e){return e==null?0:this._collection.getObjectOpacity(e.objectHandle)}isNodeFullyFadedIn(e){return this._crossfadeHelper.isNodeFullyFadedIn(e)}getNodeCrossfadeMetaData(e){return this._nodeId2Meta.get(e)}getNodeComponentHandle(e){return this._nodeId2Meta.get(e)?.objectHandle}markNodeToRemove(e){this._controller&&this._controller.markNodeToRemove(e)}removeMarkedNodes(){this._controller&&this._controller.removeMarkedNodes()}foreachCrossfadeNode(e){this._nodeId2Meta.forEach(e)}fadeNode(e,t,n){if(!this.nodeCrossfadingEnabled)return;let r=this._nodeId2Meta.get(e);r!=null&&this._crossfadeHelper.fadeNode(e,r,t,n)}setNodeOpacityByIndex(e,t){let n=this._nodeId2Meta.get(e);n!=null&&this._setNodeOpacity(n,t)}_setNodeOpacity(e,t){this._collection.updateObjectOpacity(e.objectHandle,t),this._setNodeEdgeOpacity(e,t)}_setNodeEdgeOpacity(e,t){if(this._edgeView==null||!e.cachedEdgeMaterials)return;X(e.cachedEdgeMaterials,t);let n=e.objectHandle;this._edgeView.hasObject(n)&&this._edgeView.updateAllComponentOpacities(n,t).catch(e=>this._logEdgeViewError(e,this.layer.title))}get hasModifications(){return this._isIntegratedMesh&&this._layerClippingArea!=null||this._modifications&&this._modifications.length>0}updateNodeModificationStatus(e){let t=e.length;if(!this.hasModifications||t<=0||this._i3sWasmLoaded!==!0)return;let n=this.uid,r=Bt(e);if(r){let t={context:n,buffer:r.buffer};Me(t);let i=new Float64Array(r.buffer);e.forAll((e,t)=>{let n=i[t],r=Ne(n);e.imModificationImpact=r,r!==0&&this._controller.invalidateGeometryVisibility(e.index)})}}notifyUpdate(){this.notifyChange(`updating`)}notifyLODUpdate(){this._controller.notifyLODUpdate()}isUpdating(){return!!(this._controller&&this._controller.updating)||!!this._visibleGeometryChangedSchedulerHandle||this._labeler!=null&&this._labeler.updating||this._crossfadeHelper?.updating||this._i3sWasmLoaded instanceof Promise||this._asyncModuleLoading>0||this._elevationTask!=null&&this._elevationTask.readyToRun||this._needFilterResolve||this._compressionTracker.compressing}trackSnappingSources(e){let t={events:e,fetchEdgeLocations:async(e,t,n)=>{let r=this._nodeId2Meta.get(e);if(r==null)throw Error(`invalid-node`);let{origin:i,buffer:a}=await this._collection.extractEdgeInformation(r.objectHandle,t,n);return this._snappingLocationsApplyElevation(r,a,i),{type:`components`,objectIds:r.featureIds,locations:a,origin:i}},remove:()=>r(this._snappingSourcesTrackers,t)};return this._snappingSourcesTrackers.push(t),this._nodeId2Meta.forEach((t,n)=>{if(t==null)return;let r=this._controller.getRenderMbs(t.node);r&&e.add(n,r)}),t}_snappingLocationsApplyElevation(e,t,n){if(!e.elevationOffsets||this.elevationInfo.mode===0)return;let r=t.position0,i=t.position1,a=t.componentIndex,o=w(),s=w(),c=(e,t)=>{S(e,e,n),this.view.renderCoordsHelper.worldUpAtPosition(e,s),S(e,e,de(s,s,t)),C(e,e,n)};for(let t=0;t<r.count;t++){let n=e.elevationOffsets[a.get(t)];r.getVec(t,o),c(o,n),r.setVec(t,o),i.getVec(t,o),c(o,n),i.setVec(t,o)}}_updateSnappingSources(e,t){let{index:n}=e.node,r=this._controller.getRenderMbs(e.node);if(r!=null)for(let e of this._snappingSourcesTrackers)(t===1||t===2)&&e.events.remove(n),(t===0||t===2)&&e.events.add(n,r)}_logEdgeViewError(e,t){u(e)||a.getLogger(this).warn(`Error while processing edges. Edges on this layer might not display correctly`,t,e)}_indexedDbSizeCheck(e,t){return t.byteSize>104857600?(a.getLogger(this).warn(`Node is too big to store in IndexedDB cache: ${e.id} (${t.byteSize} bytes)`),!1):t.byteSize>0}get elevationProvider(){return this._elevationProvider}};return e([_()],F.prototype,`extractChanges`,null),e([_()],F.prototype,`_hasLoadedPBRTextures`,void 0),e([_()],F.prototype,`_asyncModuleLoading`,void 0),e([_()],F.prototype,`_visibleGeometryChangedSchedulerHandle`,void 0),e([_()],F.prototype,`view`,void 0),e([_()],F.prototype,`layer`,void 0),e([_()],F.prototype,`_controller`,void 0),e([_()],F.prototype,`_labeler`,void 0),e([_()],F.prototype,`updating`,void 0),e([_()],F.prototype,`suspended`,void 0),e([_()],F.prototype,`contentVisible`,null),e([_({readOnly:!0})],F.prototype,`legendEnabled`,null),e([_(gt)],F.prototype,`updatingProgress`,void 0),e([_()],F.prototype,`updatingProgressValue`,null),e([_()],F.prototype,`hasTexturesOrVertexColors`,null),e([_()],F.prototype,`rendererTextureUsage`,null),e([_()],F.prototype,`elevationOffset`,null),e([_()],F.prototype,`elevationInfo`,null),e([_({type:Boolean})],F.prototype,`slicePlaneEnabled`,void 0),e([_()],F.prototype,`supportedTextureEncodings`,null),e([_({type:[R]})],F.prototype,`_modifications`,void 0),e([_({readOnly:!0})],F.prototype,`clientGeometry`,null),e([_()],F.prototype,`elevationRange`,null),e([_()],F.prototype,`fullExtent`,null),e([_()],F.prototype,`_elevationTask`,void 0),e([_({readOnly:!0})],F.prototype,`_usePBR`,null),F=e([v(`esri.views.3d.layers.I3SMeshView3D`)],F),F},At=A(),jt=M(),Mt=M(),Nt=new J,Pt=new t([0,0,0,0]),Ft=new F(0,0,0,0);function It(e){if(e==null)return!1;let t=e.metallicRoughness;return t&&t.baseColorTextureId>=0||t&&t.metallicRoughnessTextureId>=0||e.normalTextureId>=0||e.emissiveTextureId>=0||e.occlusionTextureId>=0}function Lt(e){return`geometryData`in e}function Rt(e){return e!=null&&g(e.data)}function zt(e,t){let n=1024+e.interleavedVertexData.byteLength+(e.indices?e.indices.byteLength:0)+e.positionData.data.byteLength+e.positionData.indices.byteLength;if(t!=null)for(let e of t)e!=null&&g(e.data)&&(n+=e.data.byteLength);return n}function Bt(e){if(e.length===0)return;let t=e.length*10,n=new Float64Array(t),r=0;return e.forAll(e=>{let t=e.serviceObbInIndexSR;t??(t=Nt,e.serviceMbsInIndexSR?(t.setCenter(e.serviceMbsInIndexSR.center),t.setHalfSizeFromValues(e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius)):t.invalidate());let i=t.data;n[r++]=i[0],n[r++]=i[1],n[r++]=i[2],n[r++]=i[3],n[r++]=i[4],n[r++]=i[5],n[r++]=i[6],n[r++]=i[7],n[r++]=i[8],n[r++]=i[9]}),n}class Vt{constructor(e,t,n){this.attributeInfo=e,this.meta=t,this.promise=n,this.allowMemCache=!0}}function X(e,t){e.forEach(e=>e.opacity=t)}class Z{constructor(e,t){this.mode=e,this.offset=t}}const Ht=w(),Ut=A(),Wt=`elevation-change`,Gt=``,Kt=`@null`,qt=`@ECEF`;function Jt(e,t){let n=e.featureIds.slice();for(let r of t)if(r(n,e),n.length===0)break;return n.length===e.featureIds.length?e.featureIds:n}function Yt(e,t,n){let r=[],i=e.filteredIds;if(i!=null&&!t?.size&&!n?.size)e.featureIds.forEach((e,t)=>{i[r.length]===e&&r.push(t)});else if(i!=null){let a=0;e.featureIds.forEach((e,o)=>{if(i[a]===e)++a;else if(!t?.has(e))return;n?.has(e)||r.push(o)})}return r}function Q(e,t,n){if(e&&t)for(let r of t){let t=(e.get(r)??0)+n;t>0?e.set(r,t):e.delete(r)}}function $(e,t=0){let n=new Map;for(let r of e)Q(n,t===0?r?.featureIds:t===1?r?.filteredIds:r?.weaklyRemovedIds,1);return n}const Xt=w();export{kt as I3SMeshView3D};
2
+ import{__decorate as e}from"tslib";import t from"../../../Color.js";import n from"../../../Graphic.js";import{removeUnordered as r,isSome as i}from"../../../core/arrayUtils.js";import has from"../../../core/has.js";import a from"../../../core/Logger.js";import{equals as o}from"../../../core/MapUtils.js";import{destroyMaybe as s}from"../../../core/maybe.js";import c from"../../../core/PooledArray.js";import{ignoreAbortErrors as l,isAbortError as u,throwIfAborted as d}from"../../../core/promiseUtils.js";import{initial as f,watch as p}from"../../../core/reactiveUtils.js";import{schedule as m}from"../../../core/scheduling.js";import{equals as h}from"../../../core/SetUtils.js";import{isArrayBuffer as g}from"../../../core/typedArrayUtil.js";import{property as _,subclass as v}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as y,exactEquals as ee,invert as te}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as ne,IDENTITY as re}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as ie,getTranslation as ae}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as oe,create as se}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as ce}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{set as b,transformMat4 as x,transformMat3 as le,sub as ue,add as S,scale as de,subtract as C}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as T}from"../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as fe}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as E}from"../../../core/support/UpdatingHandles.js";import{getSphericalPCPF as D}from"../../../geometry/spatialReferenceEllipsoidUtils.js";import{localLinearScaleFactors as pe}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectBoundingSphere as me}from"../../../geometry/projection/projectBoundingSphere.js";import{projectBuffer as he}from"../../../geometry/projection/projectBuffer.js";import{getProjectorName as O}from"../../../geometry/projection/projectors.js";import{projectVectorToVector as k}from"../../../geometry/projection/projectVectorToVector.js";import{create as A,fromBuffer as ge,toRect as j}from"../../../geometry/support/aaBoundingBox.js";import{create as M,intersects as N}from"../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as P,ensurePackedMat4f64 as _e}from"../../../geometry/support/DoubleArray.js";import{compactFloatArray as ve}from"../../../geometry/support/FloatArray.js";import{compactIndices as ye}from"../../../geometry/support/Indices.js";import{Sphere as F}from"../../../geometry/support/sphere.js";import{newUByteArray as I}from"../../../geometry/support/UByteArray.js";import{fallbackObjectIDAttribute as L}from"../../../layers/LayerConstants.js";import be from"../../../layers/graphics/controllers/I3SOnDemandController.js";import{fixFields as xe}from"../../../layers/support/fieldUtils.js";import{I3SExtractChanges as Se}from"../../../layers/support/I3SExtractChanges.js";import R from"../../../layers/support/SceneModification.js";import{getColor as Ce,getOpacity as we}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{isBasemapLayerView as z}from"../../../support/basemapUtils.js";import{getElevationOffset as B}from"../../../support/elevationInfoUtils.js";import{loadArcade as Te}from"../../../support/loadArcade.js";import V from"../../../symbols/MeshSymbol3D.js";import Ee from"../../../symbols/SimpleFillSymbol.js";import{ContentGeometryUpdateEvent as De}from"./ContentGeometryLayerView.js";import Oe from"./I3SMeshViewLabeler.js";import{I3SMeshViewPerformanceInfo as ke}from"./I3SMeshViewPerformanceInfo.js";import{initialize as Ae,setModificationsSync as je,filterObbsForModificationsSync as Me,interpretObbModificationResults as Ne}from"./SceneLayerWorker.js";import{SceneLayerWorkerHandle as Pe,toWasmModification as Fe}from"./SceneLayerWorkerHandle.js";import{overrideColor as Ie}from"./graphics/graphicUtils.js";import{areLabelsVisible as Le}from"./graphics/Labeler.js";import Re from"./i3s/Highlights.js";import{I3SAsyncElevationUpdater as ze}from"./i3s/I3SAsyncElevationUpdater.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SCrossfadeHelper as Be,NodeCrossfadeMetaData as Ve}from"./i3s/I3SCrossfadeHelper.js";import{boundingBoxCornerPoints as He}from"./i3s/I3SGeometryUtil.js";import{I3SIntersectionHandler as Ue,TraversedIntersectionNode as We}from"./i3s/I3SIntersectionHandler.js";import{getSupportedEncodings as Ge,selectEncoding as Ke,defaultMaterial as qe,createTexture as Je,configureMaterial as Ye}from"./i3s/I3SMaterialUtil.js";import{I3SOverrides as Xe}from"./i3s/I3SOverrides.js";import{computeGlobalTransformation as Ze}from"./i3s/I3SProjectionUtil.js";import{rendererNeedsTextures as Qe,checkSceneLayerValid as $e,checkSceneLayerCompatibleWithView as et,whenGraphicAttributes as tt,computeVisibilityObb as nt,filterInPlace as rt,intersectBoundingRectWithMbs as it,addWraparound as U,getSymbolInfo as at,transparentEdgeMaterial as W,getClipRect as ot}from"./i3s/I3SUtil.js";import{IDBCache as st}from"./i3s/IDBCache.js";import{IDBMockCache as ct}from"./i3s/IDBMockCache.js";import{LayerElevationProvider as lt}from"./i3s/LayerElevationProvider.js";import{SymbologyInfo as ut}from"./i3s/SymbologyInfo.js";import{attributeLookup as G}from"./support/attributeUtils.js";import{normalizeHighlightTarget as dt,emptyHighlightHandle as ft}from"./support/highlightUtils.js";import{makeScheduleFunction as pt}from"./support/makeScheduleFunction.js";import{debugFlags as K}from"../support/debugFlags.js";import{ElevationRange as q}from"../support/ElevationRange.js";import{toBoundingRect as mt}from"../support/extentUtils.js";import{Obb as J,ensurePackedObbData as ht}from"../support/orientedBoundingBox.js";import{updatingProgress as gt}from"../support/updatingProperties.js";import{glLayout as _t}from"../support/buffer/glUtil.js";import{ObjectParameters as vt}from"../webgl-engine/collections/Component/ObjectParameters.js";import{createVertexBufferLayout as yt,ComponentGeometryParameters as bt,SourceGeometry as xt,VertexBufferLayoutCreationParameters as St}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as Ct}from"../webgl-engine/collections/Component/Transform.js";import{emissiveStrengthDefault as Y}from"../webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js";import{getHighlightName as wt}from"../../support/highlightOptionsUtils.js";import{TextureCompressionTracker as Tt}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as Et}from"../../../webscene/support/AlphaCutoff.js";const Dt=[1,1,1,1];class Ot extends Ve{constructor(e,t,n,r,i,a,o,s,c,l,u){super(),this.node=e,this.featureIds=t,this.objectHandle=n,this.cachedRendererVersion=r,this.attributeInfo=i,this.material=a,this.textures=o,this.anchorIds=s,this.anchors=c,this._elevationAlignmentRange=new q,this._geometryElevationRange=new q,this.cachedElevationAnchors=null,this.cachedEdgeMaterials=[],this.edgeMemoryUsage=0,this.cachedSymbologyStride=5,this.elevationAlignmentOffset=0,this._baseGeometryElevationRange=new q(l,u),this.updateGeometryElevationRange()}get geometryElevationRange(){return this._geometryElevationRange}updateGeometryElevationRange(){let e=this._baseGeometryElevationRange;if(!e.elevationRangeValid||e.isEmpty){this._elevationAlignmentRange.invalidateElevationRange(),this._geometryElevationRange.invalidateElevationRange();return}let t=this.elevationOffsets;if(!t||t.length===0){let t=this.elevationAlignmentOffset;this._elevationAlignmentRange.setElevationRangeValues(t,t),this._geometryElevationRange.setElevationRangeValues(e.minElevation+t,e.maxElevation+t);return}let n=1/0,r=-1/0;for(let e=0;e<t.length;++e){let i=this.elevationAlignmentOffset+(t[e]??0);n=Math.min(n,i),r=Math.max(r,i)}this._elevationAlignmentRange.setElevationRangeValues(n,r),this._geometryElevationRange.setElevationRangeValues(e.minElevation+n,e.maxElevation+r)}get usedMemory(){return this.node.memory}get featureExtents(){return this._featureExtents??=new Float64Array(6*this.featureIds.length).fill(1/0),this._featureExtents}}const kt=t=>{let g=t,F=class extends g{constructor(){super(...arguments),this._extractChanges=null,this._applySSAO=!0,this._imShading=!!has(`enable-feature:im-shading`),this._imVertexNormals=!!has(`enable-feature:im-vertex-normals`),this._updatingHandles=new E,this._highlights=null,this._nodeId2Meta=new Map,this._nodeId2MetaReloading=new Map,this._i3sWasmLoaded=!1,this._snappingSourcesTrackers=[],this._compressionTracker=new Tt,this._hasLoadedPBRTextures=!1,this._asyncModuleLoading=0,this._addTasks=new Map,this._currentRenderer=null,this._rendererVersion=0,this._colorVariable=null,this._opacityVariable=null,this._rendererFields=null,this._symbologyFields=null,this._symbologyOverride=null,this._symbologyOverrideFields=null,this._symbolInfos=new Map,this._visibleGeometryChangedSchedulerHandle=null,this._hasComponentData=!1,this._hasVertexColors=!1,this._nodeColorOverride=null,this.updating=!0,this.holeFilling=`auto`,this._hasColors=!1,this._hasTextures=!1,this._hasData=!1,this.slicePlaneEnabled=!1,this._modifications=[],this.ignoresMemoryFactor=!1,this._layerUrl=``,this._cacheKeySuffix=null,this._meshUtilsImporterModule=null,this._meshUtilsImporterPromise=null,this._planetRadiusInGlobalMode=0,this._elevationTask=null,this._needFilterResolve=!1,this._filters=[],this._arcade=null,this._tmpAttributeOnlyGraphic=new n,this._crossfadeHelper=new Be(this)}get lodCrossfadeoutDuration(){return 0}get lodCrossfadeinDuration(){return 0}get lodCrossfadeUncoveredDuration(){return 0}get extractChanges(){return this._extractChanges?.layer!==this.layer&&(this._extractChanges?.destroy(),this._extractChanges=new Se({layer:this.layer})),this._extractChanges}get layerViewUid(){return this.uid}get layerId(){return this.layer.id}get sublayerId(){return null}get _isIntegratedMesh(){return this.layer.type===`integrated-mesh`}get contentVisible(){return!this.suspended&&this._controller?.rootNodeVisible&&this.fullOpacity>=Et}get legendEnabled(){return this.contentVisible&&this.layer?.legendEnabled===!0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get hasTexturesOrVertexColors(){return this._hasData?this._hasTextures||this._hasColors?`yes`:`probably-not`:`unknown`}get rendererTextureUsage(){return Qe(this._currentRenderer)?this._usePBR||this._hasLoadedPBRTextures?63:53:this._usePBR||this._hasLoadedPBRTextures?44:36}get elevationOffset(){let e=this.layer?.elevationInfo;return e?.mode===`absolute-height`?B(e,this.layer.spatialReference):0}get elevationInfo(){let e=this.layer?.elevationInfo;switch(e?.mode){case`absolute-height`:return new Z(0,B(e,this.layer.spatialReference));case`relative-to-ground`:return new Z(1,B(e,this.layer.spatialReference));case`on-the-ground`:return new Z(2,0);default:return new Z(0,0)}}get supportedTextureEncodings(){return Ge(this.view.stage.renderView.capabilities)}get clientGeometry(){return this.i3sOverrides.geometryOverrides}get elevationRange(){let e=this._nodeId2Meta,t=new q;for(let n of e.values()){let e=n?.geometryElevationRange;e?.elevationRangeValid&&!e.isEmpty&&t.expandElevationRange(e)}return t.elevationRangeValid&&!t.isEmpty?t:null}get fullExtent(){return this.layer.fullExtent}initialize(){let e=has(`enable-feature:idb-mock-cache`);this._idbCache=e?new ct(this.view,e):new st(`esri-scenelayer-cache`,`geometries`),this.addResolvingPromise(this.layer.indexInfo);let t=this.view.resourceController,n=t.memoryController;this.i3sOverrides=new Xe({view:this.view,layer:this.layer,memoryController:n,extractChanges:this.extractChanges}),this._workerHandle=new Pe(pt(t)),this.addResolvingPromise(this._workerHandle.promise),$e(this.layer),et(this.layer,this.view);let r=this.layer.store.defaultGeometrySchema;if(this.addResolvingPromise(this._workerHandle.setLegacySchema(this.uid,r).catch(l)),this._layerUrl=this.layer.parsedUrl.path,this._controller=new be({layerView:this,worker:this._workerHandle}),this._gpuMemoryEstimate=0,this._texMemoryEstimate=0,this._geoMemoryEstimate=0,this._stage=this.view.stage,this._collection=this._stage.renderView.componentObjectCollection,this._isIntegratedMesh||!r)this._hasComponentData=!1;else{let e=r.featureAttributes;this._hasComponentData=!!(e&&e.faceRange&&e.id)}this._hasVertexColors=(r?.vertexAttributes.color??null)!=null&&!this.layer.cachedDrawingInfo?.color;let i=this.view.resourceController.memoryController.newCache(`sl-${this.uid}`,e=>this._deleteComponentObject(e));this._memCache=i;let o=this._controller,c=this._nodeId2Meta,u=this._nodeId2MetaReloading;function*d(e){let t=o.index;if(!t)return;let n=t.rootNode;if(!n)return;let r=null;for(let i of t.traverseValues(n,t=>(r=(c.get(t.index)||u.get(t.index))?.objectHandle??null,e(t,r))))yield new We(i,r)}this._intersectionHandler=new Ue({layerViewUid:this.layerViewUid,sublayerId:this.sublayerId,collection:this._collection,slicePlaneEnabled:this.slicePlaneEnabled,isGround:has(`enable-feature:im-as-ground`)?this.layer.isUsedAsGroundLayer:this._isIntegratedMesh,traverseNodeHierarchy:d}),this._elevationProvider=new lt({view:this.view,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),this._hasLoadedPBRTextures=this._usePBR,this._updatingHandles.add(()=>this.view.clippingArea,()=>this._clippingAreaChanged(),f),this._updatingHandles.add(()=>this.fullOpacity,e=>this._opacityChange(e)),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this.elevationOffset,(e,t)=>{this._reloadAll(t),this._controller.invalidateVisibilityObbs()}),this._updatingHandles.add(()=>this.elevationInfo,(e,t)=>this._elevationInfoChanged(e,t),f),this._updatingHandles.add(()=>!this.suspended&&this.elevationInfo.mode!==0,(e,t)=>{e?this.addHandles(this.view.groundView.on(`elevation-change`,({extent:e})=>this._ensureElevationTask().addExtent(e)),Wt):t&&this.removeHandles(Wt)},f),this._updatingHandles.add(()=>this._usePBR,e=>this._updatePBR(e)),this._updatingHandles.add(()=>this.rendererTextureUsage,()=>{this._reloadAll(),this.clearMemCache()}),this._updatingHandles.add(()=>this.contentVisible,e=>this._contentVisibleChanged(e),f),this._updatingHandles.add(()=>this.layer.labelsVisible,()=>this._labelingChanged(),f),this._updatingHandles.add(()=>this.layer.labelingInfo,()=>this._labelingChanged(),f),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),f),this.addHandles([p(()=>K.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){let e=this._controller.crsIndex;import(`./support/I3STreeDebugger.js`).then(({I3STreeDebugger:t})=>{!this._treeDebugger&&K.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else!e&&!K.I3S_TREE_SHOW_TILES&&(this._treeDebugger=s(this._treeDebugger))},f),p(()=>K.I3S_SHOW_MODIFICATIONS,()=>this._showModifications(),f)]),this._cacheKeySuffix=this._getCacheKeySuffix(),this._idbCache.init().catch(e=>a.getLogger(this).warn(`Failed to initialize IndexedDB cache: ${e}`));let{view:m}=this,{viewingMode:h,renderCoordsHelper:g}=m;this._planetRadiusInGlobalMode=h===`local`?0:g.referenceEllipsoid.radius}destroy(){this._clearAddTasks(),this._elevationTask=s(this._elevationTask),this.i3sOverrides=s(this.i3sOverrides),this._extractChanges=s(this._extractChanges),this._elevationProvider&&=(this._elevationProvider.notifyObjectsChanged(this.getVisibleObbs()),this.view.elevationProvider.unregister(this._elevationProvider),null),this._intersectionHandler&&=(this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),null);let e=this._workerHandle;e&&(e.destroyContextAndSelf(this.uid),this._workerHandle=null),this._removeAllNodeDataFromStage(),this._memCache=s(this._memCache),this._collection=null,this._stage=null,this._edgeView=null,this._labeler=s(this._labeler),this._treeDebugger=s(this._treeDebugger),this._controller=s(this._controller),this._highlights=s(this._highlights),this._nodeId2Meta.clear(),this._nodeId2MetaReloading.clear(),this._crossfadeHelper=s(this._crossfadeHelper),this.emit(`visible-geometry-changed`),this._visibleGeometryChangedSchedulerHandle&&=(this._visibleGeometryChangedSchedulerHandle.remove(),null),this._updatingHandles=s(this._updatingHandles)}_memEstimateTextureAdded(e){let t=e.usedMemory;return this._gpuMemoryEstimate+=t,this._texMemoryEstimate+=t,t}_memEstimateTextureRemoved(e){if(e!=null){let t=e.usedMemory;this._gpuMemoryEstimate-=t,this._texMemoryEstimate-=t}}_memEstimateGeometryAdded(e){let t=this._collection.getObjectGPUMemoryUsage(e);return this._gpuMemoryEstimate+=t,this._geoMemoryEstimate+=t,t}_memEstimateGeometryRemoved(e){let t=this._collection.getObjectGPUMemoryUsage(e);this._gpuMemoryEstimate-=t,this._geoMemoryEstimate-=t}isNodeLoaded(e){return this._nodeId2Meta.has(e)}isNodeReloading(e){return this._nodeId2MetaReloading.has(e)}get usedMemory(){let e=this._labeler==null?0:this._labeler.usedMemory;return this._nodeId2Meta.forEach(t=>e+=t==null?0:t.node.memory),this._nodeId2MetaReloading.forEach(t=>e+=t==null?0:t.node.memory),e}get unloadedMemory(){return(this._controller==null?0:this._controller.unloadedMemoryEstimate)+(this._labeler==null?0:this._labeler.unloadedMemoryEstimate)}_labelingChanged(){if(!(Le(this.layer)&&this._supportsLabeling)){this._labeler!=null&&(this._labeler.destroy(),this._labeler=null);return}if(this._labeler!=null)return;let e=new Oe({view:this.view,layer:this.layer,collection:this._collection,overrides:this.i3sOverrides,layerViewUid:this.uid});this._nodeId2Meta.forEach(t=>t!=null&&this._addMetaToLabeler(e,t)),this._labeler=e}_loadAsyncModule(e){return++this._asyncModuleLoading,e.then(e=>(--this._asyncModuleLoading,e),e=>{throw--this._asyncModuleLoading,e})}_modificationsChanged(){if(!this._i3sWasmLoaded&&this.hasModifications){this._i3sWasmLoaded=Ae().then(()=>{this._i3sWasmLoaded=!0,this._modificationsChanged(),this.notifyUpdate()},()=>{}),this.notifyUpdate();return}if(this._i3sWasmLoaded!==!0)return;let e=e=>a.getLogger(this).error(`set-modifications-error`,`Error when setting modifications:`,e),t=this.uid,n=this.layer.spatialReference,r=n.isGeographic,i=Fe(this._layerClippingArea,this._modifications,n,this.view.state.isGlobal);this._workerHandle.setModifications(t,i,r).catch(e);try{je({context:t,modifications:i,isGeodetic:r})}catch(t){e(t)}this._controller.modificationsChanged();let o=this.hasModifications?new c:null;this._nodeId2Meta.forEach((e,t)=>{e==null?(this._nodeId2Meta.delete(t),this._controller.updateLoadStatus(t,!1)):e.node.hasModifications?(this._updateFeatureIdCounts(e,-1),this._nodeId2Meta.delete(t),this._nodeId2MetaReloading.set(t,e)):o?.push(e.node)}),this.notifyChange(`elevationRange`),o!=null&&this._nodeId2MetaReloading.forEach(e=>o.push(e.node)),o!=null&&o.length>0&&(this.updateNodeModificationStatus(o),o.forAll(e=>{if(e.imModificationImpact!==2){let t=this._nodeId2Meta.get(e.index);this._controller.invalidateGeometryVisibility(e.index),t==null?this._nodeId2Meta.has(e.index)&&(this._nodeId2Meta.delete(e.index),this._controller.updateLoadStatus(e.index,!1)):(this._updateFeatureIdCounts(t,-1),this._nodeId2Meta.delete(e.index),this._nodeId2MetaReloading.set(e.index,t),this.notifyChange(`elevationRange`))}})),this.clearMemCache(),this._controller.restartNodeLoading(),this._showModifications()}_showModifications(){if(this._modificationGraphics!=null&&(this.view.graphics.removeMany(this._modificationGraphics),this._modificationGraphics=null),!K.I3S_SHOW_MODIFICATIONS||this._modifications.length===0)return;let e={clip:[227,227,79,.8],mask:[227,139,79,.8],replace:[139,227,79,.8]},t={outline:{color:[255,255,255],width:1}};this._modificationGraphics=[];for(let r of this._modifications){let i=r.geometry;i.spatialReference=this.layer.spatialReference;let a=new Ee({...t,color:e[r.type]});this._modificationGraphics.push(new n({geometry:i,symbol:a}))}this.view.graphics.addMany(this._modificationGraphics)}_addMetaToLabeler(e,t){e.addNodeMeta(t,(e,t)=>this._createAttributes(e,t))}_contentVisibleChanged(e){e?(this.view.elevationProvider.register(this._elevationContext,this._elevationProvider),this._stage.view.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler)):(this._removeAllNodeDataFromStage(),this.view.elevationProvider&&this.view.elevationProvider.unregister(this._elevationProvider),this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler))}getLoadedAttributes(e){let t=this._nodeId2Meta.get(e);if(t?.attributeInfo!=null)return t.attributeInfo.loadedAttributes}getAttributeData(e){let t=this._nodeId2Meta.get(e);if(t?.attributeInfo!=null)return t.attributeInfo.attributeData}setAttributeData(e,t){let n=this._nodeId2Meta.get(e);n?.attributeInfo!=null&&(n.attributeInfo.attributeData=t,this._attributeValuesChanged(n))}async updateAttributes(e,t,n){let r=this._nodeId2Meta.get(e);r!=null&&(await this.i3sOverrides.applyAttributeOverrides(r.featureIds,t,n,this._controller.requiredAttributes),r.attributeInfo=t,this._controller.reschedule(()=>{this._nodeId2Meta.get(e)===r&&this._attributeValuesChanged(r)},n).catch(e=>{u(e)||a.getLogger(this).warn(`Error while updating attribute values. Layer might not display correctly.`,e)}))}_attributeValuesChanged(e){e.cachedRendererVersion=this._getInvalidRendererVersion(),e.appliedFilters=null,this._labeler!=null&&this._labeler.setNodeMetaAttributes(e,(e,t)=>this._createAttributes(e,t)),this._updateEngineObject(e)}clearMemCache(){this._memCache!=null&&this._memCache.clear(),this._addTasks.forEach(e=>e.allowMemCache=!1)}getVisibleNodes(){let e=[];return this._nodeId2Meta.forEach(t=>t!=null&&e.push(t.node)),e}getVisibleObbs(){let e=[];return this._nodeId2Meta.forEach(t=>t&&e.push(this._collection.getComponentObb(t.objectHandle))),e}getLoadedNodeIndices(e){this._nodeId2Meta.forEach((t,n)=>e.push(n)),this._nodeId2MetaReloading.forEach((t,n)=>e.push(n))}_getVertexBufferLayout(e,t){return _t(yt(this._getGeometryParameters({hasTexture:It(e.params.material),hasNormals:t.normal,hasRegions:t.uvRegion})))}_getObjectIdField(){return this.layer.objectIdField||L}_getGlobalIdField(){return this.layer.globalIdField}_findGraphicNodeAndIndex(e){let t=G(this.layer.fieldsIndex,e.attributes,this._getObjectIdField());for(let e of this._nodeId2Meta.values()){let n=e?.featureIds.indexOf(t);if(n!=null&&n>=0)return{node:e.node,index:n}}return null}_getGraphicIndices(e,t){let n=this._nodeId2Meta.get(e.index);if(n==null)return[];let r=[],i=this._getObjectIdField(),a=this.layer.fieldsIndex;for(let e of t){let t=G(a,e.attributes,i),o=n.featureIds.indexOf(t);o!==-1&&r.push(o)}return r}whenGraphicBounds(e){let t=this._findGraphicNodeAndIndex(e);if(!t)return Promise.reject();let n=this.getAABB(t.node.index,t.index);return n==null?Promise.reject():Promise.resolve({boundingBox:n,screenSpaceObjects:[]})}getAABBFromIntersectorTarget(e){return e.nodeIndex==null||e.componentIndex==null?null:this.getAABB(e.nodeIndex,e.componentIndex)}getAABB(e,t){let n=this._nodeId2Meta.get(e);if(n?.featureIds==null||t>=n.featureIds.length)return null;let r=n.objectHandle,i=He(t,this._collection,r,P(24),0),a=this.view.renderSpatialReference,o=this.view.spatialReference;return he(i,a,0,i,o,0)?ge(i):null}whenGraphicAttributes(e,t){return tt(this.layer,e,this._getObjectIdField(),t,()=>this._nodeId2Meta.values().filter(i).toArray())}getGraphicFromIntersectorTarget(e,t){if(e.nodeIndex==null||e.componentIndex==null)return null;let n=this._nodeId2Meta.get(e.nodeIndex);if(n?.featureIds==null||e.componentIndex>=n.featureIds.length)return null;let r=this._createLayerGraphic(this._createAttributes(e.componentIndex,n));return r?this._meshUtilsImporterModule?(r.geometry=this._meshUtilsImporterModule.createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),r):t.defer?(t.defer(async()=>(r.geometry=(await this._meshUtilsImporter).createMesh({layerView:this,nodeIndex:e.nodeIndex,featureIndex:e.componentIndex}),r)),null):r:null}_getCacheKey(e){return`${this._layerUrl}/v30/${e}${this._cacheKeySuffix}`}get _meshUtilsImporter(){return this._meshUtilsImporterPromise||(this._meshUtilsImporterPromise=import(`./i3s/meshUtils.js`),this._meshUtilsImporterPromise.then(e=>this._meshUtilsImporterModule=e,()=>{})),this._meshUtilsImporterPromise}_getCacheKeySuffix(){let e=this.view.renderSpatialReference;return e==null?Kt:e===D(e)?qt:this.layer.spatialReference.equals(e)?Gt:e.wkid==null?null:`@${e.wkid}`}_getMemCacheKey(e,t=this.elevationOffset){return e+`#`+t}get _idbCacheEnabled(){return!this._controller.disableIDBCache&&!this.hasModifications&&this.elevationOffset===0&&this._cacheKeySuffix!=null}loadCachedGPUData(e){return this._memCache==null?null:this._memCache.pop(this._getMemCacheKey(e))}deleteCachedGPUData(e){e!=null&&this._deleteComponentObject(e)}_cacheGPUData(e,t=this.elevationOffset){if(this._memCache==null){this._deleteComponentObject(e);return}let n=this._controller.indexDepth-e.node.level;this._memCache.put(this._getMemCacheKey(e.node.index,t),e,n)}loadMissingTextures(e,t,n,r){let i=e?.filter((e,n)=>{if((e.usage&this.rendererTextureUsage)===0)return!1;if(t==null)return!0;let r=Ke(e.encodings,this.supportedTextureEncodings),i=t[n];return!!(i?.data==null||r&&i.encoding!==r.encoding)})??[];return i.length===0?Promise.resolve(!1):n(i,r).then(n=>{let r=0;for(let i=0;i<e.length;i++)r<n.length&&n[r].id===e[i].id&&(t[i]=n[r],r++);return!0})}loadCachedNodeData(e,t,n){return this._idbCacheEnabled?this._idbCache.get(this._getCacheKey(e.id),t).then(r=>r==null?null:(r.globalTrafo=_e(r.globalTrafo),r.nodeVersion===e.version?(this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=J.fromData(r.geometryObbData)),this.loadMissingTextures(r.requiredTextures,r.textureData,n,t).then(n=>(n&&this._idbCache.initialized&&r.textureData!=null&&(r.byteSize=zt(r.transformedGeometry,r.textureData),r.textureData.every(Rt)&&this._indexedDbSizeCheck(e,r)&&this._idbCache.put(this._getCacheKey(e.id),r).catch(t=>a.getLogger(this).warn(`Failed to update node with textures in IndexedDB cache: ${e.id}: ${t}`))),d(t),r))):(this._idbCache.remove(this._getCacheKey(e.id)),null))):Promise.resolve(null)}addNode(e,t,n){return Lt(t)?t.geometryBuffer==null?(this._addNodeMeta(e.index,null),Promise.resolve()):this._addData(e,t.attributeDataInfo,()=>this._transformNode(e,t,n).then(r=>this._safeReschedule(()=>{if(r==null)return e.hasModifications=!1,this._addCachedNodeData(e,null,n);let{obb:i,componentOffsets:o,featureIds:s,anchorIds:c,anchors:l,transformedGeometry:u,geometryMinElevation:d,geometryMaxElevation:f}=r;e.hasModifications=u.hasModifications;let p=_e(r.globalTrafo),m=b(Ht,i.center.x,i.center.y,i.center.z);x(m,m,p);let h=new J(m,[i.extents.x,i.extents.y,i.extents.z],ce(i.orientation.x,i.orientation.y,i.orientation.z,i.orientation.w));this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=h),t.geometryData.componentOffsets=o,s&&(t.geometryData.featureIds=Array.from(s)),t.geometryData.anchorIds=c,t.geometryData.anchors=l;let g={nodeVersion:e.version,geometryData:t.geometryData,requiredTextures:t.requiredTextures,textureData:t.textureData,transformedGeometry:u,globalTrafo:p,geometryObbData:h.data,geometryMinElevation:d,geometryMaxElevation:f,byteSize:zt(u,t.textureData)};if(this._idbCacheEnabled&&this._idbCache.initialized&&this._indexedDbSizeCheck(e,g)){let t=g.textureData==null?null:g.textureData.map(e=>Rt(e)?e:null);this._idbCache.put(this._getCacheKey(e.id),{...g,textureData:t}).catch(t=>a.getLogger(this).warn(`Failed to store node in IndexedDB cache: ${e.id}: ${t}`))}return this._addCachedNodeData(e,g,n)},n))):Promise.reject()}getElevationRange(e){let t=new q,n=this._controller,{index:r}=n;if(!r)return t;let{rootNode:i}=r;if(!i)return t;let a=this._nodeId2Meta,o=n.viewportQueries;return r.traverse(i,n=>{let{childrenLoaded:r}=n;if(r===0)return!1;let i=o.getAndUpdateVisibilityObbInRenderSR(n),s=null;if(i){if(!i.intersectSphereWithMBS(e,i.radius))return!1}else if(s=o.calculateServiceMbsInRenderSRElevationAdjusted(n),s?.isValid&&!e.intersects(s))return!1;let c=a.get(n.index);if(c){let{geometryObbInRenderSR:r}=n;if(!r||r.intersectSphereWithMBS(e)){let e=c.geometryElevationRange;e.elevationRangeValid&&!e.isEmpty&&t.expandElevationRange(e)}}return r-+!!c>0}),t}computeVisibilityObb(e){return nt(e,this.view.renderSpatialReference,this._controller.crsIndex,this.layer.spatialReference,this.elevationOffset,this._modifications,this.view.renderCoordsHelper.sphericalPCPF)}_transformNode(e,t,n){let r=t.geometryData.geometries??[],i=Array(r.length);for(let e=0;e<r.length;++e)i[e]=this._getVertexBufferLayout(r[e],t.geometryDescriptor);let a=this.layer.normalReferenceFrame,o=t.normalReferenceFrame??a??`none`,s=e.serviceMbsInIndexSR,c=this.elevationOffset,l=this._controller.crsIndex,u=this._controller.crsVertex,d=this.view.renderSpatialReference,f=Ze(s,c,o,l,d),p=O(l,u),m=O(u,d);if(p==null||m==null)return Promise.resolve(null);let h={context:this.uid,geometryBuffer:t.geometryBuffer,geometryData:t.geometryData,geometryDescriptor:t.geometryDescriptor,layouts:i,globalTrafo:f,geometryElevationOffset:c,mbs:s.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:c,planetRadiusInGlobalMode:this._planetRadiusInGlobalMode,needNormals:this._controller.isMeshPyramid||this._imVertexNormals,computeNormals:this._isIntegratedMesh&&this._imVertexNormals,normalReferenceFrame:o,indexToVertexProjector:p,vertexToRenderProjector:m};return this._workerHandle.invoke(h,n)}get _supportsNodeCrossFading(){return!this.view?.stage?.renderer.shadowsEnabled}get nodeCrossfadingEnabled(){return this._supportsNodeCrossFading&&(this.lodCrossfadeinDuration>0||this.lodCrossfadeoutDuration>0||this.lodCrossfadeUncoveredDuration>0)}get nodeFadeoutEnabled(){return this._supportsNodeCrossFading&&this.lodCrossfadeoutDuration>0}_setNewNodeOpacity(e){let t=this.nodeCrossfadingEnabled?0:this.fullOpacity;this._setNodeOpacity(e,t)}addCachedGPUData(e,t,n){if(this.elevationInfo.mode===0&&(e.geometryObbInRenderSR=this._collection.getComponentObb(t.objectHandle).clone()),!this._controller.isGeometryVisible(e)){this._cacheGPUData(t);return}let r=e.index;this._addNodeMeta(r,t),this.updateNodeState(r,n),this._collection.setObjectVisibility(t.objectHandle,!0),this._updateElevationOffsets(t),this._labeler!=null&&this._addMetaToLabeler(this._labeler,t),this._updateMaterial(t),this._setNewNodeOpacity(t),this.elevationInfo.mode!==0&&this._ensureElevationTask().schedule(r),this._updateEngineObject(t),this._highlights?.objectCreated(t),this._treeDebugger!=null&&this._treeDebugger.update()}addCachedNodeData(e,t,n,r){return this._addData(e,n,()=>this._addCachedNodeData(e,t,r))}async deleteCachedNodeData(e){if(this._idbCacheEnabled)return this._idbCache.remove(this._getCacheKey(e))}async _addCachedNodeData(e,t,n){if(!this.contentVisible||!this._controller.isGeometryVisible(e)){this._removeNodeStageData(e.index,this.elevationOffset,this._nodeId2MetaReloading);return}if(t==null){this._addNodeMeta(e.index,null);return}let r=this._addTasks.get(e.index),{geometryData:i,transformedGeometry:o}=t;await this.i3sOverrides.applyAttributeOverrides(i.featureIds,r.attributeInfo,n,this._controller.requiredAttributes);let s=t.textureData==null?[]:t.textureData.filter(e=>e!=null&&(e.usage&this.rendererTextureUsage)!==0);e.memory=0;let{componentOffsets:c,geometries:l,featureIds:u,anchorIds:d,anchors:f}=i,p=this._collection,m=l[0],{layout:h,indices:g,interleavedVertexData:_,positionData:v,hasColors:ce}=o,{material:b,geometryParameters:x}=this._materialParameters(m,h),S=_.byteLength/h[0].stride,de=c||new Uint32Array([0,g?g.length:S]),C=m.transformation?oe(m.transformation):se(),T=_e(t.globalTrafo);ie(C,T,C);let E=ae(w(),C),D=y(ne(),C),me=this._isIntegratedMesh?this._imShading?2:0:1,he=x.textureCoordinateType,O=!ee(D,re),A=new bt(h,me,he,+!!O),ge=new xt({interleavedVertexData:_,vertexCount:S,indexData:g},{positions:ve(v.data),indices:ye(v.indices)},de,A),j=this.view.renderSpatialReference,M=this.view.groundView.spatialReference,N=J.fromData(ht(t.geometryObbData)).getCenter(Xt),P=[1,1,1];pe(N,j,P,M)||a.getLogger(this).errorOnce(`Unsupported coordinate system for IM overlay`);let F=w();k(N,j,F,M);let I=ne();te(I,D);let L=w();le(L,ue(L,N,E),I);let be=F[0]-L[0]*P[0],xe=F[1]-L[1]*P[1],Se=x.textureCoordinateType===2,{textures:R,texturePromise:Ce,materialParameters:we}=this._initMaterialAndTextures(b,s,Se,e),z=p.createObject(new vt(fe(be,xe,P[0],P[1]),new Ct(E,D),J.fromData(ht(t.geometryObbData)),ge,has(`enable-feature:im-as-ground`)?!this.layer.isUsedAsGroundLayer:!this._isIntegratedMesh),we);e.memory+=this._memEstimateGeometryAdded(z),e.memory+=R.reduce((e,t)=>e+(t==null?0:this._memEstimateTextureAdded(t)),0);let B=!!b.hasParametersFromSource,Te=b.alphaMode!==`blend`&&b.metallicRoughness.baseColorFactor[3]>=1,V=new Ot(e,u,z,this._getInvalidRendererVersion(),r.attributeInfo,{hasParametersFromSource:B,isOpaque:Te},R,d,f,t.geometryMinElevation,t.geometryMaxElevation);r.meta=V,this._hasTextures||=t.requiredTextures?.some(({usage:e})=>!!(e&19))||!!e.resources.texture,this._hasData=!0,this._hasColors||=ce,this.notifyChange(`hasTexturesOrVertexColors`);let Ee=this.slicePlaneEnabled;return Promise.all([this._addOrUpdateEdgeRendering(V),Ce]).then(([t,r])=>(this._addTasks.has(e.index)&&t?.updateObjectVisibility(V.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.layer.title)),this._safeReschedule(()=>{let n=this._addTasks.get(e.index);if(!n)return;if(this._addNodeMeta(e.index,V),n.meta=null,!this.contentVisible){this._removeNodeStageData(e.index,this.elevationOffset);return}p.setObjectVisibility(z,!0),t?.updateObjectVisibility(V.objectHandle,!0).catch(e=>this._logEdgeViewError(e,this.layer.title)),V.attributeInfo=n.attributeInfo;let r=V.cachedRendererVersion!==this._rendererVersion,i=Ee!==this.slicePlaneEnabled;this._updateElevationOffsets(V);let a=V.elevationOffsets;this._updateComponentData(V);let o=this._applyFiltersToNode(V);(r||t!=null&&(i||o||a))&&this._addOrUpdateEdgeRendering(V).catch(()=>{}),this._labeler!=null&&this._addMetaToLabeler(this._labeler,V),this._visibleGeometryChanged(V,0),this._highlights?.objectCreated(V),this._updateMaterial(V),this._setNewNodeOpacity(V),this._treeDebugger!=null&&this._treeDebugger.update()},n))).catch(e=>{let{meta:t,allowMemCache:n}=r;throw r.meta=null,t&&n?this._cacheGPUData(t):t&&this._deleteComponentObject(t),e})}_addNodeMeta(e,t){if(this._removeNodeStageData(e,this.elevationOffset,this._nodeId2MetaReloading),this._nodeId2Meta.has(e)){a.getLogger(this).error(`Removing duplicated node`);let t=this._nodeId2Meta.get(e);t&&(this._deleteComponentObject(t),this._updateFeatureIdCounts(t,-1))}else this._controller.updateLoadStatus(e,!0);t&&(t.lodCrossfadeProgress=null,this.nodeCrossfadingEnabled&&X(t.cachedEdgeMaterials,0),this._updateFeatureIdCounts(t,1)),this._nodeId2Meta.set(e,t),this.notifyChange(`elevationRange`)}_updateElevationOffsets(e){if(!e.node.serviceMbsInIndexSR)return;let{view:t,elevationInfo:n}=this,r=this._controller.crsIndex,{groundView:i,groundSpatialReference:a,renderSpatialReference:o}=t,s=n.mode;if(s===0){e.elevationAlignmentOffset=n.offset,e.elevationOffsets=null,e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`);return}if(e.elevationAlignmentOffset=0,o==null||a==null){e.elevationOffsets=null,e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`);return}let c=this._collection.getObjectTransform(e.objectHandle);e.elevationOffsets=e.elevationOffsets??[];let l=Ht,u=Ut,d=s===2,f=this.view.renderCoordsHelper,p=e.featureIds.length,m=(()=>{if(e.cachedElevationAnchors)return e.cachedElevationAnchors;let t=P(p*3);e.cachedElevationAnchors=t;let{center:n}=e.node.serviceMbsInIndexSR;for(let i=0;i<p;i++){let s=i*3,d=e.anchorIds?.indexOf(i)??-1;e.anchors&&d>=0?(b(l,e.anchors[d*3],e.anchors[d*3+1],e.anchors[d*3+2]),S(l,l,n),k(l,r,l,o),t[s+2]=f.getAltitude(l),k(l,o,l,a),t[s]=l[0],t[s+1]=l[1]):(this._collection.getComponentAabb(e.objectHandle,i,u,!0),b(l,(u[0]+u[3])/2,(u[1]+u[4])/2,u[2]),le(l,l,c.rotationScale),S(l,l,c.position),t[s+2]=f.getAltitude(l),k(l,o,l,a),t[s]=l[0],t[s+1]=l[1])}return t})(),h=n.offset,g=e.elevationOffsets;i.getElevations(m,p,(e,t)=>{let n=d?m[e*3+2]:0;g[e]=h+(t??0)-n}),e.updateGeometryElevationRange(),this.notifyChange(`elevationRange`)}_ensureElevationTask(){return this._elevationTask??=new ze(this.view.resourceController.scheduler,e=>this._controller.updateElevationChanged(e,this.view.groundView.spatialReference)?.filterInPlace(e=>this._nodeId2Meta.get(e)!=null),e=>this._nodeElevationAlignmentChanged(this._nodeId2Meta.get(e)),()=>this.elevationInfo?.mode),this._elevationTask}_elevationInfoChanged(e,t){let n=e.mode!==0,r=!!t&&t!==e&&t.mode!==0;this._intersectionHandler.updateElevationAlignState(n,this.view.state.viewingMode),n&&!r&&this._controller.removeAllGeometryObbs(),this._nodeId2Meta.forEach(e=>this._nodeElevationAlignmentChanged(e))}_nodeElevationAlignmentChanged(e){e!=null&&(this._updateElevationOffsets(e),this._updateComponentData(e),this._updateEdgeRendering(e),this._labeler!=null&&this._labeler.updateLabelPositions(e),this._updateSnappingSources(e,2),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}_safeReschedule(e,t){return d(t),this._controller.reschedule(e,t)}_materialParameters(e,t){let n=e.params.material==null?qe():e.params.material,r=t.some(({name:e})=>e===`uvRegion`),i=t.some(({name:e})=>e===`normalCompressed`),a=It(n);return{geometryParameters:this._getGeometryParameters({hasTexture:a,hasNormals:i,hasRegions:r}),material:n}}_initMaterialAndTextures(e,t,n,r){let i=this._stage.renderView,a=e=>{this._gpuMemoryEstimate-=e,this._texMemoryEstimate-=e,r.memory-=e},o=t.map(t=>Je(t,e,n,i,this._compressionTracker,a));this._stage.addTextures(o);let{materialParameters:s,texturePromise:c}=Ye(e,o,t,this.view.stage.renderView.textures,{rendererTextureUsage:this.rendererTextureUsage,usePBR:this._usePBR,isIntegratedMesh:this._isIntegratedMesh,isGround:this.layer.isUsedAsGroundLayer,slicePlaneEnabled:this.slicePlaneEnabled,viewSpatialReference:this.view.spatialReference,applySSAO:this._applySSAO});return{textures:o,texturePromise:c,materialParameters:s}}_getGeometryParameters(e){return new St(this._hasVertexColors,e.hasNormals,e.hasTexture?e.hasRegions?2:1:0)}_addData(e,t,n){let r=this._addTasks.get(e.index);if(r)r.attributeInfo=t;else{let i=Promise.withResolvers();r=new Vt(t,null,i.promise),this._addTasks.set(e.index,r),n().then(i.resolve,i.reject).then(()=>this._addTasks.delete(e.index)).catch(t=>{throw this._addTasks.delete(e.index),t})}return r.promise}_clearAddTasks(){this._addTasks.forEach(e=>{e.meta!=null&&(this._cacheGPUData(e.meta),e.meta=null)}),this._addTasks.clear()}_clippingAreaChanged(){let e=this.view.renderSpatialReference,t=this.layer.spatialReference,n=M();this._renderClippingArea=mt(this.view.clippingArea,n,e)?n:null;let r=M();this._layerClippingArea=mt(this.view.clippingArea,r,t)?r:null,this._filterChange(),this._controller&&this._controller.updateClippingArea(this.view.clippingArea),this._isIntegratedMesh&&this._modificationsChanged()}get hasGeometryFilter(){return!1}_geometryFilterChange(){let e=this.hasGeometryFilter;this._controller.geometryFilterChanged(e),this._applyFilters(e),this._assertFeatureIdNodeCounts(e)}_assertFeatureIdNodeCounts(e){e&&!this._featureIdCounts?(this._featureIdCounts=$(this._nodeId2Meta.values()),this._filteredIdCounts=$(this._nodeId2Meta.values(),1),this._weaklyRemovedIdCounts=$(this._nodeId2Meta.values(),2),this.addHandles(p(()=>this._controller.updating,e=>{!e&&this._needFilterResolve&&(this.multiGeometryFilterResolve(),this._needFilterResolve=!1,this.notifyUpdate())},{sync:!0}),`updateFinished`)):!e&&this._featureIdCounts&&(this._featureIdCounts=null,this._filteredIdCounts=null,this._weaklyRemovedIdCounts=null,this._mismatchShow=null,this._mismatchHide=null,this.removeHandles(`updateFinished`),this._needFilterResolve=!1,this.notifyUpdate())}_updateFeatureIdCounts(e,t){this._featureIdCounts&&(this._needFilterResolve=!0,Q(this._featureIdCounts,e.featureIds,t),Q(this._filteredIdCounts,e.filteredIds,t),Q(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,t))}_updateFilteredIdCounts(e,t,n){this._filteredIdCounts&&(this._needFilterResolve=!0,Q(this._filteredIdCounts,t,-1),Q(this._filteredIdCounts,e.filteredIds,1),Q(this._weaklyRemovedIdCounts,n,-1),Q(this._weaklyRemovedIdCounts,e.weaklyRemovedIds,1))}_checkFeatureIdNodeCountInvariant(){let e=this._featureIdCounts!=null;if(this.hasGeometryFilter!==e&&a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`LayerView should have feature id node counts if and only if it has a geometry filter`,{layerView:this,hasNodeCounts:e}),!this._featureIdCounts||!this._filteredIdCounts)return;let t=$(this._nodeId2Meta.values());o(this._featureIdCounts,t)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _featureIdCounts`,{layerView:this,counts:this._featureIdCounts,expected:t});let n=$(this._nodeId2Meta.values(),1);o(this._filteredIdCounts,n)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _filteredIdCounts`,{layerView:this,counts:this._filteredIdCounts,expected:n});let r=$(this._nodeId2Meta.values(),2);o(this._weaklyRemovedIdCounts,r)||a.getLogger(this).error(`checkFeatureIdNodeCountInvariant()`,`Incorrect _weaklyRemovedIdCounts`,{layerView:this,counts:this._weaklyRemovedIdCounts,expected:n})}multiGeometryFilterResolve(){if(!this._featureIdCounts||!this._filteredIdCounts)return;let e=null,t=null;for(let[n,r]of this._filteredIdCounts){let i=this._featureIdCounts.get(n);i!==r&&(r+(this._weaklyRemovedIdCounts?.get(n)??0)===i?(e??=new Set,e.add(n)):(t??=new Set,t.add(n)))}h(e,this._mismatchShow)&&h(t,this._mismatchHide)||(this._mismatchShow=e,this._mismatchHide=t,this._nodeId2Meta.forEach(e=>{if(!e?.filteredIds)return;let t=Yt(e,this._mismatchShow,this._mismatchHide);this._collection.setAllComponentVisibilities(e.objectHandle,t),this._visibleGeometryChanged(e,2)}))}_filterChange(){this._applyFilters(this.hasGeometryFilter)}_applyFilters(e){this._filters=this.getFilters(),e?this._controller&&this._controller.requestUpdate():this._nodeId2Meta.forEach(e=>{e&&this._applyFiltersToNode(e)&&(this._addOrUpdateEdgeRendering(e).catch(()=>{}),this._visibleGeometryChanged(e,2))})}getFilters(){let e=[],t=this._renderClippingArea;return t!=null&&e.push((e,n)=>this._boundingRectFilter(e,n,t)),e}addSqlFilter(e,t,n){if(t!=null){let r=t.fieldNames;e.push((e,i)=>this._sqlFilter(e,i,t,r,n))}}_sqlFilter(e,t,n,r,i){let a={},o=this._createLayerGraphic(a);if(!o)return;let s=this.layer.objectIdField,c=t.featureIds,l=t.attributeInfo?.attributeData;r.every(e=>e===s||l?.[e]!=null)&&rt(e,c,e=>{a[s]=c[e];for(let t of r)t!==s&&(a[t]=l?H(l[t],e):null);try{return n.testFeature(o)}catch(e){return i(e),!1}})}_boundingRectNodeTest(e,t){return me(e.node.serviceMbsInIndexSR,this._controller.crsIndex,Ft,this.view.renderSpatialReference),it(t,Ft)}_boundingRectFeatureTest(e,t,n){return this._collection.getComponentAabb(e.objectHandle,t,At),j(At,jt),N(n,jt)}_boundingRectFilter(e,t,n){let r=this._collection,i=this._boundingRectNodeTest(t,n);if(i===3)return;if(i===0){e.length=0;return}let a=r.getComponentCount(t.objectHandle);if(a.invisible+a.visible!==t.featureIds.length)return;let o=this._transformClippingArea(Mt,n,t.objectHandle);rt(e,t.featureIds,e=>this._boundingRectFeatureTest(t,e,o))}_transformClippingArea(e,t,n){let r=this._collection.getObjectTransform(n),i=r.position,a=r.rotationScale;return e[0]=(t[0]-i[0])/a[0],e[1]=(t[1]-i[1])/a[4],e[2]=(t[2]-i[0])/a[0],e[3]=(t[3]-i[1])/a[4],e}async _addOrUpdateEdgeRendering(e,t=!0){let n=e.objectHandle,{hasEdges:r,perFeatureEdgeMaterials:i}=this._getFilteredEdgeMaterials(e);if(r&&!this._edgeView)try{this._edgeView=await this._stage.renderer.loadEdgeView()}catch(e){if(!u(e))throw e}let a=this._edgeView;if(!a)return null;let o=a.hasObject(n);if(r){if(o)return this.nodeCrossfadingEnabled&&X(i,this.getNodeOpacity(e)),a.updateAllComponentMaterials(n,i,this.slicePlaneEnabled,t).catch(e=>this._logEdgeViewError(e,this.layer.title)),a.updateObjectVisibility(n,!0).catch(e=>this._logEdgeViewError(e,this.layer.title)),a.updateAllVerticalOffsets(n,e.elevationOffsets).catch(e=>this._logEdgeViewError(e,this.layer.title)),a;let r=await this._collection.addEdges(n,a,i,this.slicePlaneEnabled,e.elevationOffsets);return e.edgeMemoryUsage=r,e.node.memory+=r,a}return o&&(e.node.memory-=e.edgeMemoryUsage,e.edgeMemoryUsage=0,a.removeObject(n)),null}_applyFiltersToNode(e){let{filteredIds:t,weaklyRemovedIds:n}=e,r=this._applyFiltersToNodeComponents(e);return this._updateFilteredIdCounts(e,t,n),r&&this._labeler?.applyFilterChange(e),r}_applyFiltersToNodeComponents(e){let t=this._collection,n=t.getComponentCount(e.objectHandle),r=e.filteredIds!=null,i=n.invisible===0;if(t.setAllComponentVisibilities(e.objectHandle,`all`),this._filters.length===0)return e.filteredIds=null,!i;if((e.filteredIds==null||e.appliedFilters!==this._filters)&&(e.weaklyRemovedIds=null,e.filteredIds=Jt(e,this._filters),e.appliedFilters=this._filters),r&&e.filteredIds===e.featureIds&&(!this._mismatchHide||e.filteredIds.every(e=>!this._mismatchHide?.has(e))))return!i;let a=Yt(e,this._mismatchShow,this._mismatchHide);return t.setAllComponentVisibilities(e.objectHandle,a),!0}_removeAllNodeDataFromStage(e=this.elevationOffset){this._nodeId2Meta.forEach((t,n)=>this._removeNodeStageData(n,e)),this._nodeId2MetaReloading.forEach((t,n)=>this._removeNodeStageData(n,e,this._nodeId2MetaReloading)),this._elevationTask=s(this._elevationTask)}removeNode(e){let t=this.elevationOffset;this._removeNodeStageData(e,t),this._removeNodeStageData(e,t,this._nodeId2MetaReloading),this._elevationTask!=null&&this._elevationTask.remove(e)}_removeNodeStageData(e,t,n=this._nodeId2Meta){n.has(e)&&this._controller.updateLoadStatus(e,!1);let r=n.get(e);r==null?n.delete(e):(this._collection.setObjectVisibility(r.objectHandle,!1),this._edgeView!=null&&this._edgeView.hasObject(r.objectHandle)&&this._edgeView.updateObjectVisibility(r.objectHandle,!1).catch(e=>this._logEdgeViewError(e,this.layer.title)),this._visibleGeometryChanged(r,1),this._labeler!=null&&this._labeler.removeNodeMeta(r),n.delete(e),this._highlights?.objectDeleted(r),n===this._nodeId2Meta?(this._updateFeatureIdCounts(r,-1),this._cacheGPUData(r,t),this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopNodeFading(r)):this._deleteComponentObject(r),this._treeDebugger!=null&&this._treeDebugger.update())}_deleteComponentObject(e){if(this._edgeView!=null&&this._edgeView.removeObject(e.objectHandle),this._memEstimateGeometryRemoved(e.objectHandle),this._collection.destroyObject(e.objectHandle),e.textures)for(let t of e.textures)this._memEstimateTextureRemoved(t),this._stage.removeTexture(t)}updateNodeState(e,t){this._nodeId2Meta.get(e)?.objectHandle.updatePolygonOffset(+(t===0))}updateNodeIndex(e,t){if(this._nodeId2Meta.has(e)){let n=this._nodeId2Meta.get(e);this._nodeId2Meta.delete(e),this._nodeId2Meta.set(t,n),this.notifyChange(`elevationRange`)}let n=this._nodeId2MetaReloading.get(e);n&&(this._nodeId2MetaReloading.delete(e),this._nodeId2MetaReloading.set(t,n))}_invalidateAllSymbols(){this._rendererVersion=U(this._rendererVersion,1),this._controller?.requestUpdate()}_getInvalidRendererVersion(){return U(this._rendererVersion,-1)}async _rendererChange(e){if(this._currentRenderer=e,this.notifyChange(`rendererTextureUsage`),this._rendererVersion=U(this._rendererVersion,1),this._rendererFields=null,this._colorVariable=null,this._opacityVariable=null,this._invalidateAllSymbols(),e&&(this._rendererFields=await e.getRequiredFields(this.layer.fieldsIndex)),this._updateSymbologyFields(),!this._arcade&&e&&`arcadeRequired`in e&&e.arcadeRequired&&(this._arcade=await Te()),e&&`visualVariables`in e&&e.visualVariables)for(let t of e.visualVariables)t.type===`color`?this._colorVariable=t:t.type===`opacity`?this._opacityVariable=t:a.getLogger(this).warn(`Unsupported visual variable type for 3D Object Scene Services: ${t.type}`);if(e)for(let t of e.symbols)t.type!==`mesh-3d`&&a.getLogger(this).error(`Symbols of type '${t.type}' are not supported for 3D Object Scene Services.`);this._controller&&this._controller.requestUpdate()}_getCachedEdgeMaterials(e){return this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e),e.cachedEdgeMaterials}_getComponentParameters(e){this._hasComponentData&&e.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(e);let t=e.cachedSymbology;return(n,r)=>{let i=n*e.cachedSymbologyStride;T(r.externalColor,t[i]/255,t[i+1]/255,t[i+2]/255,t[i+3]/255);let a=this._stage.renderView.olidRenderHelper;if(a){let t=e.featureIds[n],i=this.sublayerId?`${this.layerViewUid}_${this.sublayerId}`:this.layerViewUid,o=z(this.view,this.uid);a.setUidToObjectAndLayerId(t,t,this.layerId,i,this.layerPopupEnabledAndHasTemplate&&!o,e.node.resources.attributes,n,this.sublayerId),r.olidColor=a.getObjectAndLayerIdColor({graphicUid:t,layerViewUid:i})}r.externalColorMixMode=t[i+4]&15,r.castShadows=!!(t[i+4]&16),r.pickable=!!(t[i+4]&32),r.elevationOffset=e.elevationOffsets?.[n]??0,r.emissiveStrength=e.emissiveStrengths?.[n]??1,r.emissiveSource=e.emissiveSources?.[n]??0}}_getSymbolInfo(e,t){let n=e?.getSymbol(t,{arcade:this._arcade});if(!(n instanceof V))return null;let r=n.id;if(this._symbolInfos.has(r))return this._symbolInfos.get(r);let i=at(n);return this._symbolInfos.set(r,i),i}_setSymbologyOverride(e,t){this._symbologyOverride!==e&&(this._symbologyOverride=e,this._symbologyOverrideFields=t,this._invalidateAllSymbols(),this._updateSymbologyFields())}_updateSymbologyFields(){this._symbologyFields=this._symbologyOverrideFields!=null&&this._symbologyOverrideFields.length>0?this._rendererFields!=null&&this._rendererFields.length>0?xe(this.layer.fieldsIndex,[...this._rendererFields,...this._symbologyOverrideFields]):this._symbologyOverrideFields:this._rendererFields}_updateCachedRendererData(e){if(e.cachedRendererVersion=this._rendererVersion,!this._hasComponentData)return;let t=this._tmpAttributeOnlyGraphic,n={};t.attributes=n;let r=this._currentRenderer,i=e.attributeInfo?.attributeData,a=e.featureIds?this.layer.objectIdField:null,o=i!=null&&this._symbologyFields!=null&&this._symbologyFields.length>0,s=null,c=null;if(o&&this._symbologyFields!=null){s=[],c=[];for(let e of this._symbologyFields){let t=i[e];t&&(s.push(e),c.push(t))}}e.cachedSymbology||=I(e.featureIds.length*e.cachedSymbologyStride);let l=new ut,u=this.fullOpacity,d=this.nodeCrossfadingEnabled?this.getNodeOpacity(e):u,f=null,p=1,m=W,h=0;for(let i=0;i<e.featureIds.length;i++){if(a!=null&&(n[a]=e.featureIds[i]),o&&s)for(let e=0;e<s.length;e++)n[s[e]]=H(c[e],i);let u=r?this._getSymbolInfo(r,t):null,g,_;if(l.pickable=!0,r&&`visualVariables`in r){if(this._colorVariable){let e=Ce(this._colorVariable,t,{color:Pt,arcade:this._arcade});e&&(g=l.color,g[0]=e.r/255,g[1]=e.g/255,g[2]=e.b/255,g[3]=e.a??1,!this._opacityVariable&&e.a!==null&&(_=e.a))}this._opacityVariable&&(_=we(this._opacityVariable,t,{arcade:this._arcade}))}if(u?.material){let e=u.material;g=g==null||_==null?Ie(g,_,e.color,e.alpha,Dt,l.color):Ie(g,_,null,null,Dt,l.color)}g??=T(l.color,1,1,1,1);let v=u?.material;if(l.colorMixMode=v?.colorMixMode??1,l.edgeMaterial=u?.edgeMaterial,this._symbologyOverride?.(t,l),this._nodeColorOverride!=null&&(this._nodeColorOverride(e.node,g),l.colorMixMode=3),l.pickable&&=g[3]>=Et,l.castShadows=u?u.castShadows:l.pickable,l.edgeMaterial!=null){let t=g[3]>=1&&(e.material.isOpaque||l.colorMixMode===3)?1:0;(l.edgeMaterial!==f||t!==p)&&(m={...l.edgeMaterial,opacity:d,objectTransparency:t},f=l.edgeMaterial,p=t),e.cachedEdgeMaterials[i]=m}else e.cachedEdgeMaterials[i]=W;e.cachedSymbology[h++]=Math.round(g[0]*255),e.cachedSymbology[h++]=Math.round(g[1]*255),e.cachedSymbology[h++]=Math.round(g[2]*255),e.cachedSymbology[h++]=Math.round(g[3]*255),e.cachedSymbology[h++]=l.colorMixMode|l.castShadows<<4|l.pickable<<5;let y=v?.emissive?.strength==null?Y:v?.emissive?.strength;y!==Y&&!e.emissiveStrengths&&(e.emissiveStrengths=Array(e.featureIds.length).fill(Y)),e.emissiveStrengths&&(e.emissiveStrengths[i]=y);let ee=v?.emissive?.source||0;ee!==0&&!e.emissiveSources&&(e.emissiveSources=Array(e.featureIds.length).fill(0)),e.emissiveSources&&(e.emissiveSources[i]=ee)}}_getFilteredEdgeMaterials(e){let t=this._getCachedEdgeMaterials(e);this.nodeCrossfadingEnabled||X(t,this.fullOpacity);let n=e.filteredIds;if(n==null)return{hasEdges:t.some(e=>e!==W),perFeatureEdgeMaterials:t};let r=0,i=!1,a=t.map((t,a)=>e.featureIds[a]===n[r]?(i||=t!==W,r++,t):W);return{hasEdges:i,perFeatureEdgeMaterials:a}}_updateComponentData(e){if(!this._hasComponentData)return;let{objectHandle:t}=e,n=this._getComponentParameters(e);this._collection.setComponentData(t,n),this._stage.renderView.requestRender()}_reloadAll(e=this.elevationOffset){this._removeAllNodeDataFromStage(e),this._controller!=null&&this._controller.restartNodeLoading()}_refreshGroundUsage(){this._intersectionHandler.isGround=has(`enable-feature:im-as-ground`)?this.layer.isUsedAsGroundLayer:this._isIntegratedMesh,this.contentVisible&&(this.view.elevationProvider.unregister(this._elevationProvider),this.view.elevationProvider.register(this._elevationContext,this._elevationProvider)),this._reloadAll(),this.clearMemCache()}_opacityChange(e){this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopAllNodeFading(),this._nodeId2Meta.forEach(t=>{t!=null&&(this._collection.updateObjectOpacity(t.objectHandle,e),X(t.cachedEdgeMaterials,e),this._updateEdgeRendering(t))})}_updateMaterial(e){e.objectHandle.updateMaterial({slicePlaneEnabled:this.slicePlaneEnabled,usePBR:this._usePBR})}_updateEngineObject(e){this._updateComponentData(e),this._applyFiltersToNode(e),this._addOrUpdateEdgeRendering(e).catch(()=>{}),this._visibleGeometryChanged(e,2)}intersect(e,t,n,r){this._intersectionHandler.intersectRay(e,t,n,r,null,!1)}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),this._labeler!=null&&(this._labeler.slicePlaneEnabled=e),this._foreachMeta(t=>{t.objectHandle.updateMaterial({slicePlaneEnabled:e}),this._updateEdgeRendering(t,!1)})}_updatePBR(e){this._foreachMeta(t=>t.objectHandle.updateMaterial({usePBR:e})),this._hasLoadedPBRTextures=!0}_foreachMeta(e){this._nodeId2Meta.forEach(t=>{t!=null&&e(t)})}get _usePBR(){return this._imShading&&this.view.qualitySettings.physicallyBasedRenderingEnabled}_updateEdgeRendering(e,t=!0){this._edgeView!=null&&this._edgeView.hasObject(e.objectHandle)&&this._addOrUpdateEdgeRendering(e,t).catch(()=>{})}_forAllNodes(e){this._nodeId2Meta.forEach(e)}_ignoreClientNodeOverriddenFeatures(e){return this.i3sOverrides.hasGeometryChanges?(t,n,r)=>r.node.index>=0&&this.i3sOverrides.featureHasGeometryChanges(t)?0:e(t,n,r):e}_forAllFeatures(e,t,n){for(let r of this._nodeId2Meta.values())if(r!=null&&!(t&&r.node.serviceMbsInIndexSR&&t(r.node.serviceMbsInIndexSR)===1))switch(n){case 1:this._forAllFeaturesOfNode(r,e);break;case 0:this._forAllVisibleFeaturesOfNode(r,e);break;case 2:this._forAllQueryableFeaturesOfNode(r,e)}}_forAllFeaturesOfNode(e,t){e.featureIds.forEach((n,r)=>t(n,r,e))}_forAllVisibleFeaturesOfNode(e,t){let n=e.featureIds;this._collection.forEachVisibleComponent(e.objectHandle,r=>t(n[r],r,e)===0)}_forAllQueryableFeaturesOfNode(e,t){let n=this._ignoreClientNodeOverriddenFeatures(t);if(this._renderClippingArea==null)return this._forAllFeaturesOfNode(e,n);let r=this._boundingRectNodeTest(e,this._renderClippingArea);if(r===0)return;if(r===3)return this._forAllFeaturesOfNode(e,n);let i=e.featureIds,a=e.objectHandle,o=ot(this._renderClippingArea,this._collection.getObjectTransform(a));for(let t=0;t<i.length;t++)this._boundingRectFeatureTest(e,t,o)&&n(i[t],t,e)}_createAttributes(e,t){let n={};t.featureIds!=null&&(n[this._getObjectIdField()]=t.featureIds[e]);let r=t.attributeInfo?.attributeData;if(r!=null)for(let t of Object.keys(r))n[t]=H(r[t],e);return n}_createGraphic(e,t){return this._createLayerGraphic(this._createAttributes(e,t))}highlight(e,t){let r=dt(e);if(r.length===0)return ft;let i=wt(t),a=r[0]instanceof n?this._featureIdsFromGraphics(r):typeof r[0]==`number`?r:null;if(!a)return ft;let o=this._ensureHighlights(),{set:s,handle:c}=o.acquireSet(i);return o.setFeatureIds(s,a),c}_featureIdsFromGraphics(e){let t=this.layer.fieldsIndex,n=this._getObjectIdField();return e.map(e=>G(t,e.attributes,n))}_ensureHighlights(){return this._highlights??=new Re({collection:this._collection,forAllFeatures:e=>this._forAllFeatures(e,null,1),forAllFeaturesOfNode:(e,t)=>this._forAllFeaturesOfNode(e,t)}),this._highlights}resetHighlights(){this._highlights=s(this._highlights)}_visibleGeometryChanged(e,t){this._elevationProvider&&(this._visibleGeometryChangedSchedulerHandle??=m(()=>{let{node:t}=e,n=t.visibilityObbInRenderSR??t.geometryObbInRenderSR??t.serviceObbInRenderSR;if(n!=null){let e=A();n.toAaBoundingBox(e),this.emit(`visible-geometry-changed`,new De(e))}else this.emit(`visible-geometry-changed`);this._visibleGeometryChangedSchedulerHandle=null}),this._updateSnappingSources(e,t),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e.objectHandle)))}get performanceInfo(){return new ke(this.usedMemory,this._nodeId2Meta.size,Math.round(this._gpuMemoryEstimate/1048576),Math.round(this._geoMemoryEstimate/1048576),Math.round(this._texMemoryEstimate/1048576),Math.round(this.unloadedMemory/1048576),this._idbCacheEnabled?Math.round(this._idbCache.getHitRate()*100):0)}checkInvariants(){}get test(){}getNodeOpacityByIndex(e){let t=this._nodeId2Meta.get(e);return this.getNodeOpacity(t)}getNodeOpacity(e){return e==null?0:this._collection.getObjectOpacity(e.objectHandle)}isNodeFullyFadedIn(e){return this._crossfadeHelper.isNodeFullyFadedIn(e)}getNodeCrossfadeMetaData(e){return this._nodeId2Meta.get(e)}getNodeComponentHandle(e){return this._nodeId2Meta.get(e)?.objectHandle}markNodeToRemove(e){this._controller&&this._controller.markNodeToRemove(e)}removeMarkedNodes(){this._controller&&this._controller.removeMarkedNodes()}foreachCrossfadeNode(e){this._nodeId2Meta.forEach(e)}fadeNode(e,t,n){if(!this.nodeCrossfadingEnabled)return;let r=this._nodeId2Meta.get(e);r!=null&&this._crossfadeHelper.fadeNode(e,r,t,n)}setNodeOpacityByIndex(e,t){let n=this._nodeId2Meta.get(e);n!=null&&this._setNodeOpacity(n,t)}_setNodeOpacity(e,t){this._collection.updateObjectOpacity(e.objectHandle,t),this._setNodeEdgeOpacity(e,t)}_setNodeEdgeOpacity(e,t){if(this._edgeView==null||!e.cachedEdgeMaterials)return;X(e.cachedEdgeMaterials,t);let n=e.objectHandle;this._edgeView.hasObject(n)&&this._edgeView.updateAllComponentOpacities(n,t).catch(e=>this._logEdgeViewError(e,this.layer.title))}get hasModifications(){return this._isIntegratedMesh&&this._layerClippingArea!=null||this._modifications&&this._modifications.length>0}updateNodeModificationStatus(e){let t=e.length;if(!this.hasModifications||t<=0||this._i3sWasmLoaded!==!0)return;let n=this.uid,r=Bt(e);if(r){let t={context:n,buffer:r.buffer};Me(t);let i=new Float64Array(r.buffer);e.forAll((e,t)=>{let n=i[t],r=Ne(n);e.imModificationImpact=r,r!==0&&this._controller.invalidateGeometryVisibility(e.index)})}}notifyUpdate(){this.notifyChange(`updating`)}notifyLODUpdate(){this._controller.notifyLODUpdate()}isUpdating(){return!!(this._controller&&this._controller.updating)||!!this._visibleGeometryChangedSchedulerHandle||this._labeler!=null&&this._labeler.updating||this._crossfadeHelper?.updating||this._i3sWasmLoaded instanceof Promise||this._asyncModuleLoading>0||this._elevationTask!=null&&this._elevationTask.readyToRun||this._needFilterResolve||this._compressionTracker.compressing}trackSnappingSources(e){let t={events:e,fetchEdgeLocations:async(e,t,n)=>{let r=this._nodeId2Meta.get(e);if(r==null)throw Error(`invalid-node`);let{origin:i,buffer:a}=await this._collection.extractEdgeInformation(r.objectHandle,t,n);return this._snappingLocationsApplyElevation(r,a,i),{type:`components`,objectIds:r.featureIds,locations:a,origin:i}},remove:()=>r(this._snappingSourcesTrackers,t)};return this._snappingSourcesTrackers.push(t),this._nodeId2Meta.forEach((t,n)=>{if(t==null)return;let r=this._controller.getRenderMbs(t.node);r&&e.add(n,r)}),t}_snappingLocationsApplyElevation(e,t,n){if(!e.elevationOffsets||this.elevationInfo.mode===0)return;let r=t.position0,i=t.position1,a=t.componentIndex,o=w(),s=w(),c=(e,t)=>{S(e,e,n),this.view.renderCoordsHelper.worldUpAtPosition(e,s),S(e,e,de(s,s,t)),C(e,e,n)};for(let t=0;t<r.count;t++){let n=e.elevationOffsets[a.get(t)];r.getVec(t,o),c(o,n),r.setVec(t,o),i.getVec(t,o),c(o,n),i.setVec(t,o)}}_updateSnappingSources(e,t){let{index:n}=e.node,r=this._controller.getRenderMbs(e.node);if(r!=null)for(let e of this._snappingSourcesTrackers)(t===1||t===2)&&e.events.remove(n),(t===0||t===2)&&e.events.add(n,r)}_logEdgeViewError(e,t){u(e)||a.getLogger(this).warn(`Error while processing edges. Edges on this layer might not display correctly`,t,e)}_indexedDbSizeCheck(e,t){return t.byteSize>0x6400000?(a.getLogger(this).warn(`Node is too big to store in IndexedDB cache: ${e.id} (${t.byteSize} bytes)`),!1):t.byteSize>0}get elevationProvider(){return this._elevationProvider}};return e([_()],F.prototype,`extractChanges`,null),e([_()],F.prototype,`_hasLoadedPBRTextures`,void 0),e([_()],F.prototype,`_asyncModuleLoading`,void 0),e([_()],F.prototype,`_visibleGeometryChangedSchedulerHandle`,void 0),e([_()],F.prototype,`view`,void 0),e([_()],F.prototype,`layer`,void 0),e([_()],F.prototype,`_controller`,void 0),e([_()],F.prototype,`_labeler`,void 0),e([_()],F.prototype,`updating`,void 0),e([_()],F.prototype,`suspended`,void 0),e([_()],F.prototype,`contentVisible`,null),e([_({readOnly:!0})],F.prototype,`legendEnabled`,null),e([_(gt)],F.prototype,`updatingProgress`,void 0),e([_()],F.prototype,`updatingProgressValue`,null),e([_()],F.prototype,`hasTexturesOrVertexColors`,null),e([_()],F.prototype,`rendererTextureUsage`,null),e([_()],F.prototype,`elevationOffset`,null),e([_()],F.prototype,`elevationInfo`,null),e([_({type:Boolean})],F.prototype,`slicePlaneEnabled`,void 0),e([_()],F.prototype,`supportedTextureEncodings`,null),e([_({type:[R]})],F.prototype,`_modifications`,void 0),e([_({readOnly:!0})],F.prototype,`clientGeometry`,null),e([_()],F.prototype,`elevationRange`,null),e([_()],F.prototype,`fullExtent`,null),e([_()],F.prototype,`_elevationTask`,void 0),e([_({readOnly:!0})],F.prototype,`_usePBR`,null),F=e([v(`esri.views.3d.layers.I3SMeshView3D`)],F),F},At=A(),jt=M(),Mt=M(),Nt=new J,Pt=new t([0,0,0,0]),Ft=new F(0,0,0,0);function It(e){if(e==null)return!1;let t=e.metallicRoughness;return t&&t.baseColorTextureId>=0||t&&t.metallicRoughnessTextureId>=0||e.normalTextureId>=0||e.emissiveTextureId>=0||e.occlusionTextureId>=0}function Lt(e){return`geometryData`in e}function Rt(e){return e!=null&&g(e.data)}function zt(e,t){let n=1024+e.interleavedVertexData.byteLength+(e.indices?e.indices.byteLength:0)+e.positionData.data.byteLength+e.positionData.indices.byteLength;if(t!=null)for(let e of t)e!=null&&g(e.data)&&(n+=e.data.byteLength);return n}function Bt(e){if(e.length===0)return;let t=e.length*10,n=new Float64Array(t),r=0;return e.forAll(e=>{let t=e.serviceObbInIndexSR;t??(t=Nt,e.serviceMbsInIndexSR?(t.setCenter(e.serviceMbsInIndexSR.center),t.setHalfSizeFromValues(e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius,e.serviceMbsInIndexSR.radius)):t.invalidate());let i=t.data;n[r++]=i[0],n[r++]=i[1],n[r++]=i[2],n[r++]=i[3],n[r++]=i[4],n[r++]=i[5],n[r++]=i[6],n[r++]=i[7],n[r++]=i[8],n[r++]=i[9]}),n}class Vt{constructor(e,t,n){this.attributeInfo=e,this.meta=t,this.promise=n,this.allowMemCache=!0}}function X(e,t){e.forEach(e=>e.opacity=t)}class Z{constructor(e,t){this.mode=e,this.offset=t}}const Ht=w(),Ut=A(),Wt=`elevation-change`,Gt=``,Kt=`@null`,qt=`@ECEF`;function Jt(e,t){let n=e.featureIds.slice();for(let r of t)if(r(n,e),n.length===0)break;return n.length===e.featureIds.length?e.featureIds:n}function Yt(e,t,n){let r=[],i=e.filteredIds;if(i!=null&&!t?.size&&!n?.size)e.featureIds.forEach((e,t)=>{i[r.length]===e&&r.push(t)});else if(i!=null){let a=0;e.featureIds.forEach((e,o)=>{if(i[a]===e)++a;else if(!t?.has(e))return;n?.has(e)||r.push(o)})}return r}function Q(e,t,n){if(e&&t)for(let r of t){let t=(e.get(r)??0)+n;t>0?e.set(r,t):e.delete(r)}}function $(e,t=0){let n=new Map;for(let r of e)Q(n,t===0?r?.featureIds:t===1?r?.filteredIds:r?.weaklyRemovedIds,1);return n}const Xt=w();export{kt as I3SMeshView3D};