@arcgis/core 4.25.0-next.20221018 → 4.25.0-next.20221021

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 (1368) hide show
  1. package/Basemap.d.ts +1 -1
  2. package/Camera.d.ts +1 -1
  3. package/Color.d.ts +1 -1
  4. package/Graphic.d.ts +1 -1
  5. package/Ground.d.ts +1 -1
  6. package/Map.d.ts +1 -1
  7. package/PopupTemplate.d.ts +1 -1
  8. package/README.md +158 -158
  9. package/TimeExtent.d.ts +1 -1
  10. package/TimeInterval.d.ts +1 -1
  11. package/Viewpoint.d.ts +1 -1
  12. package/WebMap.d.ts +1 -1
  13. package/WebMap.js +1 -1
  14. package/WebScene.d.ts +1 -1
  15. package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
  16. package/analysis/DimensionAnalysis.d.ts +1 -1
  17. package/analysis/DimensionSimpleStyle.d.ts +1 -1
  18. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  19. package/analysis/LengthDimension.d.ts +1 -1
  20. package/analysis/LineOfSightAnalysis.d.ts +1 -1
  21. package/analysis/LineOfSightAnalysisObserver.d.ts +1 -1
  22. package/analysis/LineOfSightAnalysisTarget.d.ts +1 -1
  23. package/analysis/SliceAnalysis.d.ts +1 -1
  24. package/analysis/SlicePlane.d.ts +1 -1
  25. package/applications/SceneViewer/colorUtils.d.ts +1 -1
  26. package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -1
  27. package/arcade.d.ts +1 -1
  28. package/assets/esri/core/libs/libtess/libtess.wasm +0 -0
  29. package/assets/esri/core/workers/RemoteClient.js +1 -1
  30. package/assets/esri/core/workers/chunks/{fc521bcd4fce711edb7e.js → 038dc3f9ef06ef3c960c.js} +1 -1
  31. package/assets/esri/core/workers/chunks/073fdfd01d940c7b1da1.js +1 -0
  32. package/assets/esri/core/workers/chunks/0b0f3e93f658a012d5f0.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5e3686b68e1b5dfa0169.js → 110587dd66c52d0284a9.js} +4 -4
  34. package/assets/esri/core/workers/chunks/{7b7b6f0b1a6215ee7a60.js → 12efe67be9414262591f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{9383dab07abf7e29139e.js → 16a6b4d8c4928c97ef56.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{cd11fcc3d9678ab4e115.js → 19c208150b7f9cf0b6ea.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{6f19761acd9ab875a600.js → 2b0952bd7dbeb1a79fbc.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{7fab18074b130b71a648.js → 2c4938512dd726a177dd.js} +1 -1
  39. package/assets/esri/core/workers/chunks/2d8201f0f33ba66bb96b.js +1 -0
  40. package/assets/esri/core/workers/chunks/2ebba71cbbfa62ddf46a.js +1 -0
  41. package/assets/esri/core/workers/chunks/{de6a1d1cfdc147455d57.js → 2f22105099a3ece58d1d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{8ee3da8677255b8c8709.js → 31de71018575457155e5.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{64a0f93c6a0fd4e14601.js → 3376fbcbd92261d45169.js} +1 -1
  44. package/assets/esri/core/workers/chunks/4450f17444947fe2f27f.js +1 -0
  45. package/assets/esri/core/workers/chunks/5de864843c0d3f4d291d.js +1 -0
  46. package/assets/esri/core/workers/chunks/6dfb2ddfd72009564a34.js +1 -0
  47. package/assets/esri/core/workers/chunks/{d18b191e158c1aff853c.js → 71bc42d18a9e5c356c2a.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{179b9a7aa796dac3eb83.js → 7ba0cfe4d1c214f44fc7.js} +1 -1
  49. package/assets/esri/core/workers/chunks/81139c01e8016cbbe324.js +1 -0
  50. package/assets/esri/core/workers/chunks/883cfe319b15ebabf71e.js +1 -0
  51. package/assets/esri/core/workers/chunks/{c2a6ac7046134f725cf3.js → 8ba83fee56dd4f306d87.js} +1 -1
  52. package/assets/esri/core/workers/chunks/925f53f4ef097c5ce204.js +1 -0
  53. package/assets/esri/core/workers/chunks/{eff5593e534d2a617ca7.js → 942da417257f8fd8e4cf.js} +1 -1
  54. package/assets/esri/core/workers/chunks/97450791de57796f842c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{c9c0dd4d9aaa9b794bd5.js → 9d1faf9358df056be8e7.js} +1 -1
  56. package/assets/esri/core/workers/chunks/9d410721f42259efe666.js +1 -0
  57. package/assets/esri/core/workers/chunks/{b98074a98ebc11ed1e09.js → aa3909ffe65b42c61b52.js} +1 -1
  58. package/assets/esri/core/workers/chunks/af3f30f968363bb3930c.js +1 -0
  59. package/assets/esri/core/workers/chunks/{93e7d34f52bfafa015e1.js → b58badb11e610024ce4c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/b5e6a868256c5aae6d5e.js +1 -0
  61. package/assets/esri/core/workers/chunks/{2307eea4f3b9c0c987f1.js → b9e93d9ea80361716f1d.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{1f31a507c989b2976660.js → c26a24c89ddf5bdad343.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a9b77bea0b8d7a2e5f65.js → c8c0f091aab41e4effa5.js} +1 -1
  64. package/assets/esri/core/workers/chunks/d573ec98401fbae26383.js +1 -0
  65. package/assets/esri/core/workers/chunks/{4641e10e0e8e9d257521.js → f436c86f86236ea7ea04.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{b88c012fa0b0e229a5e3.js → f5b4a8b2bad9b0899954.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{3bcf3bed475f7c49eb7e.js → f787036fa1ed4f53bb00.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{ceb38e7e1aa08e1b141f.js → fa3117bb2e11daac000e.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{77425f33515eb7f0551a.js → fb340c93c114ef090941.js} +1 -1
  70. package/assets/esri/css/main.scss +1 -1
  71. package/assets/esri/css/view.scss +1 -1
  72. package/assets/esri/images/support/loading-throb.gif +0 -0
  73. package/assets/esri/themes/base/_Overlay.scss +14 -14
  74. package/assets/esri/themes/base/_OverlayItem.scss +52 -52
  75. package/assets/esri/themes/base/_Ui.scss +149 -149
  76. package/assets/esri/themes/base/_View.scss +194 -194
  77. package/assets/esri/themes/base/_animation.scss +128 -128
  78. package/assets/esri/themes/base/_color.scss +57 -57
  79. package/assets/esri/themes/base/_colorVariables.scss +1 -1
  80. package/assets/esri/themes/base/_core.scss +172 -172
  81. package/assets/esri/themes/base/_functions.scss +23 -23
  82. package/assets/esri/themes/base/_layout.scss +11 -11
  83. package/assets/esri/themes/base/_mixins.scss +665 -665
  84. package/assets/esri/themes/base/_sizes.scss +130 -130
  85. package/assets/esri/themes/base/_type.scss +27 -27
  86. package/assets/esri/themes/base/colors/css/scss/brand_colors.scss +0 -0
  87. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors.scss +0 -0
  88. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors_dark.scss +0 -0
  89. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors.scss +0 -0
  90. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +0 -0
  91. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors.scss +0 -0
  92. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +0 -0
  93. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors.scss +0 -0
  94. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +0 -0
  95. package/assets/esri/themes/base/colors/css/scss/complete.scss +0 -0
  96. package/assets/esri/themes/base/colors/patterns_json/scss/brand_colors.scss +0 -0
  97. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors.scss +0 -0
  98. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +0 -0
  99. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors.scss +0 -0
  100. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +0 -0
  101. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors.scss +0 -0
  102. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +0 -0
  103. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors.scss +0 -0
  104. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +0 -0
  105. package/assets/esri/themes/base/colors/patterns_json/scss/complete.scss +0 -0
  106. package/assets/esri/themes/base/fonts/fonts/014f2daa-c310-4a36-b9fd-79a8e0c48d44-ext.woff2 +0 -0
  107. package/assets/esri/themes/base/fonts/fonts/014f2daa-c310-4a36-b9fd-79a8e0c48d44-greek.woff2 +0 -0
  108. package/assets/esri/themes/base/fonts/fonts/014f2daa-c310-4a36-b9fd-79a8e0c48d44.woff2 +0 -0
  109. package/assets/esri/themes/base/fonts/fonts/0763eab1-d6ed-4c73-afb0-895f930df099.woff +0 -0
  110. package/assets/esri/themes/base/fonts/fonts/121524c1-8d82-4155-bfb3-fd2f15f09e93.woff +0 -0
  111. package/assets/esri/themes/base/fonts/fonts/12b00842-ec20-4c7f-aa72-802fb00f6cc4-ext.woff +0 -0
  112. package/assets/esri/themes/base/fonts/fonts/12b00842-ec20-4c7f-aa72-802fb00f6cc4-greek.woff +0 -0
  113. package/assets/esri/themes/base/fonts/fonts/12b00842-ec20-4c7f-aa72-802fb00f6cc4.woff +0 -0
  114. package/assets/esri/themes/base/fonts/fonts/13faf0ae-dcab-4d1c-9c08-f9ca339b6023-greek.woff +0 -0
  115. package/assets/esri/themes/base/fonts/fonts/13faf0ae-dcab-4d1c-9c08-f9ca339b6023.woff +0 -0
  116. package/assets/esri/themes/base/fonts/fonts/15e2e15a-2f36-4a01-b529-677d575bf76d.woff2 +0 -0
  117. package/assets/esri/themes/base/fonts/fonts/174d458a-81e0-4174-9473-35e3bf0a613c.woff2 +0 -0
  118. package/assets/esri/themes/base/fonts/fonts/18629a56-2ec3-4470-a65f-f82d7ec4d41b.woff2 +0 -0
  119. package/assets/esri/themes/base/fonts/fonts/1b3078ef-2971-4c95-b6ca-13ab528758cb.woff +0 -0
  120. package/assets/esri/themes/base/fonts/fonts/1fed34fa-250a-4d32-9f1d-42f978a2e0b2.woff2 +0 -0
  121. package/assets/esri/themes/base/fonts/fonts/2200dfff-da50-40b0-bc12-5e4b872a1998.woff2 +0 -0
  122. package/assets/esri/themes/base/fonts/fonts/281f890c-8412-4ee3-84ed-8b5d062d2ab8.woff2 +0 -0
  123. package/assets/esri/themes/base/fonts/fonts/2a1ae9a5-b6b5-405c-b660-bbdf1b356952.woff2 +0 -0
  124. package/assets/esri/themes/base/fonts/fonts/31da4b04-f98a-4b5f-b545-a31d26da99e5.woff2 +0 -0
  125. package/assets/esri/themes/base/fonts/fonts/31e0c094-e345-4a54-a797-d5f1a5885572.woff +0 -0
  126. package/assets/esri/themes/base/fonts/fonts/32a2c5cf-6736-44a6-a276-49ba7e030944.woff2 +0 -0
  127. package/assets/esri/themes/base/fonts/fonts/341bcc5e-7ac0-44ff-819d-5887892eab1b.woff +0 -0
  128. package/assets/esri/themes/base/fonts/fonts/390cea11-2b11-47ac-b3e8-43ded6ae89ee.woff +0 -0
  129. package/assets/esri/themes/base/fonts/fonts/394a711e-3459-44f3-85c7-e99c01e4b55c.woff +0 -0
  130. package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
  131. package/assets/esri/themes/base/fonts/fonts/3d5260a1-e4cd-4567-80ed-69d23c40355f-ext.woff +0 -0
  132. package/assets/esri/themes/base/fonts/fonts/3d5260a1-e4cd-4567-80ed-69d23c40355f-greek.woff +0 -0
  133. package/assets/esri/themes/base/fonts/fonts/3d5260a1-e4cd-4567-80ed-69d23c40355f.woff +0 -0
  134. package/assets/esri/themes/base/fonts/fonts/40d36b4a-60c6-460a-bf43-4c948c23563e.woff2 +0 -0
  135. package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
  136. package/assets/esri/themes/base/fonts/fonts/439a2ded-d7a4-42d4-8660-ef8765fa7486.woff +0 -0
  137. package/assets/esri/themes/base/fonts/fonts/45b78f45-e639-4836-8612-e0892e120f14.woff +0 -0
  138. package/assets/esri/themes/base/fonts/fonts/46947883-147e-48dd-97c2-5a8ca675b998.woff2 +0 -0
  139. package/assets/esri/themes/base/fonts/fonts/4ab86b35-c0c2-42b5-98ad-4b6eba66b197.woff +0 -0
  140. package/assets/esri/themes/base/fonts/fonts/4d1d0d0d-9ea6-4117-901f-8b32ca1ab936.woff +0 -0
  141. package/assets/esri/themes/base/fonts/fonts/4daa2125-53c6-4da8-9614-8a1049eaccc2.woff2 +0 -0
  142. package/assets/esri/themes/base/fonts/fonts/4e4befe6-3f94-41d8-886c-1a6831818c6a.woff2 +0 -0
  143. package/assets/esri/themes/base/fonts/fonts/5729f02e-f6b0-4f35-8ee5-c2cffa65fa76.woff +0 -0
  144. package/assets/esri/themes/base/fonts/fonts/57a79aa3-9b06-4ba7-a9a4-2b766d826ecf.woff +0 -0
  145. package/assets/esri/themes/base/fonts/fonts/61f13f40-3829-413c-b6f5-b11abb272edc.woff +0 -0
  146. package/assets/esri/themes/base/fonts/fonts/6ea5fa46-5311-450b-8744-288a30c55348.woff2 +0 -0
  147. package/assets/esri/themes/base/fonts/fonts/75e2f3b1-1402-4916-8392-4db9ababea7b.woff2 +0 -0
  148. package/assets/esri/themes/base/fonts/fonts/77156710-6a58-4606-b189-b4185e75967b-ext.woff2 +0 -0
  149. package/assets/esri/themes/base/fonts/fonts/77156710-6a58-4606-b189-b4185e75967b-greek.woff2 +0 -0
  150. package/assets/esri/themes/base/fonts/fonts/77156710-6a58-4606-b189-b4185e75967b.woff2 +0 -0
  151. package/assets/esri/themes/base/fonts/fonts/77caabd3-1877-4634-85c8-8e398a093b99-ext.woff2 +0 -0
  152. package/assets/esri/themes/base/fonts/fonts/77caabd3-1877-4634-85c8-8e398a093b99-greek.woff2 +0 -0
  153. package/assets/esri/themes/base/fonts/fonts/77caabd3-1877-4634-85c8-8e398a093b99.woff2 +0 -0
  154. package/assets/esri/themes/base/fonts/fonts/7db1f672-3a8f-4d19-9c49-7f61aed450b5.woff2 +0 -0
  155. package/assets/esri/themes/base/fonts/fonts/89370128-6a74-471d-ba04-fa0b59bc8ed3.woff +0 -0
  156. package/assets/esri/themes/base/fonts/fonts/8a65abc7-6463-4895-b3e6-5e203b80b7e2.woff2 +0 -0
  157. package/assets/esri/themes/base/fonts/fonts/8b01637a-f445-4f10-92ea-b84a355f7690.woff +0 -0
  158. package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
  159. package/assets/esri/themes/base/fonts/fonts/97694c53-4e94-4f9e-969b-a148adfcdcfd.woff2 +0 -0
  160. package/assets/esri/themes/base/fonts/fonts/97b330aa-d7fa-4f85-830f-b11a5041b157.woff +0 -0
  161. package/assets/esri/themes/base/fonts/fonts/9851da0a-2481-4687-bbeb-ed4ab170dc38-ext.woff2 +0 -0
  162. package/assets/esri/themes/base/fonts/fonts/9851da0a-2481-4687-bbeb-ed4ab170dc38.woff2 +0 -0
  163. package/assets/esri/themes/base/fonts/fonts/9c1ab088-0cb0-402f-9cea-170f0fea14a8.woff2 +0 -0
  164. package/assets/esri/themes/base/fonts/fonts/a1049d00-54ad-4589-95b8-d353f7ab52f0-greek.woff2 +0 -0
  165. package/assets/esri/themes/base/fonts/fonts/a1049d00-54ad-4589-95b8-d353f7ab52f0.woff2 +0 -0
  166. package/assets/esri/themes/base/fonts/fonts/a8aeea1b-1a9d-45b7-8ad9-7c71824599e2.woff +0 -0
  167. package/assets/esri/themes/base/fonts/fonts/a9eaf4d3-6427-42df-9306-3ea1270f7b1a.woff2 +0 -0
  168. package/assets/esri/themes/base/fonts/fonts/ae454969-59fb-4d42-aecb-dea30459bc7e.woff +0 -0
  169. package/assets/esri/themes/base/fonts/fonts/b0b84e4d-2164-45c7-a674-1662f19f3ba6-basic.woff2 +0 -0
  170. package/assets/esri/themes/base/fonts/fonts/b0b84e4d-2164-45c7-a674-1662f19f3ba6-ext.woff2 +0 -0
  171. package/assets/esri/themes/base/fonts/fonts/b0b84e4d-2164-45c7-a674-1662f19f3ba6.woff2 +0 -0
  172. package/assets/esri/themes/base/fonts/fonts/b17468ea-cf53-4635-984b-4d930a68ed4d.woff2 +0 -0
  173. package/assets/esri/themes/base/fonts/fonts/bb93c563-55f6-494f-8e1e-448538d95df1.woff +0 -0
  174. package/assets/esri/themes/base/fonts/fonts/c1905e2e-a1cb-49de-9bb0-ce3c5ffc85ae.woff2 +0 -0
  175. package/assets/esri/themes/base/fonts/fonts/c4cc9032-7eee-4a6e-ae8b-f384b1349bcf.woff2 +0 -0
  176. package/assets/esri/themes/base/fonts/fonts/c744f2a2-d6a9-4c18-b0ec-f17376acde3e.woff +0 -0
  177. package/assets/esri/themes/base/fonts/fonts/cebce072-9561-4c6d-8c89-f0cefec63289-ext.woff +0 -0
  178. package/assets/esri/themes/base/fonts/fonts/cebce072-9561-4c6d-8c89-f0cefec63289.woff +0 -0
  179. package/assets/esri/themes/base/fonts/fonts/d4ffabb3-dd7c-472a-bdfb-6700383c6354-ext.woff +0 -0
  180. package/assets/esri/themes/base/fonts/fonts/d4ffabb3-dd7c-472a-bdfb-6700383c6354-greek.woff +0 -0
  181. package/assets/esri/themes/base/fonts/fonts/d4ffabb3-dd7c-472a-bdfb-6700383c6354.woff +0 -0
  182. package/assets/esri/themes/base/fonts/fonts/d824d78b-aab0-44e3-8c56-6c3dcf551952.woff2 +0 -0
  183. package/assets/esri/themes/base/fonts/fonts/d98fb015-7ef6-404f-a58a-5c9242d79770.woff +0 -0
  184. package/assets/esri/themes/base/fonts/fonts/d9e4040d-32ff-4a1c-ac04-927a781da1f5.woff +0 -0
  185. package/assets/esri/themes/base/fonts/fonts/dc10b3bd-5076-4df5-a5f5-e5961f4a6938.woff +0 -0
  186. package/assets/esri/themes/base/fonts/fonts/dd7b7d4e-21ab-4ac0-b26a-d032c992f3c5.woff2 +0 -0
  187. package/assets/esri/themes/base/fonts/fonts/e388ac99-8c6a-4451-8690-1d15b4d45adb-ext.woff +0 -0
  188. package/assets/esri/themes/base/fonts/fonts/e388ac99-8c6a-4451-8690-1d15b4d45adb-greek.woff +0 -0
  189. package/assets/esri/themes/base/fonts/fonts/e388ac99-8c6a-4451-8690-1d15b4d45adb.woff +0 -0
  190. package/assets/esri/themes/base/fonts/fonts/e57662ff-b1ef-4122-88c1-61bbdabeb365.woff +0 -0
  191. package/assets/esri/themes/base/fonts/fonts/e78b17bb-11fb-4860-8d66-4ee0d0c1e117-ext.woff2 +0 -0
  192. package/assets/esri/themes/base/fonts/fonts/e78b17bb-11fb-4860-8d66-4ee0d0c1e117-greek.woff2 +0 -0
  193. package/assets/esri/themes/base/fonts/fonts/e78b17bb-11fb-4860-8d66-4ee0d0c1e117.woff2 +0 -0
  194. package/assets/esri/themes/base/fonts/fonts/e91d1bbf-3fea-45e2-b003-a22b12ce6e5f-basic.woff +0 -0
  195. package/assets/esri/themes/base/fonts/fonts/e91d1bbf-3fea-45e2-b003-a22b12ce6e5f-ext.woff +0 -0
  196. package/assets/esri/themes/base/fonts/fonts/e91d1bbf-3fea-45e2-b003-a22b12ce6e5f.woff +0 -0
  197. package/assets/esri/themes/base/fonts/fonts/f1799750-0952-403f-8108-b2402eed0f62.woff +0 -0
  198. package/assets/esri/themes/base/fonts/fonts/f4a085c3-1c64-4fc0-a598-26f3e658c2b0.woff +0 -0
  199. package/assets/esri/themes/base/fonts/fonts/fa71df11-7b19-4baf-8ff7-3537dea718f0.woff +0 -0
  200. package/assets/esri/themes/base/icons/style.css +0 -0
  201. package/assets/esri/themes/base/icons/style.scss +0 -0
  202. package/assets/esri/themes/base/icons/variables.scss +0 -0
  203. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  204. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  205. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  206. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  207. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  208. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  209. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  210. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  211. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  212. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  213. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  214. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  215. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  216. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  217. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  218. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  219. package/assets/esri/themes/base/widgets/_AreaMeasurement2D.scss +14 -14
  220. package/assets/esri/themes/base/widgets/_AreaMeasurement3D.scss +14 -14
  221. package/assets/esri/themes/base/widgets/_Attachments.scss +286 -286
  222. package/assets/esri/themes/base/widgets/_Attribution.scss +57 -57
  223. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +173 -173
  224. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +490 -490
  225. package/assets/esri/themes/base/widgets/_BasemapToggle.scss +123 -123
  226. package/assets/esri/themes/base/widgets/_BinaryColorSizeSlider.scss +7 -7
  227. package/assets/esri/themes/base/widgets/_Bookmarks.scss +349 -349
  228. package/assets/esri/themes/base/widgets/_BuildingDisciplinesTree.scss +151 -151
  229. package/assets/esri/themes/base/widgets/_BuildingExplorer.scss +51 -51
  230. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +253 -253
  231. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +92 -92
  232. package/assets/esri/themes/base/widgets/_ButtonMenu.scss +129 -129
  233. package/assets/esri/themes/base/widgets/_ClassedColorSlider.scss +7 -7
  234. package/assets/esri/themes/base/widgets/_ClassedSizeSlider.scss +7 -7
  235. package/assets/esri/themes/base/widgets/_ColorPicker.scss +70 -70
  236. package/assets/esri/themes/base/widgets/_ColorSizeSlider.scss +7 -7
  237. package/assets/esri/themes/base/widgets/_ColorSlider.scss +7 -7
  238. package/assets/esri/themes/base/widgets/_Compass.scss +16 -16
  239. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +236 -238
  240. package/assets/esri/themes/base/widgets/_DatePicker.scss +169 -169
  241. package/assets/esri/themes/base/widgets/_Daylight.scss +270 -270
  242. package/assets/esri/themes/base/widgets/_DirectLineMeasurement3D.scss +7 -7
  243. package/assets/esri/themes/base/widgets/_Directions.scss +471 -471
  244. package/assets/esri/themes/base/widgets/_DistanceMeasurement2D.scss +7 -7
  245. package/assets/esri/themes/base/widgets/_Editor.scss +260 -255
  246. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +439 -439
  247. package/assets/esri/themes/base/widgets/_Expand.scss +264 -264
  248. package/assets/esri/themes/base/widgets/_Feature.scss +93 -92
  249. package/assets/esri/themes/base/widgets/_FeatureContent.scss +97 -97
  250. package/assets/esri/themes/base/widgets/_FeatureForm.scss +236 -216
  251. package/assets/esri/themes/base/widgets/_FeatureMedia.scss +86 -86
  252. package/assets/esri/themes/base/widgets/_FeatureTable.scss +247 -247
  253. package/assets/esri/themes/base/widgets/_FeatureTemplates.scss +44 -44
  254. package/assets/esri/themes/base/widgets/_FloorFilter.scss +480 -480
  255. package/assets/esri/themes/base/widgets/_Grid.scss +71 -71
  256. package/assets/esri/themes/base/widgets/_HeatmapSlider.scss +7 -7
  257. package/assets/esri/themes/base/widgets/_Histogram.scss +56 -56
  258. package/assets/esri/themes/base/widgets/_HistogramRangeSlider.scss +105 -105
  259. package/assets/esri/themes/base/widgets/_IdentityForm.scss +22 -22
  260. package/assets/esri/themes/base/widgets/_IdentityModal.scss +105 -105
  261. package/assets/esri/themes/base/widgets/_ItemList.scss +143 -143
  262. package/assets/esri/themes/base/widgets/_LayerList.scss +413 -413
  263. package/assets/esri/themes/base/widgets/_Legend.scss +551 -551
  264. package/assets/esri/themes/base/widgets/_LineOfSight.scss +41 -41
  265. package/assets/esri/themes/base/widgets/_Measurement.scss +6 -6
  266. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +99 -99
  267. package/assets/esri/themes/base/widgets/_OpacitySlider.scss +7 -7
  268. package/assets/esri/themes/base/widgets/_Popup.scss +748 -745
  269. package/assets/esri/themes/base/widgets/_Print.scss +269 -269
  270. package/assets/esri/themes/base/widgets/_SaveLayer.scss +40 -40
  271. package/assets/esri/themes/base/widgets/_ScaleBar.scss +160 -160
  272. package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +211 -211
  273. package/assets/esri/themes/base/widgets/_Search.scss +193 -193
  274. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +34 -34
  275. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +18 -18
  276. package/assets/esri/themes/base/widgets/_ShadowCast.scss +202 -202
  277. package/assets/esri/themes/base/widgets/_SizeSlider.scss +7 -7
  278. package/assets/esri/themes/base/widgets/_Sketch.scss +151 -151
  279. package/assets/esri/themes/base/widgets/_Slice.scss +80 -80
  280. package/assets/esri/themes/base/widgets/_Slider.scss +367 -367
  281. package/assets/esri/themes/base/widgets/_SnappingControls.scss +143 -143
  282. package/assets/esri/themes/base/widgets/_Spinner.scss +76 -76
  283. package/assets/esri/themes/base/widgets/_Swipe.scss +105 -105
  284. package/assets/esri/themes/base/widgets/_TableList.scss +299 -299
  285. package/assets/esri/themes/base/widgets/_TimePicker.scss +15 -15
  286. package/assets/esri/themes/base/widgets/_TimeSlider.scss +404 -404
  287. package/assets/esri/themes/base/widgets/_Tooltip.scss +61 -61
  288. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +47 -47
  289. package/assets/esri/themes/base/widgets/_Weather.scss +59 -59
  290. package/assets/esri/themes/base/widgets/_Widget.scss +688 -688
  291. package/assets/esri/themes/base/widgets/_Zoom.scss +45 -45
  292. package/assets/esri/themes/dark/main.css +1 -1
  293. package/assets/esri/themes/dark/main.scss +34 -34
  294. package/assets/esri/themes/light/main.css +1 -1
  295. package/assets/esri/themes/light/main.scss +9 -9
  296. package/assets/esri/themes/light/view.css +1 -1
  297. package/assets/esri/themes/light/view.scss +9 -9
  298. package/assets/esri/views/3d/analysis/Slice/images/heading-rotate.svg +4 -4
  299. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.svg +80 -80
  300. package/assets/esri/views/3d/webgl-engine/lib/intersectorUtils.svg +117 -117
  301. package/assets/esri/views/magnifier/mask.ts.svg +5 -5
  302. package/assets/esri/views/magnifier/overlay.ts.svg +36 -36
  303. package/chunks/Laserlines.glsl.js +5 -5
  304. package/chunks/LineMarker.glsl.js +32 -38
  305. package/chunks/Precipitation.glsl.js +1 -1
  306. package/chunks/RibbonLine.glsl.js +53 -53
  307. package/chunks/ShadowHighlight.glsl.js +1 -1
  308. package/chunks/boundedPlane.js +1 -1
  309. package/chunks/cameraUtilsPlanar.js +1 -1
  310. package/chunks/cameraUtilsSpherical.js +1 -1
  311. package/chunks/mat3.js +1 -1
  312. package/chunks/quat.js +1 -1
  313. package/chunks/quat2.js +1 -1
  314. package/chunks/quatf64.js +1 -1
  315. package/chunks/sphere.js +1 -1
  316. package/chunks/vec3.js +1 -1
  317. package/chunks/vec3f32.js +1 -1
  318. package/chunks/vec4f64.js +1 -1
  319. package/config.d.ts +1 -1
  320. package/copyright.txt +1278 -1278
  321. package/core/Accessor.d.ts +1 -1
  322. package/core/Accessor.js +1 -1
  323. package/core/Collection.d.ts +1 -1
  324. package/core/Error.d.ts +1 -1
  325. package/core/Evented.d.ts +1 -1
  326. package/core/HandleOwner.d.ts +1 -1
  327. package/core/Handles.d.ts +1 -1
  328. package/core/Identifiable.d.ts +1 -1
  329. package/core/JSONSupport.d.ts +1 -1
  330. package/core/Loadable.d.ts +1 -1
  331. package/core/Promise.d.ts +1 -1
  332. package/core/VectorStack.js +1 -1
  333. package/core/accessorSupport/decorators.d.ts +1 -1
  334. package/core/lang.d.ts +1 -1
  335. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  336. package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
  337. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  338. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  339. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  340. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  341. package/core/perspectiveUtils.js +1 -1
  342. package/core/promiseUtils.d.ts +1 -1
  343. package/core/quantity.d.ts +1 -1
  344. package/core/reactiveUtils.d.ts +1 -1
  345. package/core/scheduling.d.ts +1 -1
  346. package/core/sql/WhereClause.d.ts +1 -1
  347. package/core/sql.d.ts +1 -1
  348. package/core/units.d.ts +1 -1
  349. package/core/urlUtils.d.ts +1 -1
  350. package/core/watchUtils.d.ts +1 -1
  351. package/core/workers/Connection.d.ts +1 -1
  352. package/core/workers.d.ts +1 -1
  353. package/form/ExpressionInfo.d.ts +1 -1
  354. package/form/FormTemplate.d.ts +1 -1
  355. package/form/elements/Element.d.ts +1 -1
  356. package/form/elements/FieldElement.d.ts +1 -1
  357. package/form/elements/GroupElement.d.ts +1 -1
  358. package/form/elements/inputs/BarcodeScannerInput.d.ts +1 -1
  359. package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
  360. package/form/elements/inputs/DateTimePickerInput.d.ts +1 -1
  361. package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
  362. package/form/elements/inputs/SwitchInput.d.ts +1 -1
  363. package/form/elements/inputs/TextAreaInput.d.ts +1 -1
  364. package/form/elements/inputs/TextBoxInput.d.ts +1 -1
  365. package/form/elements/inputs/TextInput.d.ts +1 -1
  366. package/form/elements/support/inputs.d.ts +1 -1
  367. package/form/support/elements.d.ts +1 -1
  368. package/geohash/GeohashTree.js +1 -1
  369. package/geometry/Circle.d.ts +1 -1
  370. package/geometry/Extent.d.ts +1 -1
  371. package/geometry/Geometry.d.ts +1 -1
  372. package/geometry/HeightModelInfo.d.ts +1 -1
  373. package/geometry/Mesh.d.ts +1 -1
  374. package/geometry/Multipoint.d.ts +1 -1
  375. package/geometry/Point.d.ts +1 -1
  376. package/geometry/Polygon.d.ts +1 -1
  377. package/geometry/Polyline.d.ts +1 -1
  378. package/geometry/SpatialReference.d.ts +1 -1
  379. package/geometry/coordinateFormatter.d.ts +1 -1
  380. package/geometry/geometryEngine.d.ts +1 -1
  381. package/geometry/geometryEngineAsync.d.ts +1 -1
  382. package/geometry/projection.d.ts +1 -1
  383. package/geometry/support/GeographicTransformation.d.ts +1 -1
  384. package/geometry/support/GeographicTransformationStep.d.ts +1 -1
  385. package/geometry/support/MeshComponent.d.ts +1 -1
  386. package/geometry/support/MeshMaterial.d.ts +1 -1
  387. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  388. package/geometry/support/MeshTexture.d.ts +1 -1
  389. package/geometry/support/MeshTransform.js +1 -1
  390. package/geometry/support/axisAngle.js +1 -1
  391. package/geometry/support/axisAngleDegrees.js +1 -1
  392. package/geometry/support/geodesicUtils.d.ts +1 -1
  393. package/geometry/support/jsonUtils.d.ts +1 -1
  394. package/geometry/support/lineSegment.js +1 -1
  395. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  396. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  397. package/geometry/support/meshUtils/georeference.js +1 -1
  398. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  399. package/geometry/support/meshUtils/projection.js +1 -1
  400. package/geometry/support/meshUtils/rotate.js +1 -1
  401. package/geometry/support/meshUtils.d.ts +1 -1
  402. package/geometry/support/normalizeUtils.d.ts +1 -1
  403. package/geometry/support/plane.js +1 -1
  404. package/geometry/support/webMercatorUtils.d.ts +1 -1
  405. package/geometry.d.ts +1 -1
  406. package/identity/Credential.d.ts +1 -1
  407. package/identity/IdentityManager.d.ts +1 -1
  408. package/identity/OAuthInfo.d.ts +1 -1
  409. package/identity/ServerInfo.d.ts +1 -1
  410. package/interfaces.d.ts +768 -706
  411. package/intl.d.ts +1 -1
  412. package/kernel.d.ts +1 -1
  413. package/layers/BaseDynamicLayer.d.ts +1 -1
  414. package/layers/BaseElevationLayer.d.ts +1 -1
  415. package/layers/BaseTileLayer.d.ts +1 -1
  416. package/layers/BingMapsLayer.d.ts +1 -1
  417. package/layers/BuildingSceneLayer.d.ts +1 -1
  418. package/layers/CSVLayer.d.ts +1 -1
  419. package/layers/DimensionLayer.d.ts +1 -1
  420. package/layers/ElevationLayer.d.ts +1 -1
  421. package/layers/FeatureLayer.d.ts +1 -1
  422. package/layers/GeoJSONLayer.d.ts +1 -1
  423. package/layers/GeoRSSLayer.d.ts +1 -1
  424. package/layers/GraphicsLayer.d.ts +1 -1
  425. package/layers/GroupLayer.d.ts +1 -1
  426. package/layers/ImageryLayer.d.ts +1 -1
  427. package/layers/ImageryTileLayer.d.ts +1 -1
  428. package/layers/IntegratedMeshLayer.d.ts +1 -1
  429. package/layers/KMLLayer.d.ts +1 -1
  430. package/layers/Layer.d.ts +1 -1
  431. package/layers/LineOfSightLayer.d.ts +1 -1
  432. package/layers/MapImageLayer.d.ts +1 -1
  433. package/layers/MapNotesLayer.d.ts +1 -1
  434. package/layers/MapNotesLayer.js +1 -1
  435. package/layers/MediaLayer.d.ts +1 -1
  436. package/layers/OGCFeatureLayer.d.ts +1 -1
  437. package/layers/OpenStreetMapLayer.d.ts +1 -1
  438. package/layers/PointCloudLayer.d.ts +1 -1
  439. package/layers/RouteLayer.d.ts +1 -1
  440. package/layers/SceneLayer.d.ts +1 -1
  441. package/layers/StreamLayer.d.ts +1 -1
  442. package/layers/SubtypeGroupLayer.d.ts +1 -1
  443. package/layers/TileLayer.d.ts +1 -1
  444. package/layers/UnknownLayer.d.ts +1 -1
  445. package/layers/UnsupportedLayer.d.ts +1 -1
  446. package/layers/VectorTileLayer.d.ts +1 -1
  447. package/layers/VoxelLayer.d.ts +1 -1
  448. package/layers/WCSLayer.d.ts +1 -1
  449. package/layers/WFSLayer.d.ts +1 -1
  450. package/layers/WMSLayer.d.ts +1 -1
  451. package/layers/WMTSLayer.d.ts +1 -1
  452. package/layers/WebTileLayer.d.ts +1 -1
  453. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
  454. package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
  455. package/layers/buildingSublayers/BuildingSublayer.d.ts +1 -1
  456. package/layers/graphics/data/SnappingCandidate.js +1 -1
  457. package/layers/mixins/APIKeyMixin.d.ts +1 -1
  458. package/layers/mixins/ArcGISCachedService.d.ts +1 -1
  459. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  460. package/layers/mixins/ArcGISImageService.js +1 -1
  461. package/layers/mixins/ArcGISMapService.d.ts +1 -1
  462. package/layers/mixins/BlendLayer.d.ts +1 -1
  463. package/layers/mixins/CustomParametersMixin.d.ts +1 -1
  464. package/layers/mixins/FeatureEffectLayer.d.ts +1 -1
  465. package/layers/mixins/FeatureLayerBase.d.ts +4 -0
  466. package/layers/mixins/FeatureReductionLayer.d.ts +1 -1
  467. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  468. package/layers/mixins/ImageryTileMixin.js +1 -1
  469. package/layers/mixins/OrderedLayer.d.ts +1 -1
  470. package/layers/mixins/PortalLayer.d.ts +1 -1
  471. package/layers/mixins/PublishableLayer.d.ts +1 -1
  472. package/layers/mixins/RefreshableLayer.d.ts +1 -1
  473. package/layers/mixins/ScaleRangeLayer.d.ts +1 -1
  474. package/layers/mixins/SceneService.d.ts +1 -1
  475. package/layers/mixins/SublayersOwner.d.ts +1 -1
  476. package/layers/mixins/TemporalLayer.d.ts +1 -1
  477. package/layers/ogc/wfsUtils.d.ts +1 -1
  478. package/layers/pointCloudFilters/PointCloudFilter.d.ts +1 -1
  479. package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
  480. package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
  481. package/layers/support/AggregateField.d.ts +1 -1
  482. package/layers/support/BuildingFilter.d.ts +1 -1
  483. package/layers/support/BuildingSummaryStatistics.d.ts +1 -1
  484. package/layers/support/CodedValueDomain.d.ts +1 -1
  485. package/layers/support/ControlPointsGeoreference.d.ts +1 -1
  486. package/layers/support/CornersGeoreference.d.ts +1 -1
  487. package/layers/support/DimensionalDefinition.d.ts +1 -1
  488. package/layers/support/Domain.d.ts +1 -1
  489. package/layers/support/ElevationSampler.d.ts +1 -1
  490. package/layers/support/ExpressionInfo.d.ts +1 -1
  491. package/layers/support/ExtentAndRotationGeoreference.d.ts +1 -1
  492. package/layers/support/FacilityLayerInfo.d.ts +1 -1
  493. package/layers/support/FeatureEffect.d.ts +1 -1
  494. package/layers/support/FeatureFilter.d.ts +1 -1
  495. package/layers/support/FeatureReductionBinning.d.ts +1 -1
  496. package/layers/support/FeatureReductionCluster.d.ts +1 -1
  497. package/layers/support/FeatureReductionSelection.d.ts +1 -1
  498. package/layers/support/FeatureTemplate.d.ts +1 -1
  499. package/layers/support/FeatureType.d.ts +1 -1
  500. package/layers/support/Field.d.ts +1 -1
  501. package/layers/support/FieldsIndex.d.ts +1 -1
  502. package/layers/support/GeometryFieldsInfo.d.ts +1 -1
  503. package/layers/support/ImageElement.d.ts +1 -1
  504. package/layers/support/ImageParameters.d.ts +1 -1
  505. package/layers/support/InheritedDomain.d.ts +1 -1
  506. package/layers/support/KMLSublayer.d.ts +1 -1
  507. package/layers/support/LOD.d.ts +1 -1
  508. package/layers/support/LabelClass.d.ts +1 -1
  509. package/layers/support/LayerFloorInfo.d.ts +1 -1
  510. package/layers/support/LevelLayerInfo.d.ts +1 -1
  511. package/layers/support/LocalMediaElementSource.d.ts +1 -1
  512. package/layers/support/MapImage.d.ts +1 -1
  513. package/layers/support/MediaElementBase.d.ts +1 -1
  514. package/layers/support/MosaicRule.d.ts +1 -1
  515. package/layers/support/MultidimensionalSubset.d.ts +4 -0
  516. package/layers/support/MultidimensionalSubset.js +1 -1
  517. package/layers/support/PixelBlock.d.ts +1 -1
  518. package/layers/support/PublishingInfo.d.ts +1 -1
  519. package/layers/support/RangeDomain.d.ts +1 -1
  520. package/layers/support/RasterFunction.d.ts +1 -1
  521. package/layers/support/RasterInfo.d.ts +1 -1
  522. package/layers/support/Relationship.d.ts +1 -1
  523. package/layers/support/RouteStopSymbols.d.ts +1 -1
  524. package/layers/support/RouteSymbols.d.ts +1 -1
  525. package/layers/support/SceneFilter.d.ts +1 -1
  526. package/layers/support/SceneModification.d.ts +1 -1
  527. package/layers/support/SceneModifications.d.ts +1 -1
  528. package/layers/support/SiteLayerInfo.d.ts +1 -1
  529. package/layers/support/StreamConnection.d.ts +1 -1
  530. package/layers/support/Sublayer.d.ts +1 -1
  531. package/layers/support/SubtypeSublayer.d.ts +1 -1
  532. package/layers/support/TileInfo.d.ts +1 -1
  533. package/layers/support/TileMatrixSet.d.ts +1 -1
  534. package/layers/support/TimeInfo.d.ts +1 -1
  535. package/layers/support/TimeReference.d.ts +1 -1
  536. package/layers/support/VideoElement.d.ts +1 -1
  537. package/layers/support/VoxelVariable.d.ts +1 -1
  538. package/layers/support/VoxelVolumeStyle.d.ts +1 -1
  539. package/layers/support/WMSSublayer.d.ts +1 -1
  540. package/layers/support/WMTSStyle.d.ts +1 -1
  541. package/layers/support/WMTSSublayer.d.ts +1 -1
  542. package/layers/support/arcadeUtils.d.ts +1 -1
  543. package/layers/support/fieldUtils.d.ts +1 -1
  544. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  545. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  546. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  547. package/layers/support/wmtsUtils.js +1 -1
  548. package/layers/voxel/VoxelDynamicSection.d.ts +1 -1
  549. package/layers/voxel/VoxelSlice.d.ts +1 -1
  550. package/layers/voxel/VoxelTransferFunctionStyle.d.ts +1 -1
  551. package/layers/voxel/VoxelVariable.d.ts +1 -1
  552. package/layers/voxel/VoxelVariableStyle.d.ts +1 -1
  553. package/layers/voxel/VoxelVolume.d.ts +1 -1
  554. package/layers/voxel/VoxelVolume.js +1 -1
  555. package/layers/voxel/VoxelVolumeStyle.d.ts +1 -1
  556. package/layers/voxel/voxelPlaneUtils.js +1 -1
  557. package/networks/Network.d.ts +1 -1
  558. package/networks/Network.js +1 -1
  559. package/networks/UtilityNetwork.d.ts +1 -1
  560. package/networks/support/NamedTraceConfiguration.d.ts +1 -1
  561. package/networks/support/NetworkSystemLayers.d.ts +1 -1
  562. package/networks/support/Terminal.d.ts +1 -1
  563. package/networks/support/TerminalConfiguration.d.ts +1 -1
  564. package/networks/support/TraceConfiguration.d.ts +1 -1
  565. package/networks/support/UNTraceConfiguration.d.ts +1 -1
  566. package/networks/support/utils.js +1 -1
  567. package/package.json +1 -1
  568. package/pointCloudRenderers.d.ts +1 -1
  569. package/popup/ElementExpressionInfo.d.ts +1 -1
  570. package/popup/ExpressionInfo.d.ts +1 -1
  571. package/popup/FieldInfo.d.ts +1 -1
  572. package/popup/LayerOptions.d.ts +1 -1
  573. package/popup/RelatedRecordsInfo.d.ts +1 -1
  574. package/popup/content/AttachmentsContent.d.ts +1 -1
  575. package/popup/content/BarChartMediaInfo.d.ts +1 -1
  576. package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
  577. package/popup/content/Content.d.ts +1 -1
  578. package/popup/content/CustomContent.d.ts +1 -1
  579. package/popup/content/ExpressionContent.d.ts +1 -1
  580. package/popup/content/FieldsContent.d.ts +1 -1
  581. package/popup/content/ImageMediaInfo.d.ts +1 -1
  582. package/popup/content/LineChartMediaInfo.d.ts +1 -1
  583. package/popup/content/MediaContent.d.ts +1 -1
  584. package/popup/content/PieChartMediaInfo.d.ts +1 -1
  585. package/popup/content/RelationshipContent.d.ts +1 -1
  586. package/popup/content/TextContent.d.ts +1 -1
  587. package/popup/content/mixins/ChartMediaInfo.d.ts +1 -1
  588. package/popup/content/mixins/MediaInfo.d.ts +1 -1
  589. package/popup/content/support/ChartMediaInfoValue.d.ts +1 -1
  590. package/popup/content/support/ChartMediaInfoValueSeries.d.ts +1 -1
  591. package/popup/content/support/ImageMediaInfoValue.d.ts +1 -1
  592. package/popup/content.d.ts +1 -1
  593. package/popup/support/FieldInfoFormat.d.ts +1 -1
  594. package/popup/support/RelatedRecordsInfoFieldOrder.d.ts +1 -1
  595. package/portal/Portal.d.ts +1 -1
  596. package/portal/PortalFolder.d.ts +1 -1
  597. package/portal/PortalGroup.d.ts +1 -1
  598. package/portal/PortalItem.d.ts +1 -1
  599. package/portal/PortalItemResource.d.ts +1 -1
  600. package/portal/PortalQueryParams.d.ts +1 -1
  601. package/portal/PortalQueryResult.d.ts +1 -1
  602. package/portal/PortalRating.d.ts +1 -1
  603. package/portal/PortalUser.d.ts +1 -1
  604. package/portal/schemas/definitions.js +1 -1
  605. package/rasterRenderers.d.ts +1 -1
  606. package/renderers/ClassBreaksRenderer.d.ts +1 -1
  607. package/renderers/DictionaryRenderer.d.ts +1 -1
  608. package/renderers/DotDensityRenderer.d.ts +1 -1
  609. package/renderers/FlowRenderer.d.ts +1 -1
  610. package/renderers/HeatmapRenderer.d.ts +1 -1
  611. package/renderers/PieChartRenderer.d.ts +1 -1
  612. package/renderers/PointCloudClassBreaksRenderer.d.ts +1 -1
  613. package/renderers/PointCloudRGBRenderer.d.ts +1 -1
  614. package/renderers/PointCloudRenderer.d.ts +1 -1
  615. package/renderers/PointCloudStretchRenderer.d.ts +1 -1
  616. package/renderers/PointCloudUniqueValueRenderer.d.ts +1 -1
  617. package/renderers/RasterColormapRenderer.d.ts +1 -1
  618. package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
  619. package/renderers/RasterStretchRenderer.d.ts +1 -1
  620. package/renderers/Renderer.d.ts +1 -1
  621. package/renderers/SimpleRenderer.d.ts +1 -1
  622. package/renderers/UniqueValueRenderer.d.ts +1 -1
  623. package/renderers/UniqueValueRenderer.js +1 -1
  624. package/renderers/VectorFieldRenderer.d.ts +1 -1
  625. package/renderers/mixins/VisualVariablesMixin.d.ts +1 -1
  626. package/renderers/support/AttributeColorInfo.d.ts +1 -1
  627. package/renderers/support/AuthoringInfo.d.ts +1 -1
  628. package/renderers/support/AuthoringInfoVisualVariable.d.ts +1 -1
  629. package/renderers/support/ClassBreakInfo.d.ts +1 -1
  630. package/renderers/support/ColormapInfo.d.ts +1 -1
  631. package/renderers/support/HeatmapColorStop.d.ts +1 -1
  632. package/renderers/support/UniqueValue.d.ts +1 -1
  633. package/renderers/support/UniqueValueClass.d.ts +1 -1
  634. package/renderers/support/UniqueValueClass.js +1 -1
  635. package/renderers/support/UniqueValueGroup.d.ts +1 -1
  636. package/renderers/support/UniqueValueInfo.d.ts +1 -1
  637. package/renderers/support/jsonUtils.d.ts +1 -1
  638. package/renderers/visualVariables/ColorVariable.d.ts +1 -1
  639. package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
  640. package/renderers/visualVariables/RotationVariable.d.ts +1 -1
  641. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  642. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  643. package/renderers/visualVariables/support/ColorSizeStop.d.ts +1 -1
  644. package/renderers/visualVariables/support/ColorStop.d.ts +1 -1
  645. package/renderers/visualVariables/support/OpacityStop.d.ts +1 -1
  646. package/renderers/visualVariables/support/SizeStop.d.ts +1 -1
  647. package/renderers.d.ts +1 -1
  648. package/request.d.ts +1 -1
  649. package/rest/closestFacility.d.ts +1 -1
  650. package/rest/find.d.ts +1 -1
  651. package/rest/geometryService.d.ts +1 -1
  652. package/rest/geoprocessor/GPOptions.d.ts +1 -1
  653. package/rest/geoprocessor.d.ts +1 -1
  654. package/rest/identify.d.ts +1 -1
  655. package/rest/imageService.d.ts +1 -1
  656. package/rest/knowledgeGraph/DataModel.d.ts +1 -1
  657. package/rest/knowledgeGraph/Entity.d.ts +1 -1
  658. package/rest/knowledgeGraph/EntityType.d.ts +1 -1
  659. package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
  660. package/rest/knowledgeGraph/GraphApplyEdits.d.ts +1 -1
  661. package/rest/knowledgeGraph/GraphApplyEditsResult.d.ts +1 -1
  662. package/rest/knowledgeGraph/GraphNamedObject.d.ts +1 -1
  663. package/rest/knowledgeGraph/GraphObject.d.ts +1 -1
  664. package/rest/knowledgeGraph/GraphObjectType.d.ts +1 -1
  665. package/rest/knowledgeGraph/GraphProperty.d.ts +1 -1
  666. package/rest/knowledgeGraph/GraphQuery.d.ts +1 -1
  667. package/rest/knowledgeGraph/GraphQueryResult.d.ts +1 -1
  668. package/rest/knowledgeGraph/GraphQueryStreaming.d.ts +1 -1
  669. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +1 -1
  670. package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
  671. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
  672. package/rest/knowledgeGraph/InputQuantizationParameters.d.ts +1 -1
  673. package/rest/knowledgeGraph/KnowledgeGraph.d.ts +1 -1
  674. package/rest/knowledgeGraph/OutputQuantizationParameters.d.ts +1 -1
  675. package/rest/knowledgeGraph/Path.d.ts +1 -1
  676. package/rest/knowledgeGraph/Relationship.d.ts +1 -1
  677. package/rest/knowledgeGraph/RelationshipType.d.ts +1 -1
  678. package/rest/knowledgeGraphService.d.ts +1 -1
  679. package/rest/locator.d.ts +1 -1
  680. package/rest/networkService.d.ts +1 -1
  681. package/rest/networks/support/AggregatedGeometry.d.ts +1 -1
  682. package/rest/networks/support/Association.d.ts +1 -1
  683. package/rest/networks/support/AssociationGeometriesResult.d.ts +1 -1
  684. package/rest/networks/support/FunctionResult.d.ts +1 -1
  685. package/rest/networks/support/NetworkElement.d.ts +1 -1
  686. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +1 -1
  687. package/rest/networks/support/TraceLocation.d.ts +1 -1
  688. package/rest/networks/support/TraceParameters.d.ts +1 -1
  689. package/rest/networks/support/TraceResult.d.ts +1 -1
  690. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -1
  691. package/rest/networks/trace.d.ts +1 -1
  692. package/rest/print.d.ts +1 -1
  693. package/rest/print.js +1 -1
  694. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  695. package/rest/query.d.ts +1 -1
  696. package/rest/route.d.ts +1 -1
  697. package/rest/serviceArea.d.ts +1 -1
  698. package/rest/support/AddressCandidate.d.ts +1 -1
  699. package/rest/support/AlgorithmicColorRamp.d.ts +1 -1
  700. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  701. package/rest/support/AttachmentQuery.d.ts +1 -1
  702. package/rest/support/BufferParameters.d.ts +1 -1
  703. package/rest/support/ClosestFacilityParameters.d.ts +1 -1
  704. package/rest/support/ClosestFacilitySolveResult.d.ts +1 -1
  705. package/rest/support/ColorRamp.d.ts +1 -1
  706. package/rest/support/DataFile.d.ts +1 -1
  707. package/rest/support/DataLayer.d.ts +1 -1
  708. package/rest/support/DensifyParameters.d.ts +1 -1
  709. package/rest/support/DirectionLine.d.ts +1 -1
  710. package/rest/support/DirectionLine.js +1 -1
  711. package/rest/support/DirectionPoint.d.ts +1 -1
  712. package/rest/support/DirectionPoint.js +1 -1
  713. package/rest/support/DirectionsEvent.d.ts +1 -1
  714. package/rest/support/DirectionsFeature.d.ts +1 -1
  715. package/rest/support/DirectionsFeatureSet.d.ts +1 -1
  716. package/rest/support/DistanceParameters.d.ts +1 -1
  717. package/rest/support/FeatureSet.d.ts +1 -1
  718. package/rest/support/FindParameters.d.ts +1 -1
  719. package/rest/support/FindResult.d.ts +1 -1
  720. package/rest/support/GPMessage.d.ts +1 -1
  721. package/rest/support/GeneralizeParameters.d.ts +1 -1
  722. package/rest/support/IdentifyParameters.d.ts +1 -1
  723. package/rest/support/IdentifyResult.d.ts +1 -1
  724. package/rest/support/ImageAngleParameters.d.ts +1 -1
  725. package/rest/support/ImageAngleResult.d.ts +1 -1
  726. package/rest/support/ImageHistogramParameters.d.ts +1 -1
  727. package/rest/support/ImageIdentifyParameters.d.ts +1 -1
  728. package/rest/support/ImageIdentifyResult.d.ts +1 -1
  729. package/rest/support/ImageParameters.d.ts +1 -1
  730. package/rest/support/ImagePixelLocationParameters.d.ts +1 -1
  731. package/rest/support/ImagePixelLocationResult.d.ts +1 -1
  732. package/rest/support/ImageSample.d.ts +1 -1
  733. package/rest/support/ImageSampleParameters.d.ts +1 -1
  734. package/rest/support/ImageSampleResult.d.ts +1 -1
  735. package/rest/support/JobInfo.d.ts +1 -1
  736. package/rest/support/LegendLayer.d.ts +1 -1
  737. package/rest/support/LengthsParameters.d.ts +1 -1
  738. package/rest/support/LinearUnit.d.ts +1 -1
  739. package/rest/support/MultipartColorRamp.d.ts +1 -1
  740. package/rest/support/NAMessage.d.ts +1 -1
  741. package/rest/support/NetworkFeatureSet.d.ts +1 -1
  742. package/rest/support/NetworkUrl.d.ts +1 -1
  743. package/rest/support/OffsetParameters.d.ts +1 -1
  744. package/rest/support/ParameterValue.d.ts +1 -1
  745. package/rest/support/PointBarrier.d.ts +1 -1
  746. package/rest/support/PointBarrier.js +1 -1
  747. package/rest/support/PolygonBarrier.d.ts +1 -1
  748. package/rest/support/PolygonBarrier.js +1 -1
  749. package/rest/support/PolylineBarrier.d.ts +1 -1
  750. package/rest/support/PolylineBarrier.js +1 -1
  751. package/rest/support/PrintParameters.d.ts +1 -1
  752. package/rest/support/PrintTemplate.d.ts +1 -1
  753. package/rest/support/ProjectParameters.d.ts +1 -1
  754. package/rest/support/Query.d.ts +1 -1
  755. package/rest/support/RasterData.d.ts +1 -1
  756. package/rest/support/RelationParameters.d.ts +1 -1
  757. package/rest/support/RelationshipQuery.d.ts +1 -1
  758. package/rest/support/RouteInfo.d.ts +1 -1
  759. package/rest/support/RouteInfo.js +1 -1
  760. package/rest/support/RouteParameters.d.ts +1 -1
  761. package/rest/support/RouteResult.d.ts +1 -1
  762. package/rest/support/RouteSolveResult.d.ts +1 -1
  763. package/rest/support/ServiceAreaParameters.d.ts +1 -1
  764. package/rest/support/ServiceAreaSolveResult.d.ts +1 -1
  765. package/rest/support/StatisticDefinition.d.ts +1 -1
  766. package/rest/support/Stop.d.ts +1 -1
  767. package/rest/support/Stop.js +1 -1
  768. package/rest/support/TopFeaturesQuery.d.ts +1 -1
  769. package/rest/support/TopFilter.d.ts +1 -1
  770. package/rest/support/TravelMode.d.ts +1 -1
  771. package/rest/support/TrimExtendParameters.d.ts +1 -1
  772. package/rest/symbolService.d.ts +1 -1
  773. package/smartMapping/heuristics/outline.js +1 -1
  774. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  775. package/smartMapping/heuristics/scaleRange.js +1 -1
  776. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  777. package/smartMapping/heuristics/sizeRange.js +1 -1
  778. package/smartMapping/labels/clusters.d.ts +1 -1
  779. package/smartMapping/popup/clusters.d.ts +1 -1
  780. package/smartMapping/popup/templates.d.ts +1 -1
  781. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  782. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  783. package/smartMapping/raster/renderers/flow.d.ts +1 -1
  784. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  785. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -1
  786. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  787. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -1
  788. package/smartMapping/raster/renderers/vectorField.d.ts +1 -1
  789. package/smartMapping/raster/support/utils.d.ts +1 -1
  790. package/smartMapping/renderers/color.d.ts +1 -1
  791. package/smartMapping/renderers/color.js +1 -1
  792. package/smartMapping/renderers/dotDensity.d.ts +1 -1
  793. package/smartMapping/renderers/dotDensity.js +1 -1
  794. package/smartMapping/renderers/heatmap.d.ts +1 -1
  795. package/smartMapping/renderers/location.d.ts +1 -1
  796. package/smartMapping/renderers/location.js +1 -1
  797. package/smartMapping/renderers/opacity.d.ts +1 -1
  798. package/smartMapping/renderers/opacity.js +1 -1
  799. package/smartMapping/renderers/pieChart.d.ts +1 -1
  800. package/smartMapping/renderers/pieChart.js +1 -1
  801. package/smartMapping/renderers/predominance.d.ts +1 -1
  802. package/smartMapping/renderers/predominance.js +1 -1
  803. package/smartMapping/renderers/relationship.d.ts +1 -1
  804. package/smartMapping/renderers/relationship.js +1 -1
  805. package/smartMapping/renderers/size.d.ts +1 -1
  806. package/smartMapping/renderers/size.js +1 -1
  807. package/smartMapping/renderers/support/utils.js +1 -1
  808. package/smartMapping/renderers/type.d.ts +1 -1
  809. package/smartMapping/renderers/type.js +1 -1
  810. package/smartMapping/renderers/univariateColorSize.d.ts +1 -1
  811. package/smartMapping/renderers/univariateColorSize.js +1 -1
  812. package/smartMapping/statistics/classBreaks.d.ts +1 -1
  813. package/smartMapping/statistics/classBreaks.js +1 -1
  814. package/smartMapping/statistics/heatmapStatistics.d.ts +1 -1
  815. package/smartMapping/statistics/histogram.d.ts +1 -1
  816. package/smartMapping/statistics/histogram.js +1 -1
  817. package/smartMapping/statistics/predominantCategories.d.ts +1 -1
  818. package/smartMapping/statistics/predominantCategories.js +1 -1
  819. package/smartMapping/statistics/summaryStatistics.d.ts +1 -1
  820. package/smartMapping/statistics/summaryStatistics.js +1 -1
  821. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  822. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  823. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  824. package/smartMapping/statistics/support/predominanceUtils.d.ts +1 -1
  825. package/smartMapping/statistics/uniqueValues.d.ts +1 -1
  826. package/smartMapping/statistics/uniqueValues.js +1 -1
  827. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  828. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +5 -0
  829. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  830. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  831. package/smartMapping/support/adapters/support/utils.js +1 -1
  832. package/smartMapping/support/binningUtils.js +1 -1
  833. package/smartMapping/symbology/color.d.ts +1 -1
  834. package/smartMapping/symbology/dotDensity.d.ts +1 -1
  835. package/smartMapping/symbology/flow.d.ts +1 -1
  836. package/smartMapping/symbology/heatmap.d.ts +1 -1
  837. package/smartMapping/symbology/location.d.ts +1 -1
  838. package/smartMapping/symbology/pieChart.d.ts +1 -1
  839. package/smartMapping/symbology/predominance.d.ts +1 -1
  840. package/smartMapping/symbology/relationship.d.ts +1 -1
  841. package/smartMapping/symbology/size.d.ts +1 -1
  842. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  843. package/smartMapping/symbology/type.d.ts +1 -1
  844. package/support/LayersMixin.d.ts +1 -1
  845. package/support/MapFloorInfo.d.ts +1 -1
  846. package/support/TablesMixin.d.ts +1 -1
  847. package/support/actions/ActionBase.d.ts +1 -1
  848. package/support/actions/ActionButton.d.ts +1 -1
  849. package/support/actions/ActionToggle.d.ts +1 -1
  850. package/support/popupUtils.d.ts +1 -1
  851. package/support/revision.js +1 -1
  852. package/support/timeUtils.d.ts +1 -1
  853. package/symbols/CIMSymbol.d.ts +1 -1
  854. package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
  855. package/symbols/FillSymbol.d.ts +1 -1
  856. package/symbols/FillSymbol3DLayer.d.ts +1 -1
  857. package/symbols/Font.d.ts +1 -1
  858. package/symbols/IconSymbol3DLayer.d.ts +1 -1
  859. package/symbols/LabelSymbol3D.d.ts +1 -1
  860. package/symbols/LineStyleMarker3D.d.ts +1 -1
  861. package/symbols/LineSymbol.d.ts +1 -1
  862. package/symbols/LineSymbol3D.d.ts +1 -1
  863. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  864. package/symbols/LineSymbolMarker.d.ts +1 -1
  865. package/symbols/MarkerSymbol.d.ts +1 -1
  866. package/symbols/MeshSymbol3D.d.ts +1 -1
  867. package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
  868. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  869. package/symbols/PictureFillSymbol.d.ts +1 -1
  870. package/symbols/PictureMarkerSymbol.d.ts +1 -1
  871. package/symbols/PointSymbol3D.d.ts +1 -1
  872. package/symbols/PolygonSymbol3D.d.ts +1 -1
  873. package/symbols/SimpleFillSymbol.d.ts +1 -1
  874. package/symbols/SimpleLineSymbol.d.ts +1 -1
  875. package/symbols/SimpleMarkerSymbol.d.ts +1 -1
  876. package/symbols/Symbol.d.ts +1 -1
  877. package/symbols/Symbol3D.d.ts +1 -1
  878. package/symbols/Symbol3DLayer.d.ts +1 -1
  879. package/symbols/TextSymbol.d.ts +1 -1
  880. package/symbols/TextSymbol3DLayer.d.ts +1 -1
  881. package/symbols/WaterSymbol3DLayer.d.ts +1 -1
  882. package/symbols/WebStyleSymbol.d.ts +1 -1
  883. package/symbols/callouts/Callout3D.d.ts +1 -1
  884. package/symbols/callouts/LineCallout3D.d.ts +1 -1
  885. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  886. package/symbols/edges/Edges3D.d.ts +1 -1
  887. package/symbols/edges/SketchEdges3D.d.ts +1 -1
  888. package/symbols/edges/SolidEdges3D.d.ts +1 -1
  889. package/symbols/patterns/LineStylePattern3D.d.ts +1 -1
  890. package/symbols/patterns/StylePattern3D.d.ts +1 -1
  891. package/symbols/support/StyleOrigin.d.ts +1 -1
  892. package/symbols/support/Symbol3DVerticalOffset.d.ts +1 -1
  893. package/symbols/support/cimSymbolUtils.d.ts +1 -1
  894. package/symbols/support/jsonUtils.d.ts +1 -1
  895. package/symbols/support/previewCIMSymbol.js +1 -1
  896. package/symbols/support/previewSymbol2D.js +1 -1
  897. package/symbols/support/symbolUtils.d.ts +1 -1
  898. package/symbols/support/symbolUtils.js +1 -1
  899. package/symbols.d.ts +1 -1
  900. package/views/2d/LabelManager.js +1 -1
  901. package/views/2d/ViewState.d.ts +1 -1
  902. package/views/2d/ViewState.js +1 -1
  903. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  904. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  905. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  906. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  907. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  908. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  909. package/views/2d/engine/webgl/Painter.js +1 -1
  910. package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
  911. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  912. package/views/2d/engine/webgl/WGLTile.js +1 -1
  913. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  914. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  915. package/views/2d/layers/BaseLayerView2D.d.ts +1 -1
  916. package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
  917. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  918. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  919. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  920. package/views/2d/layers/support/DebugOverlay.js +1 -1
  921. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  922. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  923. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -1
  924. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  925. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  926. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  927. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  928. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  929. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  930. package/views/3d/analysis/Dimension/settings.js +1 -1
  931. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +1 -1
  932. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  933. package/views/3d/analysis/LineOfSightAnalysisResult.d.ts +1 -1
  934. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +1 -1
  935. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  936. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  937. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  938. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  939. package/views/3d/analysis/SliceAnalysisView3D.d.ts +1 -1
  940. package/views/3d/camera/constraintUtils/distance.js +1 -1
  941. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  942. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  943. package/views/3d/environment/CloudsCompositionParameters.js +1 -1
  944. package/views/3d/environment/CloudyWeather.d.ts +1 -1
  945. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  946. package/views/3d/environment/FoggyWeather.d.ts +1 -1
  947. package/views/3d/environment/RainyWeather.d.ts +1 -1
  948. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  949. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  950. package/views/3d/environment/SnowyWeather.d.ts +1 -1
  951. package/views/3d/environment/SunLighting.d.ts +1 -1
  952. package/views/3d/environment/SunnyWeather.d.ts +1 -1
  953. package/views/3d/environment/VirtualLighting.d.ts +1 -1
  954. package/views/3d/externalRenderers.d.ts +1 -1
  955. package/views/3d/glTF/internal/Resource.js +1 -1
  956. package/views/3d/interactive/Manipulator3D.js +1 -1
  957. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  958. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  959. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  960. package/views/3d/interactive/editingTools/settings.js +1 -1
  961. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  962. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  963. package/views/3d/interactive/manipulatorUtils.js +1 -1
  964. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  965. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  966. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  967. package/views/3d/layers/I3SMeshView3D.js +1 -1
  968. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  969. package/views/3d/layers/PointCloudWorker.js +1 -1
  970. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  971. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  972. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  973. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  974. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  975. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  976. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  977. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  978. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  979. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  980. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  981. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  982. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  983. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  984. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  985. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  986. package/views/3d/layers/support/edgeUtils.js +1 -1
  987. package/views/3d/layers/support/uvUtils.js +1 -1
  988. package/views/3d/state/Frustum.js +1 -1
  989. package/views/3d/state/ViewStateManager.js +1 -1
  990. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  991. package/views/3d/state/controllers/RotateController.js +1 -1
  992. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  993. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  994. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  995. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  996. package/views/3d/state/utils/navigationUtils.js +1 -1
  997. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  998. package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
  999. package/views/3d/support/SceneViewPerformanceInfo.d.ts +1 -1
  1000. package/views/3d/support/orientedBoundingBox.js +1 -1
  1001. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  1002. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  1003. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  1004. package/views/3d/support/sunUtils.js +1 -1
  1005. package/views/3d/terrain/PatchRenderData.js +1 -1
  1006. package/views/3d/terrain/TerrainSurface.js +1 -1
  1007. package/views/3d/terrain/Tile.js +1 -1
  1008. package/views/3d/terrain/TileRenderer.js +1 -1
  1009. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  1010. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  1011. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  1012. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  1013. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +1 -1
  1014. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +22 -0
  1015. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  1016. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  1017. package/views/3d/webgl-engine/lib/GeometryRecord.js +1 -1
  1018. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  1019. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  1020. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  1021. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  1022. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  1023. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  1024. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  1025. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  1026. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  1027. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  1028. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  1029. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  1030. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  1031. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  1032. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  1033. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  1034. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  1035. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  1036. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  1037. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  1038. package/views/3d/webgl-engine/parts/Model.js +1 -1
  1039. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  1040. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  1041. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  1042. package/views/BasemapView.d.ts +1 -1
  1043. package/views/BreakpointsOwner.d.ts +1 -1
  1044. package/views/DOMContainer.d.ts +1 -1
  1045. package/views/GroundView.d.ts +1 -1
  1046. package/views/Magnifier.d.ts +1 -1
  1047. package/views/MapView.d.ts +1 -1
  1048. package/views/MapView.js +1 -1
  1049. package/views/SceneView.d.ts +1 -1
  1050. package/views/ToolViewManager.js +1 -1
  1051. package/views/View.d.ts +1 -1
  1052. package/views/ViewAnimation.d.ts +1 -1
  1053. package/views/analysis/DimensionAnalysisView.d.ts +1 -1
  1054. package/views/analysis/LengthDimensionResult.d.ts +1 -1
  1055. package/views/draw/Draw.d.ts +1 -1
  1056. package/views/draw/Draw.js +1 -1
  1057. package/views/draw/DrawAction.d.ts +1 -1
  1058. package/views/draw/DrawGraphicTool.js +1 -1
  1059. package/views/draw/DrawOperation.js +1 -1
  1060. package/views/draw/MultipointDrawAction.d.ts +1 -1
  1061. package/views/draw/MultipointDrawAction.js +1 -1
  1062. package/views/draw/PointDrawAction.d.ts +1 -1
  1063. package/views/draw/PolygonDrawAction.d.ts +1 -1
  1064. package/views/draw/PolylineDrawAction.d.ts +1 -1
  1065. package/views/draw/SegmentDrawAction.d.ts +1 -1
  1066. package/views/draw/drawSurfaces.js +1 -1
  1067. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  1068. package/views/input/Input.d.ts +1 -1
  1069. package/views/input/gamepad/GamepadInputDevice.d.ts +1 -1
  1070. package/views/input/gamepad/GamepadSettings.d.ts +1 -1
  1071. package/views/interactive/coordinateHelper.js +1 -1
  1072. package/views/interactive/dragEventPipeline.js +1 -1
  1073. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  1074. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  1075. package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
  1076. package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
  1077. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  1078. package/views/interactive/snapping/FeatureSnappingLayerSource.d.ts +1 -1
  1079. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  1080. package/views/interactive/snapping/SnappingConstraint.js +1 -1
  1081. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  1082. package/views/interactive/snapping/SnappingOperation.js +1 -1
  1083. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  1084. package/views/interactive/snapping/candidates/DrapedEdgeSnappingCandidate.js +5 -0
  1085. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  1086. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  1087. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  1088. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  1089. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  1090. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  1091. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  1092. package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
  1093. package/views/interactive/snapping/snappingUtils.js +1 -1
  1094. package/views/interactive/tooltip/DrawTooltipInfos.js +1 -1
  1095. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  1096. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  1097. package/views/layers/BuildingComponentSublayerView.d.ts +1 -1
  1098. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  1099. package/views/layers/CSVLayerView.d.ts +1 -1
  1100. package/views/layers/DimensionLayerView.d.ts +1 -1
  1101. package/views/layers/FeatureLayerView.d.ts +1 -1
  1102. package/views/layers/GeoJSONLayerView.d.ts +1 -1
  1103. package/views/layers/GeoRSSLayerView.d.ts +1 -1
  1104. package/views/layers/GraphicsLayerView.d.ts +1 -1
  1105. package/views/layers/ImageryLayerView.d.ts +1 -1
  1106. package/views/layers/KMLLayerView.d.ts +1 -1
  1107. package/views/layers/LayerView.d.ts +1 -1
  1108. package/views/layers/OGCFeatureLayerView.d.ts +1 -1
  1109. package/views/layers/PointCloudLayerView.d.ts +1 -1
  1110. package/views/layers/SceneLayerView.d.ts +1 -1
  1111. package/views/layers/StreamLayerView.d.ts +1 -1
  1112. package/views/layers/WFSLayerView.d.ts +1 -1
  1113. package/views/navigation/Navigation.d.ts +1 -1
  1114. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  1115. package/views/navigation/gamepad/GamepadSettings.d.ts +1 -1
  1116. package/views/support/Scheduler.js +1 -1
  1117. package/views/support/colorUtils.d.ts +1 -1
  1118. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  1119. package/views/support/geometry3dUtils.js +1 -1
  1120. package/views/ui/DefaultUI.d.ts +1 -1
  1121. package/views/ui/UI.d.ts +1 -1
  1122. package/webdoc/GeotriggersInfo.d.ts +1 -1
  1123. package/webdoc/applicationProperties/Search.d.ts +1 -1
  1124. package/webdoc/applicationProperties/SearchLayer.d.ts +1 -1
  1125. package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
  1126. package/webdoc/applicationProperties/SearchTable.d.ts +1 -1
  1127. package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
  1128. package/webdoc/applicationProperties/Viewing.d.ts +1 -1
  1129. package/webdoc/geotriggersInfo/DeviceLocationFeed.d.ts +1 -1
  1130. package/webdoc/geotriggersInfo/ExpressionInfo.d.ts +1 -1
  1131. package/webdoc/geotriggersInfo/FeatureFenceParameters.d.ts +1 -1
  1132. package/webdoc/geotriggersInfo/FeatureFilter.d.ts +1 -1
  1133. package/webdoc/geotriggersInfo/FeatureLayerSource.d.ts +1 -1
  1134. package/webdoc/geotriggersInfo/FenceGeotrigger.d.ts +1 -1
  1135. package/webdoc/geotriggersInfo/Geotrigger.d.ts +1 -1
  1136. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.d.ts +1 -1
  1137. package/webmap/ApplicationProperties.d.ts +1 -1
  1138. package/webmap/Bookmark.d.ts +1 -1
  1139. package/webmap/InitialViewProperties.d.ts +1 -1
  1140. package/webmap/background/ColorBackground.d.ts +1 -1
  1141. package/webscene/ApplicationProperties.d.ts +1 -1
  1142. package/webscene/Environment.d.ts +1 -1
  1143. package/webscene/InitialViewProperties.d.ts +1 -1
  1144. package/webscene/Lighting.d.ts +1 -1
  1145. package/webscene/Presentation.d.ts +1 -1
  1146. package/webscene/Slide.d.ts +1 -1
  1147. package/webscene/Slide.js +1 -1
  1148. package/webscene/SunLighting.d.ts +1 -1
  1149. package/webscene/VirtualLighting.d.ts +1 -1
  1150. package/webscene/background/Background.d.ts +1 -1
  1151. package/webscene/background/ColorBackground.d.ts +1 -1
  1152. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
  1153. package/widgets/AreaMeasurement2D.d.ts +1 -1
  1154. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +1 -1
  1155. package/widgets/AreaMeasurement3D.d.ts +1 -1
  1156. package/widgets/Attachments/AttachmentsViewModel.d.ts +1 -1
  1157. package/widgets/Attachments.d.ts +1 -1
  1158. package/widgets/Attribution/AttributionViewModel.d.ts +1 -1
  1159. package/widgets/Attribution.d.ts +1 -1
  1160. package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +1 -1
  1161. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +1 -1
  1162. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +1 -1
  1163. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +1 -1
  1164. package/widgets/BasemapGallery.d.ts +1 -1
  1165. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -1
  1166. package/widgets/BasemapLayerList.d.ts +1 -1
  1167. package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -1
  1168. package/widgets/BasemapToggle.d.ts +1 -1
  1169. package/widgets/Bookmarks/BookmarksViewModel.d.ts +1 -1
  1170. package/widgets/Bookmarks.d.ts +1 -1
  1171. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +1 -1
  1172. package/widgets/BuildingExplorer/BuildingLevel.d.ts +1 -1
  1173. package/widgets/BuildingExplorer/BuildingPhase.d.ts +1 -1
  1174. package/widgets/BuildingExplorer.d.ts +1 -1
  1175. package/widgets/Compass/CompassViewModel.d.ts +1 -1
  1176. package/widgets/Compass.d.ts +1 -1
  1177. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +1 -1
  1178. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -1
  1179. package/widgets/CoordinateConversion/support/Format.d.ts +1 -1
  1180. package/widgets/CoordinateConversion.d.ts +1 -1
  1181. package/widgets/Daylight/DaylightViewModel.d.ts +1 -1
  1182. package/widgets/Daylight.d.ts +1 -1
  1183. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +1 -1
  1184. package/widgets/DirectLineMeasurement3D.d.ts +1 -1
  1185. package/widgets/Directions/DirectionsViewModel.d.ts +1 -1
  1186. package/widgets/Directions.d.ts +1 -1
  1187. package/widgets/Directions.js +1 -1
  1188. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
  1189. package/widgets/DistanceMeasurement2D.d.ts +1 -1
  1190. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  1191. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +1 -1
  1192. package/widgets/Editor/CreateWorkflow.d.ts +1 -1
  1193. package/widgets/Editor/CreateWorkflowData.d.ts +1 -1
  1194. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  1195. package/widgets/Editor/Edits.d.ts +1 -1
  1196. package/widgets/Editor/UpdateWorkflow.d.ts +1 -1
  1197. package/widgets/Editor/UpdateWorkflowData.d.ts +1 -1
  1198. package/widgets/Editor/Workflow.d.ts +1 -1
  1199. package/widgets/Editor.d.ts +1 -1
  1200. package/widgets/Editor.js +1 -1
  1201. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +1 -1
  1202. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
  1203. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
  1204. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  1205. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
  1206. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +1 -1
  1207. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  1208. package/widgets/ElevationProfile/support/constants.js +1 -1
  1209. package/widgets/ElevationProfile.d.ts +1 -1
  1210. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  1211. package/widgets/Expand.d.ts +1 -1
  1212. package/widgets/Feature/FeatureMedia.js +1 -1
  1213. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  1214. package/widgets/Feature/FeatureViewModel.d.ts +1 -1
  1215. package/widgets/Feature/FeatureViewModel.js +1 -1
  1216. package/widgets/Feature.d.ts +1 -1
  1217. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +1 -1
  1218. package/widgets/FeatureForm/FieldConfig.d.ts +1 -1
  1219. package/widgets/FeatureForm/FieldGroupConfig.d.ts +1 -1
  1220. package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
  1221. package/widgets/FeatureForm/InputField.d.ts +1 -1
  1222. package/widgets/FeatureForm/InputField.js +1 -1
  1223. package/widgets/FeatureForm/InputFieldGroup.d.ts +1 -1
  1224. package/widgets/FeatureForm.d.ts +1 -1
  1225. package/widgets/FeatureForm.js +1 -1
  1226. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  1227. package/widgets/FeatureTable/FieldColumn.d.ts +1 -1
  1228. package/widgets/FeatureTable/FieldColumnConfig.d.ts +1 -1
  1229. package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
  1230. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
  1231. package/widgets/FeatureTable/Grid/support/ButtonMenu.d.ts +1 -1
  1232. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.d.ts +1 -1
  1233. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.d.ts +1 -1
  1234. package/widgets/FeatureTable/support/ColumnTemplate.d.ts +1 -1
  1235. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
  1236. package/widgets/FeatureTable/support/FieldColumnTemplate.d.ts +1 -1
  1237. package/widgets/FeatureTable/support/GroupColumnTemplate.d.ts +1 -1
  1238. package/widgets/FeatureTable/support/TableTemplate.d.ts +1 -1
  1239. package/widgets/FeatureTable.d.ts +1 -1
  1240. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
  1241. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  1242. package/widgets/FeatureTemplates/TemplateItemGroup.d.ts +1 -1
  1243. package/widgets/FeatureTemplates.d.ts +1 -1
  1244. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +1 -1
  1245. package/widgets/FloorFilter.d.ts +1 -1
  1246. package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
  1247. package/widgets/Fullscreen.d.ts +1 -1
  1248. package/widgets/Histogram/HistogramViewModel.d.ts +1 -1
  1249. package/widgets/Histogram.d.ts +1 -1
  1250. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +1 -1
  1251. package/widgets/HistogramRangeSlider.d.ts +1 -1
  1252. package/widgets/Home/HomeViewModel.d.ts +1 -1
  1253. package/widgets/Home.d.ts +1 -1
  1254. package/widgets/LayerList/LayerListViewModel.d.ts +1 -1
  1255. package/widgets/LayerList/ListItem.d.ts +1 -1
  1256. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  1257. package/widgets/LayerList.d.ts +1 -1
  1258. package/widgets/Legend/LegendViewModel.d.ts +1 -1
  1259. package/widgets/Legend/support/ActiveLayerInfo.d.ts +1 -1
  1260. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  1261. package/widgets/Legend.d.ts +1 -1
  1262. package/widgets/LineOfSight/LineOfSightTarget.d.ts +1 -1
  1263. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -1
  1264. package/widgets/LineOfSight.d.ts +1 -1
  1265. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  1266. package/widgets/Locate.d.ts +1 -1
  1267. package/widgets/Measurement/MeasurementViewModel.d.ts +1 -1
  1268. package/widgets/Measurement.d.ts +1 -1
  1269. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  1270. package/widgets/NavigationToggle.d.ts +1 -1
  1271. package/widgets/Popup/PopupViewModel.d.ts +1 -1
  1272. package/widgets/Popup.d.ts +1 -1
  1273. package/widgets/Popup.js +1 -1
  1274. package/widgets/Print/CustomTemplate.d.ts +1 -1
  1275. package/widgets/Print/PrintViewModel.d.ts +1 -1
  1276. package/widgets/Print/TemplateOptions.d.ts +1 -1
  1277. package/widgets/Print.d.ts +1 -1
  1278. package/widgets/ScaleBar/ScaleBarViewModel.d.ts +1 -1
  1279. package/widgets/ScaleBar.d.ts +1 -1
  1280. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.d.ts +1 -1
  1281. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +1 -1
  1282. package/widgets/ScaleRangeSlider.d.ts +1 -1
  1283. package/widgets/Search/LayerSearchSource.d.ts +1 -1
  1284. package/widgets/Search/LocatorSearchSource.d.ts +1 -1
  1285. package/widgets/Search/SearchResultRenderer.d.ts +1 -1
  1286. package/widgets/Search/SearchSource.d.ts +1 -1
  1287. package/widgets/Search/SearchViewModel.d.ts +1 -1
  1288. package/widgets/Search.d.ts +1 -1
  1289. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +1 -1
  1290. package/widgets/ShadowCast.d.ts +1 -1
  1291. package/widgets/Sketch/SketchViewModel.d.ts +1 -1
  1292. package/widgets/Sketch/SketchViewModel.js +1 -1
  1293. package/widgets/Sketch/support/OperationHandle.js +1 -1
  1294. package/widgets/Sketch.d.ts +1 -1
  1295. package/widgets/Slice/SlicePlane.d.ts +1 -1
  1296. package/widgets/Slice/SliceViewModel.d.ts +1 -1
  1297. package/widgets/Slice.d.ts +1 -1
  1298. package/widgets/Slider/SliderViewModel.d.ts +1 -1
  1299. package/widgets/Slider.d.ts +1 -1
  1300. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  1301. package/widgets/Swipe.d.ts +1 -1
  1302. package/widgets/TableList/ListItem.d.ts +1 -1
  1303. package/widgets/TableList/TableListViewModel.d.ts +1 -1
  1304. package/widgets/TableList.d.ts +1 -1
  1305. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
  1306. package/widgets/TimeSlider.d.ts +1 -1
  1307. package/widgets/Track/TrackViewModel.d.ts +1 -1
  1308. package/widgets/Track.d.ts +1 -1
  1309. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -1
  1310. package/widgets/UtilityNetworkTrace.d.ts +1 -1
  1311. package/widgets/UtilityNetworkTrace.js +1 -1
  1312. package/widgets/Weather/WeatherViewModel.d.ts +1 -1
  1313. package/widgets/Weather.d.ts +1 -1
  1314. package/widgets/Widget.d.ts +1 -1
  1315. package/widgets/Zoom/ZoomViewModel.d.ts +1 -1
  1316. package/widgets/Zoom.d.ts +1 -1
  1317. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +1 -1
  1318. package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
  1319. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +1 -1
  1320. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  1321. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +1 -1
  1322. package/widgets/smartMapping/ColorSizeSlider.d.ts +1 -1
  1323. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +1 -1
  1324. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  1325. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +1 -1
  1326. package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
  1327. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +1 -1
  1328. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  1329. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.d.ts +1 -1
  1330. package/widgets/smartMapping/SizeSlider.d.ts +1 -1
  1331. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +1 -1
  1332. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +1 -1
  1333. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +1 -1
  1334. package/widgets/smartMapping/support/utils.d.ts +1 -1
  1335. package/widgets/support/DatePicker.d.ts +1 -1
  1336. package/widgets/support/DatePickerViewModel.d.ts +1 -1
  1337. package/widgets/support/DateTimeElementViewModel.d.ts +1 -1
  1338. package/widgets/support/GeolocationPositioning.d.ts +1 -1
  1339. package/widgets/support/GoTo.d.ts +1 -1
  1340. package/widgets/support/SnappingControls/SnappingControlsViewModel.d.ts +1 -1
  1341. package/widgets/support/SnappingControls.d.ts +1 -1
  1342. package/widgets/support/TimePicker.d.ts +1 -1
  1343. package/widgets/support/TimePickerViewModel.d.ts +1 -1
  1344. package/widgets/support/widget.d.ts +1 -1
  1345. package/assets/esri/core/workers/chunks/09255015e57bdfa5337f.js +0 -1
  1346. package/assets/esri/core/workers/chunks/24ffd7180bb947bc8aec.js +0 -1
  1347. package/assets/esri/core/workers/chunks/2d6d089176b6bd490b9f.js +0 -1
  1348. package/assets/esri/core/workers/chunks/325f9eb52610c6c22f46.js +0 -1
  1349. package/assets/esri/core/workers/chunks/6a2358861b3d3007ad26.js +0 -1
  1350. package/assets/esri/core/workers/chunks/7230a7d5fb7106b14024.js +0 -1
  1351. package/assets/esri/core/workers/chunks/90dfa238d78c92fe43b1.js +0 -1
  1352. package/assets/esri/core/workers/chunks/a16109389dce496ab51c.js +0 -1
  1353. package/assets/esri/core/workers/chunks/bf248b08e18a50878f38.js +0 -1
  1354. package/assets/esri/core/workers/chunks/c9399a106dc167368a39.js +0 -1
  1355. package/assets/esri/core/workers/chunks/ceb68e994b82d69c1215.js +0 -1
  1356. package/assets/esri/core/workers/chunks/dbf72099949febfae5a1.js +0 -1
  1357. package/assets/esri/core/workers/chunks/e158ca25c239a5912ea0.js +0 -1
  1358. package/assets/esri/core/workers/chunks/ece3d9989c9ec13cae09.js +0 -1
  1359. package/assets/esri/core/workers/chunks/f6772f57bb1466e50d63.js +0 -1
  1360. package/chunks/MultipointDrawAction.js +0 -5
  1361. package/smartMapping/statistics/summaryStatisticsForBinning.js +0 -5
  1362. package/views/2d/draw/Draw.js +0 -5
  1363. package/views/2d/draw/DrawAction.js +0 -5
  1364. package/views/2d/draw/MultipointDrawAction.js +0 -5
  1365. package/views/2d/draw/PointDrawAction.js +0 -5
  1366. package/views/2d/draw/PolygonDrawAction.js +0 -5
  1367. package/views/2d/draw/PolylineDrawAction.js +0 -5
  1368. package/views/2d/draw/SegmentDrawAction.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../core/mathUtils.js";import{isSome as t,abortMaybe as i,isNone as s}from"../../../core/maybe.js";import n from"../../../core/ObjectPool.js";import{c as r,s as a}from"../../../chunks/vec2.js";import{a as o}from"../../../chunks/vec2f64.js";import{b as l,z as h,e as u,g as d,a as c,l as f}from"../../../chunks/vec3.js";import{c as g,u as p}from"../../../chunks/vec3f64.js";import{g as m}from"../../../chunks/common.js";import{getReferenceEllipsoid as _}from"../../../geometry/projectionEllipsoid.js";import{create as y,equals as A}from"../../../geometry/support/aaBoundingRect.js";import{c as T}from"../../../chunks/sphere.js";import{VectorTile as E}from"../../2d/engine/vectorTiles/VectorTile.js";import{ImageWithType as v}from"../support/StreamDataLoader.js";import{ElevationBounds as M}from"./ElevationBounds.js";import{ElevationTileAgent as I}from"./ElevationTileAgent.js";import{TileFrustumVisibility as D,LODSnapping as L,TextureUpdate as x,NeighborIndex as S}from"./interfaces.js";import{LayerClasses as O,LayerClass as N}from"./LayerClass.js";import{MapTileAgent as b}from"./MapTileAgent.js";import{RasterTile as j}from"./RasterTile.js";import{MAX_PATCH_TESSELATION as U,getElevationDesiredResolutionLevel as C}from"./TerrainConst.js";import{weakAssert as P,getLayerWithExtentRange as B,isBlendableLayerView as R,isGroupLayer as V,oppositeCorner as G,neighborCornerIndices as w,neighborEdgeIndices as W,oppositeEdge as q,internalAssert as H,ENABLE_TERRAIN_INTERNAL_CHECKS as F,isNorth as k,isSouth as X,isWest as Y,isEast as z,ENABLE_WATERPROOFNESS_TESTS as J,isWestCorner as $,isNorthCorner as Q}from"./terrainUtils.js";import{TILE_AGENT_DONE as K}from"./TileAgent.js";import{TilePerLayerInfo as Z}from"./TilePerLayerInfo.js";import ee from"./TileTexture.js";import{TileUpdate as te}from"./TileUpdate.js";import{fallsWithinLayer as ie}from"./tileUtils.js";import{getGpuMemoryUsage as se}from"../../webgl/Util.js";const ne=g(),re=g(),ae=g(),oe=.1;class le{constructor(){this.fovX=0,this.fovY=0,this.relativeWidthLimit=0,this.relativeHeightLimit=0,this.maxLod=0,this.angledSplitBias=0,this.aboveGround=!0}}class he{constructor(){this.lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this.extent=y(),this._elevationBounds=o(),this.layerInfo=[[],[]],this.extentInRadians=y(),this.centerAtSeaLevel=g(),this._center=[g(),T(),g()],this.up=p(),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=null,this._mapTileMemoryInternal=0,this._mapDataRefCount=0,this._screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.extentMidX=0,this.extentMidY=0}static prune(){ce.prune(0),fe.prune(0),Z.prune()}get _isCached(){return!this.shouldLoad&&this._mapDataRefCount<=0}get maxTesselation(){return this._maxTesselation}get isWithinClippingArea(){return this._isWithinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBounds(){return this._elevationBounds}get level(){return this.lij[0]}get key(){return`${this.lij[0]}/${this.lij[1]}/${this.lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[pe.MIDDLE][3]}get screenDepth(){return this._screenDepth}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}computeVisibility(){this._dirty=!1;const e=this.parent?.frustumVisibility??D.INTERSECTS;this._frustumVisibility=e===D.INSIDE?D.INSIDE:e===D.OUTSIDE?D.OUTSIDE:this._calculateFrustumVisibilityStatus(this.surface.frustum);const t=this._frustumVisibility!==D.OUTSIDE&&this._intersectsClippingArea;t!==this._visible&&(this._visible=t,this._surface.emit("tiles-visibility-changed"),this._surface.renderer.setDirty(),this.updateAgentSuspension())}get loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){const e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit("tiles-visibility-changed"),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}get shouldLoad(){if(this._surface.lodSnapping===L.ON){const e=this.level-this._surface.snapLevel;if(0===e)return!0;if(1===e)return!1}return this.isLeaf}init(e,t,i){this.lij[0]=e[0],this.lij[1]=e[1],this.lij[2]=e[2],this.ellipsoid=_(i.tilingScheme.spatialReference),i.tilingScheme.getExtent(e[0],e[1],e[2],this.extent),i.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,i.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[pe.MIDDLE][3]=0,this.vlevel=e?e[0]:0,t&&t.elevationBounds?r(this._elevationBounds,t.elevationBounds):a(this._elevationBounds,0,0),this._pendingUpdates=0,this.renderData=null,this._screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=t,this.unsetChildren(),this._surface=i,this.updateVisibility();for(const s of O){const e=i.numLayers(s),t=this.layerInfo[s];for(const i of t)i.release();t.length=e;for(let i=0;i<e;i++)t[i]=Z.acquire(this._surface.upsampleInfoPool),s===N.ELEVATION&&this.findElevationBoundsForLayer(i,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(i.tilingScheme.pixelSize,U)}release(){P(!this.renderData,"tile.renderData was not unloaded"),this._surface.upsampleMapCache.pop(this.key);for(const e of O){for(const t of this.layerInfo[e])t.release();this.layerInfo[e].length=0}this._parent=null;for(let e=0;e<4;++e)this._children[e]=null;this._surface=null,this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._isCached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){if(--this._mapDataRefCount,this._isCached){this.setMemoryDirty();const e=this._cachedMemory;e>0&&this._surface.upsampleMapCache.put(this.key,this,e)}}setMemoryDirty(){this._usedMemory=null}get usedMemory(){return this._ensureUsedMemory()+(this._isCached?0:this._mapTileMemoryInternal)}get _cachedMemory(){return this._isCached?this._mapTileMemory:0}get _mapTileMemory(){return this._ensureUsedMemory(),this.layerInfo[N.MAP].reduce(((e,t)=>e+(t instanceof E?t.memoryUsage:0)),this._mapTileMemoryInternal)}get _cpuImageMemorySize(){const e=4,t=this._surface.tilingScheme.pixelSize;return t*t*e}_ensureUsedMemory(){if(t(this._usedMemory))return this._usedMemory;this._usedMemory=0,this._mapTileMemoryInternal=0;let e=0;for(const{data:t}of this.layerInfo[N.MAP])t instanceof E?e+=this._getTerrainDataMemory(t):this._mapTileMemoryInternal+=this._getTerrainDataMemory(t);const i=this._cpuImageMemorySize;for(const t of this.layerInfo[N.ELEVATION])this._usedMemory+=t.data?i:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._mapTileMemoryInternal+=se(this.renderData.textureDescriptor)),this._isCached&&this._surface.upsampleMapCache.updateSize(this.key,this,this._mapTileMemoryInternal+e),this._usedMemory}getUsedMemoryForLayer(e,t){const i=this.layerInfo[e][t];return i?.data?e===N.MAP?this._isCached?0:this._getTerrainDataMemory(i.data):e===N.ELEVATION?this._cpuImageMemorySize:0:0}_getTerrainDataMemory(e){return e instanceof ee?se(e.texture):e instanceof HTMLImageElement||e instanceof v?this._cpuImageMemorySize:e instanceof E||e instanceof j?e.memoryUsage:0}updateScreenDepth(e){const t=this._center[pe.MIDDLE],i=e,s=t[0],n=t[1],r=t[2],a=i[2]*s+i[6]*n+i[10]*r+i[14];this._screenDepth=a<0?0:a/(i[3]*s+i[7]*n+i[11]*r+i[15])}shouldSplit(e,i,s){if(!this.visible)return te.NONE;if(t(e.frustum)&&(!this._intersectsClippingArea||this._calculateFrustumVisibilityStatus(e.frustum)===D.OUTSIDE))return te.NONE;const n=this.level;l(ne,this._center[pe.MIDDLE],i);let r=h(ne),a=pe.MIDDLE;l(re,this._center[pe.TOP],i);const o=h(re);o<r&&(r=o,a=pe.TOP),l(re,this._center[pe.BOTTOM],i);const g=h(re);if(g<r&&(r=g,a=pe.BOTTOM),this._edgeLen2>r&&n<e.maxLod)return te.SPLIT;const p=Math.sqrt(r),m=e.fovX*p*2,_=this._edgeLen/m,y=()=>{const t=n+Math.ceil(-Math.log2(e.relativeWidthLimit/_));return t!==this.vlevel?(this.vlevel=t,te.VSPLITMERGE):te.NONE_HIT_MAXLOD};if(s===L.ON){if(1===this._surface.snapLevel-n)return n>=e.maxLod?y():te.SPLIT}const A=u(this.up,ne),T=this._elevationBounds[1]-this._elevationBounds[0],E=T/this.edgeLen;if(e.aboveGround&&A>0&&E<.001){if(A/p-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-E>0)return te.NONE}if(_<e.relativeWidthLimit)return this.vlevel!==this.level?(this.vlevel=this.level,te.VSPLITMERGE):te.NONE;if(n>=e.maxLod)return y();if(n>6){l(re,this._center[a],i),d(ae,this.up,A),l(ae,ae,re);const t=h(ae);if(t>this.radius*this.radius){d(ae,ae,this.radius/Math.sqrt(t)),c(ae,ae,this._center[a]),l(ae,i,ae);const s=Math.min(1,(Math.abs(u(ae,this.up))+.5*T+this._curvatureHeight)/f(ae)),n=oe/e.angledSplitBias,r=e.fovY*p*2;if(s*(this._edgeLen/r)<n*e.relativeHeightLimit)return te.NONE}}return te.SPLIT}setChildren(e,t,i,s){P(!!(e&&t&&i&&s),"Null child passed"),this._children[0]=e,this._children[1]=t,this._children[2]=i,this._children[3]=s}unsetChildren(){this._children[0]=null,this._children[1]=null,this._children[2]=null,this._children[3]=null}get isLoaded(){return this.renderData?.hasGeometry??!1}load(){this.refMapData();for(const e of O)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(e){e.unloadTile(this);for(const t of O){const e=this.layerInfo[t];for(const t of e)t.loadingAgent&&t.loadingAgent!==K&&(de(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0}this.resetPendingUpdate(te.GEOMETRY),this.resetPendingUpdate(te.TEXTURE_NOFADING),this.resetPendingUpdate(te.TEXTURE_FADING),this.unrefMapData()}unloadMapData(){const e=this.layerInfo[N.MAP];for(const t of e)t.loadingAgent&&t.loadingAgent!==K&&(de(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0;this.renderData&&this.renderData.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(A(e,this._clippingArea))return!1;const i=this._intersectsClippingArea,s=this._isWithinClippingArea;t(e)?(this._intersectsClippingArea=this.intersectsExtent(e),this._isWithinClippingArea=this._isWithinExtent(e)):(this._intersectsClippingArea=!0,this._isWithinClippingArea=!0),this._clippingArea=e,this.updateVisibility();const n=s&&this._isWithinClippingArea,r=!(s||i||this._isWithinClippingArea||this._intersectsClippingArea);return!this.renderData||n||r||this.setPendingUpdate(te.GEOMETRY),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty()}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){const i=this.layerInfo[t][e];return!(!i||!i.data||i.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(const e of O){const t=this.layerInfo[e];for(const e of t)if(e.loadingAgent&&e.loadingAgent!==K&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return!!this.hasPendingUpdate(te.SPLIT)||e!==N.ELEVATION&&!this.loadable}get hasPendingUpdates(){return 0!==this._pendingUpdates}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){this._pendingUpdates|=e,e===te.SPLIT||e===te.MERGE?this._surface.setTileTreeDirty():this._surface.requestUpdate()}resetPendingUpdate(e){return!!this.hasPendingUpdate(e)&&(this._pendingUpdates&=~e,!0)}requestLayerData(e,t,s){const n=this.layerInfo[t][e];if(n.waitingAgents.has(s))return console.warn("agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),s.tile.lij.toString(),t,e),!0;if(n.waitingAgents.push(s),n.data&&!n.dataInvalidated)return console.warn("agent requested existing data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),s.tile.lij.toString(),t,e),s.dataArrived(this),!0;if(n.requestPromise)return!0;i(n.requestAbort),n.requestAbort=new AbortController;const r=this._surface.requestTileData(this,e,t,n.requestAbort);if(!r)return n.requestAbort=null,!1;const a=()=>{n.requestPromise===r&&(n.requestPromise=null,n.requestAbort=null)};return n.requestPromise=r,r.then(a,a),!0}get isLeaf(){return null==this._children[0]}hasLij(e){return this.lij[0]===e[0]&&this.lij[1]===e[1]&&this.lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;if(this.isLeaf)return null;const t=this._children[0].findByLij(e)||this._children[1].findByLij(e)||this._children[2].findByLij(e)||this._children[3].findByLij(e);return t||null}distanceToSquared(e){return h(l(ae,this._center[pe.MIDDLE],e))}containsPoint(e){const t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){const i=this.extent;return e>=i[0]&&t>=i[1]&&e<=i[2]&&t<=i[3]}unrequestLayerData(e,t,i){const s=this.layerInfo[t][e],n=s.waitingAgents,r=null!=n.removeUnordered(i);P(r,"agent has not requested this piece of map data"),n.length<1&&(s.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,i){const s=this.layerInfo[t][e];s.data=i,s.dataInvalidated=!1,s.waitingAgents.forAll((e=>e.dataArrived(this))),s.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t,i){i.notInTilemap||console.error(`Tile ${this.lij.toString()} layer ${t}/${e} error ${i}`);const s=this.layerInfo[t][e];s.dataMissing=!0,s.waitingAgents.forAll((e=>e.dataMissing())),s.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t){switch(e){case N.MAP:return this._updateTexture(t);case N.ELEVATION:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(e===x.FADING?te.TEXTURE_NOFADING:te.TEXTURE_FADING),this.setPendingUpdate(e===x.FADING?te.TEXTURE_FADING:te.TEXTURE_NOFADING))}_updateGeometry(){this.setPendingUpdate(te.GEOMETRY);for(const e of this.layerInfo[N.ELEVATION])e.pendingUpdates|=te.GEOMETRY}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData(),this.restartAgents(t)}computeElevationBounds(){const e=this._elevationBounds;a(e,1/0,-1/0);const i=this.layerInfo[N.ELEVATION];let s=!0;for(const n of i)t(n.elevationBounds)&&(e[0]=Math.min(e[0],n.elevationBounds.min),e[1]=Math.max(e[1],n.elevationBounds.max),n.elevationBounds.hasNoDataValues||(s=!1));s&&(e[0]=Math.min(e[0],0),e[1]=Math.max(e[1],0)),this.updateRadiusAndCenter(),this._surface.setTileTreeDirty()}_updateCenter(){const e=this._elevationBounds,t=.5*(e[0]+e[1]);d(ae,this.up,t),c(this._center[pe.MIDDLE],this.centerAtSeaLevel,ae),d(ae,this.up,e[0]),c(this._center[pe.TOP],this.centerAtSeaLevel,ae),d(ae,this.up,e[1]),c(this._center[pe.BOTTOM],this.centerAtSeaLevel,ae)}findElevationBoundsForLayer(e,i){const n=this.layerInfo[N.ELEVATION][e];if(t(n.elevationBounds)&&n.elevationBounds.level>=i)return;const r=this._surface.layerViewByIndex(e,N.ELEVATION),a=B(r);if(!ie(this,a,!1))return;const o=ge;let l=!1;if(n.data){const e=n.data;o.min=e.bounds[0],o.max=e.bounds[1],o.hasNoDataValues=e.hasNoDataValues,o.level=this.level,l=!0}else{let t,i,s=0;for(let n=this._parent;n&&(!i||s<C(this.level))&&(s=this.vlevel-n.level,t=i||t,i=n.layerInfo[N.ELEVATION][e].data,!(!i&&t&&s>=C(this.level)));n=n.parent);i=i||t,i&&(i.computeMinMaxValue(this.lij[0],this.lij[1],this.lij[2],o),o.min!==1/0&&(o.level=i.level,l=!0))}l&&(s(n.elevationBounds)&&(n.elevationBounds=new M),n.elevationBounds.copyFrom(o))}modifyLayers(e,t,i){const s=this.layerInfo[i];for(const a of s)a.loadingAgent&&a.loadingAgent!==K&&(de(a.loadingAgent),a.loadingAgent=null),a.waitingAgents.clear();for(let a=0;a<s.length;++a)void 0===e[a]&&s[a].release();const n=new Array(...s),r=t.length;s.length=r;for(let a=0;a<r;a++){const e=t[a];s[a]=e>-1?n[e]:Z.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,x.FADING))}updateAgents(e){if(this.renderData){const t=this.layerInfo[e];for(const e of t)e.loadingAgent===K&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(const e of O){const t=this._isSuspended(e);for(const i of this.layerInfo[e])i.loadingAgent&&i.loadingAgent!==K&&(i.loadingAgent.setSuspension(t),i.loadingAgent===K&&this.updateRenderData(e,x.FADING))}}removeLayerAgent(e,t){const i=this.layerInfo[t][e];i.loadingAgent&&i.loadingAgent!==K&&i.loadingAgent.dispose(),i.loadingAgent=null}agentDone(e,t){const i=this.layerInfo[t][e];i.loadingAgent=K,!i.data&&s(i.upsampleInfo)&&this._createOrUpdateAgents(e+1,t)}_createOrUpdateAgents(e,i){const s=this.layerInfo[i];if(0===s.length)return;const n=e=>"normal"!==e.blendMode||V(e.parent)&&n(e.parent),r=(()=>{for(let r=e;r<s.length;++r){const e=this._surface.layerViewByIndex(r,i);if(R(e)&&t(e.layer.blendMode)&&"normal"!==e.layer.blendMode||V(e.layer.parent)&&n(e.layer.parent))return!0}return!1})(),a=this._isSuspended(i);for(let t=e;t<s.length;++t){const e=s[t];let n=!1;const o=this._surface.layerViewByIndex(t,i),l=B(o);if(e.loadingAgent?ie(this,l,!1)?(e.loadingAgent!==K&&e.loadingAgent.setSuspension(a),e.loadingAgent!==K&&(n=e.loadingAgent.update())):e.dispose():ie(this,l,!1)&&(e.loadingAgent=ue(this,t,i,a),n=e.loadingAgent.startLoading(),n?e.loadingAgent===K&&this.setPendingUpdate(te.GEOMETRY):(de(e.loadingAgent),e.loadingAgent=K)),e.loadingAgent===K&&this.updateRenderData(i,x.FADING),!r&&n&&o.isOpaque)return}}_isWithinExtent(e){const t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){const t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationBasedVerticesPerSide(t){const i=this.vlevel-this.level,s=Math.max(this.level-t,C(this.level)-i);return e(1+(this.maxTesselation>>s),2,this.maxTesselation+1)}get test(){return{cachedMemory:this._cachedMemory}}_findLIJ(e,i){if(!e)return null;const s=this.surface.rootTiles;if(t(s))for(const t of s)if(me(t,e)){let s=t,n=e[0]-s.level-1;for(;n>=0&&!s.isLeaf&&!i(s);){const t=e[1]>>n&1,i=e[2]>>n&1;s=s.children[2*t+i],n--}return i(s)?s:null}return null}findNeighborTile(e,t){const i=this.lij,s=this.getNeighborLIJ(i,e);return s?_e(i,s)?t(this)?this:null:this._findLIJ(s,t):null}findCorner(e,t){const i=e===S.NORTH_EAST?1:e===S.NORTH_WEST?0:e===S.SOUTH_WEST?2:3;let s=this;for(;!(s.isLeaf||t&&t(s));)s=s.children[i];return s}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,(e=>t(e)||e.level===this.level))?.findCorner(G(e),t)}forAllSubtreeOnSide(e,t){const i=e===S.NORTH?[0,1]:e===S.NORTH_EAST?[1]:e===S.EAST?[1,3]:e===S.SOUTH_EAST?[3]:e===S.SOUTH?[2,3]:e===S.SOUTH_WEST?[2]:e===S.WEST?[0,2]:[0],s=e=>{t(e)||e.isLeaf||i.forEach((t=>s(e.children[t])))};s(this)}forallNeighbors(e){w.forEach((t=>this.findNeighborCornerTileExact(t,e))),W.forEach((t=>this.findNeighborTile(t,(t=>t.level===this.level||e(t)))?.forAllSubtreeOnSide(q(t),e)))}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;const i=this.level-t.level;if(H(!F||i>=0),0===i)return 0;const s=2**i,n=1==(1&e),r=n?0:1,a=t.lij[r+1]*s,o=this.lij[r+1],l=o-a,h=n?s-1-l:l;return F&&(H(a<=o&&o<a+s),H(0<=h&&h<s)),h}forEachLoadedNeighbor(e){const t=this.level,i=e=>e.level===t||e.isLoaded;W.forEach((t=>{const s=this.findNeighborTile(t,i);null!=s&&s!==this&&s.forAllSubtreeOnSide(q(t),(i=>!!i.isLoaded&&(e(i,t),!0)))})),w.forEach((t=>{const s=this.findNeighborTile(t,i)?.findCorner(G(t),(e=>e.isLoaded));H(!s||Te(this,s,t)),s?.isLoaded&&e(s,t)}))}getNeighborLIJ(e,t){const i=k(t)?-1:X(t)?1:0,s=Y(t)?-1:z(t)?1:0,n=[e[0],e[1]+i,e[2]+s];return n[1]<0?null:this.surface.isGlobal?this.wrapLIJ(n):n[2]<0?null:n}wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}get westNeighborWestExtent(){return this.extent[0]*(this.isWestEnd?-1:1)}get eastNeighborEastExtent(){return this.extent[2]*(this.isEastEnd?-1:1)}get isEastEnd(){return this.lij[2]===this.surface.lijEastEnd(this.level)-1}get isWestEnd(){return 0===this.lij[2]}get isNorthEnd(){return 0===this.lij[1]}get isSouthEnd(){return this.extent[1]+m()>=this.surface.extent[1]}compareLIJs(e){const t=this.lij,i=t[0],s=e[0];if(i===s)return[t,e];const n=i-s;if(n<0){const i=2**-n;return[[s,t[1]*i,t[2]*i],e]}{const s=2**n;return[t,[i,e[1]*s,e[2]*s]]}}checkGeometryWaterproofness(){J&&(H(this.isLoaded),this.renderData.checkGeometryWaterproofness())}shouldHaveNeighbor(e){const t=this.extent,i=this.surface.rootTilesExtent,s=.25*(t[2]-t[0]);if(k(e)&&t[3]+s>=i[3])return!1;if(X(e)&&t[1]-s<=i[1])return!1;const n=this.surface.isGlobal;return!(!n&&Y(e)&&t[0]-s<=i[0])&&!(!n&&z(e)&&t[2]+s>=i[2])}}function ue(e,t,i,s){const n=i===N.ELEVATION?fe.acquire():ce.acquire();return n.init(e,t,i,s),n}function de(e){e.dispose(),e instanceof I?fe.release(e):e instanceof b&&ce.release(e)}const ce=new n(b),fe=new n(I),ge=new M;var pe;function me(e,t){const i=e.level,s=t[0];if(i>s)return!1;const n=s-i,r=Math.floor(t[1]/2**n),a=Math.floor(t[2]/2**n);return r===e.lij[1]&&a===e.lij[2]}function _e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function ye(e,t,i){return Math.abs(e-t)<=i}function Ae(e,t,i){if(s(e)||s(t))return!1;if(0===e.level&&0===t.level){if(e.isEastEnd&&t.isWestEnd&&i===S.EAST)return!0;if(e.isWestEnd&&t.isEastEnd&&i===S.WEST)return!0}const n=Math.max(1e-6*(e.extent[2]-e.extent[0]),1);switch(i){case S.NORTH:return ye(e.extent[3],t.extent[1],n);case S.SOUTH:return ye(e.extent[1],t.extent[3],n);case S.EAST:return ye(e.extent[2],t.extent[0],n)||ye(e.extent[2],-t.extent[0],n);case S.WEST:return ye(e.extent[0],t.extent[2],n)||ye(e.extent[0],-t.extent[2],n)}}function Te(e,t,i){return!s(e)&&!s(t)&&t!==e&&(e.level>=t.level?Ee(e,t,i):Ee(t,e,G(i)))}function Ee(e,t,i){H(e.level>=t.level);const s=$(i),n=Q(i),r=e.extent,a=t.extent,o=[s?r[0]:r[2],n?r[3]:r[1]],l=[s?a[2]:a[0],n?a[1]:a[3]],h=1e-5*(r[2]-r[0]),u=ye(o[0],l[0],h)||e.surface.isGlobal&&ye(o[0],-l[0],h),d=ye(o[1],l[1],h);if(u&&d)return!0;if(e.level===t.level)return H(!1),!1;if(!u&&!d)return H(!1),!1;const c=u?ve(a[1],a[3],r[1],r[3],h):ve(a[0],a[2],r[0],r[2],h);return H(c),c}function ve(e,t,i,s,n=m()){return e-n<=i&&i<=s&&s<=t+n}!function(e){e[e.TOP=0]="TOP",e[e.MIDDLE=1]="MIDDLE",e[e.BOTTOM=2]="BOTTOM"}(pe||(pe={}));export{pe as CenterPosition,le as SplitLimits,he as Tile,ye as almostEquals,Te as isCornerNeighbor,Ae as isEdgeNeighbor};
5
+ import{clamp as e}from"../../../core/mathUtils.js";import{isSome as t,abortMaybe as i,isNone as s}from"../../../core/maybe.js";import n from"../../../core/ObjectPool.js";import{c as r,s as a}from"../../../chunks/vec2.js";import{a as o}from"../../../chunks/vec2f64.js";import{b as l,p as h,e as d,g as u,a as c,l as f}from"../../../chunks/vec3.js";import{c as g,u as p}from"../../../chunks/vec3f64.js";import{g as m}from"../../../chunks/common.js";import{getReferenceEllipsoid as _}from"../../../geometry/projectionEllipsoid.js";import{create as y,equals as A}from"../../../geometry/support/aaBoundingRect.js";import{c as T}from"../../../chunks/sphere.js";import{VectorTile as E}from"../../2d/engine/vectorTiles/VectorTile.js";import{ImageWithType as v}from"../support/StreamDataLoader.js";import{ElevationBounds as M}from"./ElevationBounds.js";import{ElevationTileAgent as I}from"./ElevationTileAgent.js";import{TileFrustumVisibility as D,LODSnapping as L,TextureUpdate as x,NeighborIndex as S}from"./interfaces.js";import{LayerClasses as O,LayerClass as b}from"./LayerClass.js";import{MapTileAgent as N}from"./MapTileAgent.js";import{RasterTile as j}from"./RasterTile.js";import{MAX_PATCH_TESSELATION as U,getElevationDesiredResolutionLevel as C}from"./TerrainConst.js";import{weakAssert as B,getLayerWithExtentRange as P,isGroupLayer as R,isBlendableLayerView as V,oppositeCorner as G,neighborCornerIndices as w,neighborEdgeIndices as W,oppositeEdge as q,internalAssert as H,ENABLE_TERRAIN_INTERNAL_CHECKS as F,isNorth as k,isSouth as X,isWest as Y,isEast as z,ENABLE_WATERPROOFNESS_TESTS as J,isWestCorner as $,isNorthCorner as Q}from"./terrainUtils.js";import{TILE_AGENT_DONE as K}from"./TileAgent.js";import{TilePerLayerInfo as Z}from"./TilePerLayerInfo.js";import ee from"./TileTexture.js";import{TileUpdate as te}from"./TileUpdate.js";import{fallsWithinLayer as ie}from"./tileUtils.js";import{getGpuMemoryUsage as se}from"../../webgl/Util.js";const ne=g(),re=g(),ae=g(),oe=.1;class le{constructor(){this.fovX=0,this.fovY=0,this.relativeWidthLimit=0,this.relativeHeightLimit=0,this.maxLod=0,this.angledSplitBias=0,this.aboveGround=!0}}class he{constructor(){this.lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this.extent=y(),this._elevationBounds=o(),this.layerInfo=[[],[]],this.extentInRadians=y(),this.centerAtSeaLevel=g(),this._center=[g(),T(),g()],this.up=p(),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=null,this._mapTileMemoryInternal=0,this._mapDataRefCount=0,this._screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.extentMidX=0,this.extentMidY=0}static prune(){ce.prune(0),fe.prune(0),Z.prune()}get _isCached(){return!this.shouldLoad&&this._mapDataRefCount<=0}get maxTesselation(){return this._maxTesselation}get isWithinClippingArea(){return this._isWithinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBounds(){return this._elevationBounds}get level(){return this.lij[0]}get key(){return`${this.lij[0]}/${this.lij[1]}/${this.lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[pe.MIDDLE][3]}get screenDepth(){return this._screenDepth}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}computeVisibility(){this._dirty=!1;const e=this.parent?.frustumVisibility??D.INTERSECTS;this._frustumVisibility=e===D.INSIDE?D.INSIDE:e===D.OUTSIDE?D.OUTSIDE:this._calculateFrustumVisibilityStatus(this.surface.frustum);const t=this._frustumVisibility!==D.OUTSIDE&&this._intersectsClippingArea;t!==this._visible&&(this._visible=t,this._surface.emit("tiles-visibility-changed"),this._surface.renderer.setDirty(),this.updateAgentSuspension())}get loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){const e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit("tiles-visibility-changed"),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}get shouldLoad(){if(this._surface.lodSnapping===L.ON){const e=this.level-this._surface.snapLevel;if(0===e)return!0;if(1===e)return!1}return this.isLeaf}init(e,t,i){this.lij[0]=e[0],this.lij[1]=e[1],this.lij[2]=e[2],this.ellipsoid=_(i.tilingScheme.spatialReference),i.tilingScheme.getExtent(e[0],e[1],e[2],this.extent),i.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,i.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[pe.MIDDLE][3]=0,this.vlevel=e?e[0]:0,t&&t.elevationBounds?r(this._elevationBounds,t.elevationBounds):a(this._elevationBounds,0,0),this._pendingUpdates=0,this.renderData=null,this._screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=t,this.unsetChildren(),this._surface=i,this.updateVisibility();for(const s of O){const e=i.numLayers(s),t=this.layerInfo[s];for(const i of t)i.release();t.length=e;for(let i=0;i<e;i++)t[i]=Z.acquire(this._surface.upsampleInfoPool),s===b.ELEVATION&&this.findElevationBoundsForLayer(i,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(i.tilingScheme.pixelSize,U)}release(){B(!this.renderData,"tile.renderData was not unloaded"),this._surface.upsampleMapCache.pop(this.key);for(const e of O){for(const t of this.layerInfo[e])t.release();this.layerInfo[e].length=0}this._parent=null;for(let e=0;e<4;++e)this._children[e]=null;this._surface=null,this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._isCached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){if(--this._mapDataRefCount,this._isCached){this.setMemoryDirty();const e=this._cachedMemory;e>0&&this._surface.upsampleMapCache.put(this.key,this,e)}}setMemoryDirty(){this._usedMemory=null}get usedMemory(){return this._ensureUsedMemory()+(this._isCached?0:this._mapTileMemoryInternal)}get _cachedMemory(){return this._isCached?this._mapTileMemory:0}get _mapTileMemory(){return this._ensureUsedMemory(),this.layerInfo[b.MAP].reduce(((e,t)=>e+(t instanceof E?t.memoryUsage:0)),this._mapTileMemoryInternal)}get _cpuImageMemorySize(){const e=4,t=this._surface.tilingScheme.pixelSize;return t*t*e}_ensureUsedMemory(){if(t(this._usedMemory))return this._usedMemory;this._usedMemory=0,this._mapTileMemoryInternal=0;let e=0;for(const{data:t}of this.layerInfo[b.MAP])t instanceof E?e+=this._getTerrainDataMemory(t):this._mapTileMemoryInternal+=this._getTerrainDataMemory(t);const i=this._cpuImageMemorySize;for(const t of this.layerInfo[b.ELEVATION])this._usedMemory+=t.data?i:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._mapTileMemoryInternal+=se(this.renderData.textureDescriptor)),this._isCached&&this._surface.upsampleMapCache.updateSize(this.key,this,this._mapTileMemoryInternal+e),this._usedMemory}getUsedMemoryForLayer(e,t){const i=this.layerInfo[e][t];return i?.data?e===b.MAP?this._isCached?0:this._getTerrainDataMemory(i.data):e===b.ELEVATION?this._cpuImageMemorySize:0:0}_getTerrainDataMemory(e){return e instanceof ee?se(e.texture):e instanceof HTMLImageElement||e instanceof v?this._cpuImageMemorySize:e instanceof E||e instanceof j?e.memoryUsage:0}updateScreenDepth(e){const t=this._center[pe.MIDDLE],i=e,s=t[0],n=t[1],r=t[2],a=i[2]*s+i[6]*n+i[10]*r+i[14];this._screenDepth=a<0?0:a/(i[3]*s+i[7]*n+i[11]*r+i[15])}shouldSplit(e,i,s){if(!this.visible)return te.NONE;if(t(e.frustum)&&(!this._intersectsClippingArea||this._calculateFrustumVisibilityStatus(e.frustum)===D.OUTSIDE))return te.NONE;const n=this.level;l(ne,this._center[pe.MIDDLE],i);let r=h(ne),a=pe.MIDDLE;l(re,this._center[pe.TOP],i);const o=h(re);o<r&&(r=o,a=pe.TOP),l(re,this._center[pe.BOTTOM],i);const g=h(re);if(g<r&&(r=g,a=pe.BOTTOM),this._edgeLen2>r&&n<e.maxLod)return te.SPLIT;const p=Math.sqrt(r),m=e.fovX*p*2,_=this._edgeLen/m,y=()=>{const t=n+Math.ceil(-Math.log2(e.relativeWidthLimit/_));return t!==this.vlevel?(this.vlevel=t,te.VSPLITMERGE):te.NONE_HIT_MAXLOD};if(s===L.ON){if(1===this._surface.snapLevel-n)return n>=e.maxLod?y():te.SPLIT}const A=d(this.up,ne),T=this._elevationBounds[1]-this._elevationBounds[0],E=T/this.edgeLen;if(e.aboveGround&&A>0&&E<.001){if(A/p-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-E>0)return te.NONE}if(_<e.relativeWidthLimit)return this.vlevel!==this.level?(this.vlevel=this.level,te.VSPLITMERGE):te.NONE;if(n>=e.maxLod)return y();if(n>6){l(re,this._center[a],i),u(ae,this.up,A),l(ae,ae,re);const t=h(ae);if(t>this.radius*this.radius){u(ae,ae,this.radius/Math.sqrt(t)),c(ae,ae,this._center[a]),l(ae,i,ae);const s=Math.min(1,(Math.abs(d(ae,this.up))+.5*T+this._curvatureHeight)/f(ae)),n=oe/e.angledSplitBias,r=e.fovY*p*2;if(s*(this._edgeLen/r)<n*e.relativeHeightLimit)return te.NONE}}return te.SPLIT}setChildren(e,t,i,s){B(!!(e&&t&&i&&s),"Null child passed"),this._children[0]=e,this._children[1]=t,this._children[2]=i,this._children[3]=s}unsetChildren(){this._children[0]=null,this._children[1]=null,this._children[2]=null,this._children[3]=null}get isLoaded(){return this.renderData?.hasGeometry??!1}load(){this.refMapData();for(const e of O)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(e){e.unloadTile(this);for(const t of O){const e=this.layerInfo[t];for(const t of e)t.loadingAgent&&t.loadingAgent!==K&&(ue(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0}this.resetPendingUpdate(te.GEOMETRY),this.resetPendingUpdate(te.TEXTURE_NOFADING),this.resetPendingUpdate(te.TEXTURE_FADING),this.unrefMapData()}unloadMapData(){const e=this.layerInfo[b.MAP];for(const t of e)t.loadingAgent&&t.loadingAgent!==K&&(ue(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0;this.renderData&&this.renderData.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(A(e,this._clippingArea))return!1;const i=this._intersectsClippingArea,s=this._isWithinClippingArea;t(e)?(this._intersectsClippingArea=this.intersectsExtent(e),this._isWithinClippingArea=this._isWithinExtent(e)):(this._intersectsClippingArea=!0,this._isWithinClippingArea=!0),this._clippingArea=e,this.updateVisibility();const n=s&&this._isWithinClippingArea,r=!(s||i||this._isWithinClippingArea||this._intersectsClippingArea);return!this.renderData||n||r||this.setPendingUpdate(te.GEOMETRY),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty()}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){const i=this.layerInfo[t][e];return!(!i||!i.data||i.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(const e of O){const t=this.layerInfo[e];for(const e of t)if(e.loadingAgent&&e.loadingAgent!==K&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return!!this.hasPendingUpdate(te.SPLIT)||e!==b.ELEVATION&&!this.loadable}get hasPendingUpdates(){return 0!==this._pendingUpdates}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){this._pendingUpdates|=e,e===te.SPLIT||e===te.MERGE?this._surface.setTileTreeDirty():this._surface.requestUpdate()}resetPendingUpdate(e){return!!this.hasPendingUpdate(e)&&(this._pendingUpdates&=~e,!0)}requestLayerData(e,t,s){const n=this.layerInfo[t][e];if(n.waitingAgents.has(s))return console.warn("agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),s.tile.lij.toString(),t,e),!0;if(n.waitingAgents.push(s),n.data&&!n.dataInvalidated)return console.warn("agent requested existing data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),s.tile.lij.toString(),t,e),s.dataArrived(this),!0;if(n.requestPromise)return!0;i(n.requestAbort),n.requestAbort=new AbortController;const r=this._surface.requestTileData(this,e,t,n.requestAbort);if(!r)return n.requestAbort=null,!1;const a=()=>{n.requestPromise===r&&(n.requestPromise=null,n.requestAbort=null)};return n.requestPromise=r,r.then(a,a),!0}get isLeaf(){return null==this._children[0]}hasLij(e){return this.lij[0]===e[0]&&this.lij[1]===e[1]&&this.lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;if(this.isLeaf)return null;const t=this._children[0].findByLij(e)||this._children[1].findByLij(e)||this._children[2].findByLij(e)||this._children[3].findByLij(e);return t||null}distanceToSquared(e){return h(l(ae,this._center[pe.MIDDLE],e))}containsPoint(e){const t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){const i=this.extent;return e>=i[0]&&t>=i[1]&&e<=i[2]&&t<=i[3]}unrequestLayerData(e,t,i){const s=this.layerInfo[t][e],n=s.waitingAgents,r=null!=n.removeUnordered(i);B(r,"agent has not requested this piece of map data"),n.length<1&&(s.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,i){const s=this.layerInfo[t][e];s.data=i,s.dataInvalidated=!1,s.waitingAgents.forAll((e=>e.dataArrived(this))),s.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t,i){i.notInTilemap||console.error(`Tile ${this.lij.toString()} layer ${t}/${e} error ${i}`);const s=this.layerInfo[t][e];s.dataMissing=!0,s.waitingAgents.forAll((e=>e.dataMissing())),s.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t){switch(e){case b.MAP:return this._updateTexture(t);case b.ELEVATION:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(e===x.FADING?te.TEXTURE_NOFADING:te.TEXTURE_FADING),this.setPendingUpdate(e===x.FADING?te.TEXTURE_FADING:te.TEXTURE_NOFADING))}_updateGeometry(){this.setPendingUpdate(te.GEOMETRY);for(const e of this.layerInfo[b.ELEVATION])e.pendingUpdates|=te.GEOMETRY}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData(),this.restartAgents(t)}computeElevationBounds(){const e=this._elevationBounds;a(e,1/0,-1/0);const i=this.layerInfo[b.ELEVATION];let s=!0;for(const n of i)t(n.elevationBounds)&&(e[0]=Math.min(e[0],n.elevationBounds.min),e[1]=Math.max(e[1],n.elevationBounds.max),n.elevationBounds.hasNoDataValues||(s=!1));s&&(e[0]=Math.min(e[0],0),e[1]=Math.max(e[1],0)),this.updateRadiusAndCenter(),this._surface.setTileTreeDirty()}_updateCenter(){const e=this._elevationBounds,t=.5*(e[0]+e[1]);u(ae,this.up,t),c(this._center[pe.MIDDLE],this.centerAtSeaLevel,ae),u(ae,this.up,e[0]),c(this._center[pe.TOP],this.centerAtSeaLevel,ae),u(ae,this.up,e[1]),c(this._center[pe.BOTTOM],this.centerAtSeaLevel,ae)}findElevationBoundsForLayer(e,i){const n=this.layerInfo[b.ELEVATION][e];if(t(n.elevationBounds)&&n.elevationBounds.level>=i)return;const r=this._surface.layerViewByIndex(e,b.ELEVATION),a=P(r);if(!ie(this,a,!1))return;const o=ge;let l=!1;if(n.data){const e=n.data;o.min=e.bounds[0],o.max=e.bounds[1],o.hasNoDataValues=e.hasNoDataValues,o.level=this.level,l=!0}else{let t,i,s=0;for(let n=this._parent;n&&(!i||s<C(this.level))&&(s=this.vlevel-n.level,t=i||t,i=n.layerInfo[b.ELEVATION][e].data,!(!i&&t&&s>=C(this.level)));n=n.parent);i=i||t,i&&(i.computeMinMaxValue(this.lij[0],this.lij[1],this.lij[2],o),o.min!==1/0&&(o.level=i.level,l=!0))}l&&(s(n.elevationBounds)&&(n.elevationBounds=new M),n.elevationBounds.copyFrom(o))}modifyLayers(e,t,i){const s=this.layerInfo[i];for(const a of s)a.loadingAgent&&a.loadingAgent!==K&&(ue(a.loadingAgent),a.loadingAgent=null),a.waitingAgents.clear();for(let a=0;a<s.length;++a)void 0===e[a]&&s[a].release();const n=new Array(...s),r=t.length;s.length=r;for(let a=0;a<r;a++){const e=t[a];s[a]=e>-1?n[e]:Z.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,x.FADING))}updateAgents(e){if(this.renderData){const t=this.layerInfo[e];for(const e of t)e.loadingAgent===K&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(const e of O){const t=this._isSuspended(e);for(const i of this.layerInfo[e])i.loadingAgent&&i.loadingAgent!==K&&(i.loadingAgent.setSuspension(t),i.loadingAgent===K&&this.updateRenderData(e,x.FADING))}}removeLayerAgent(e,t){const i=this.layerInfo[t][e];i.loadingAgent&&i.loadingAgent!==K&&i.loadingAgent.dispose(),i.loadingAgent=null}agentDone(e,t){const i=this.layerInfo[t][e];i.loadingAgent=K,!i.data&&s(i.upsampleInfo)&&this._createOrUpdateAgents(e+1,t)}_hasBlendableAncestor(e){return"normal"!==e.blendMode||R(e.parent)&&this._hasBlendableAncestor(e.parent)}_hasBlendModes(e,t,i){for(let s=e;s<t;++s){const e=this._surface.layerViewByIndex(s,i);if(V(e)&&"normal"!==e?.layer?.blendMode||R(e?.layer?.parent)&&this._hasBlendableAncestor(e?.layer?.parent))return!0}return!1}_createOrUpdateAgents(e,t){const i=this.layerInfo[t];if(0===i.length)return;const s=this._isSuspended(t);for(let n=e;n<i.length;++n){const r=i[n];let a=!1;const o=this._surface.layerViewByIndex(n,t),l=P(o);if(r.loadingAgent?ie(this,l,!1)?(r.loadingAgent!==K&&r.loadingAgent.setSuspension(s),r.loadingAgent!==K&&(a=r.loadingAgent.update())):r.dispose():ie(this,l,!1)&&(r.loadingAgent=de(this,n,t,s),a=r.loadingAgent.startLoading(),a?r.loadingAgent===K&&this.setPendingUpdate(te.GEOMETRY):(ue(r.loadingAgent),r.loadingAgent=K)),r.loadingAgent===K&&this.updateRenderData(t,x.FADING),!this._hasBlendModes(e,i.length,t)&&a&&o.isOpaque)return}}_isWithinExtent(e){const t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){const t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationBasedVerticesPerSide(t){const i=this.vlevel-this.level,s=Math.max(this.level-t,C(this.level)-i);return e(1+(this.maxTesselation>>s),2,this.maxTesselation+1)}get test(){return{cachedMemory:this._cachedMemory}}_findLIJ(e,i){if(!e)return null;const s=this.surface.rootTiles;if(t(s))for(const t of s)if(me(t,e)){let s=t,n=e[0]-s.level-1;for(;n>=0&&!s.isLeaf&&!i(s);){const t=e[1]>>n&1,i=e[2]>>n&1;s=s.children[2*t+i],n--}return i(s)?s:null}return null}findNeighborTile(e,t){const i=this.lij,s=this.getNeighborLIJ(i,e);return s?_e(i,s)?t(this)?this:null:this._findLIJ(s,t):null}findCorner(e,t){const i=e===S.NORTH_EAST?1:e===S.NORTH_WEST?0:e===S.SOUTH_WEST?2:3;let s=this;for(;!(s.isLeaf||t&&t(s));)s=s.children[i];return s}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,(e=>t(e)||e.level===this.level))?.findCorner(G(e),t)}forAllSubtreeOnSide(e,t){const i=e===S.NORTH?[0,1]:e===S.NORTH_EAST?[1]:e===S.EAST?[1,3]:e===S.SOUTH_EAST?[3]:e===S.SOUTH?[2,3]:e===S.SOUTH_WEST?[2]:e===S.WEST?[0,2]:[0],s=e=>{t(e)||e.isLeaf||i.forEach((t=>s(e.children[t])))};s(this)}forallNeighbors(e){w.forEach((t=>this.findNeighborCornerTileExact(t,e))),W.forEach((t=>this.findNeighborTile(t,(t=>t.level===this.level||e(t)))?.forAllSubtreeOnSide(q(t),e)))}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;const i=this.level-t.level;if(H(!F||i>=0),0===i)return 0;const s=2**i,n=1==(1&e),r=n?0:1,a=t.lij[r+1]*s,o=this.lij[r+1],l=o-a,h=n?s-1-l:l;return F&&(H(a<=o&&o<a+s),H(0<=h&&h<s)),h}forEachLoadedNeighbor(e){const t=this.level,i=e=>e.level===t||e.isLoaded;W.forEach((t=>{const s=this.findNeighborTile(t,i);null!=s&&s!==this&&s.forAllSubtreeOnSide(q(t),(i=>!!i.isLoaded&&(e(i,t),!0)))})),w.forEach((t=>{const s=this.findNeighborTile(t,i)?.findCorner(G(t),(e=>e.isLoaded));H(!s||Te(this,s,t)),s?.isLoaded&&e(s,t)}))}getNeighborLIJ(e,t){const i=k(t)?-1:X(t)?1:0,s=Y(t)?-1:z(t)?1:0,n=[e[0],e[1]+i,e[2]+s];return n[1]<0?null:this.surface.isGlobal?this.wrapLIJ(n):n[2]<0?null:n}wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}get westNeighborWestExtent(){return this.extent[0]*(this.isWestEnd?-1:1)}get eastNeighborEastExtent(){return this.extent[2]*(this.isEastEnd?-1:1)}get isEastEnd(){return this.lij[2]===this.surface.lijEastEnd(this.level)-1}get isWestEnd(){return 0===this.lij[2]}get isNorthEnd(){return 0===this.lij[1]}get isSouthEnd(){return this.extent[1]+m()>=this.surface.extent[1]}compareLIJs(e){const t=this.lij,i=t[0],s=e[0];if(i===s)return[t,e];const n=i-s;if(n<0){const i=2**-n;return[[s,t[1]*i,t[2]*i],e]}{const s=2**n;return[t,[i,e[1]*s,e[2]*s]]}}checkGeometryWaterproofness(){J&&(H(this.isLoaded),this.renderData.checkGeometryWaterproofness())}shouldHaveNeighbor(e){const t=this.extent,i=this.surface.rootTilesExtent,s=.25*(t[2]-t[0]);if(k(e)&&t[3]+s>=i[3])return!1;if(X(e)&&t[1]-s<=i[1])return!1;const n=this.surface.isGlobal;return!(!n&&Y(e)&&t[0]-s<=i[0])&&!(!n&&z(e)&&t[2]+s>=i[2])}}function de(e,t,i,s){const n=i===b.ELEVATION?fe.acquire():ce.acquire();return n.init(e,t,i,s),n}function ue(e){e.dispose(),e instanceof I?fe.release(e):e instanceof N&&ce.release(e)}const ce=new n(N),fe=new n(I),ge=new M;var pe;function me(e,t){const i=e.level,s=t[0];if(i>s)return!1;const n=s-i,r=Math.floor(t[1]/2**n),a=Math.floor(t[2]/2**n);return r===e.lij[1]&&a===e.lij[2]}function _e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function ye(e,t,i){return Math.abs(e-t)<=i}function Ae(e,t,i){if(s(e)||s(t))return!1;if(0===e.level&&0===t.level){if(e.isEastEnd&&t.isWestEnd&&i===S.EAST)return!0;if(e.isWestEnd&&t.isEastEnd&&i===S.WEST)return!0}const n=Math.max(1e-6*(e.extent[2]-e.extent[0]),1);switch(i){case S.NORTH:return ye(e.extent[3],t.extent[1],n);case S.SOUTH:return ye(e.extent[1],t.extent[3],n);case S.EAST:return ye(e.extent[2],t.extent[0],n)||ye(e.extent[2],-t.extent[0],n);case S.WEST:return ye(e.extent[0],t.extent[2],n)||ye(e.extent[0],-t.extent[2],n)}}function Te(e,t,i){return!s(e)&&!s(t)&&t!==e&&(e.level>=t.level?Ee(e,t,i):Ee(t,e,G(i)))}function Ee(e,t,i){H(e.level>=t.level);const s=$(i),n=Q(i),r=e.extent,a=t.extent,o=[s?r[0]:r[2],n?r[3]:r[1]],l=[s?a[2]:a[0],n?a[1]:a[3]],h=1e-5*(r[2]-r[0]),d=ye(o[0],l[0],h)||e.surface.isGlobal&&ye(o[0],-l[0],h),u=ye(o[1],l[1],h);if(d&&u)return!0;if(e.level===t.level)return H(!1),!1;if(!d&&!u)return H(!1),!1;const c=d?ve(a[1],a[3],r[1],r[3],h):ve(a[0],a[2],r[0],r[2],h);return H(c),c}function ve(e,t,i,s,n=m()){return e-n<=i&&i<=s&&s<=t+n}!function(e){e[e.TOP=0]="TOP",e[e.MIDDLE=1]="MIDDLE",e[e.BOTTOM=2]="BOTTOM"}(pe||(pe={}));export{pe as CenterPosition,le as SplitLimits,he as Tile,ye as almostEquals,Te as isCornerNeighbor,Ae as isEdgeNeighbor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{disposeMaybe as t,releaseMaybe as r,isNone as s,isSome as o}from"../../../core/maybe.js";import{s as a,c as i}from"../../../chunks/vec2.js";import{Z as n}from"../../../chunks/vec2f64.js";import{isBaseLayer as c}from"../../../layers/support/layerUtils.js";import{ImageWithType as u}from"../support/StreamDataLoader.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{TextureUpdate as p}from"./interfaces.js";import{LayerClass as h}from"./LayerClass.js";import{isBlendableLayerView as d,isGroupLayer as m,isVectorTileLayerView as _,isVectorTileRenderInfo as f,isImageryTileRenderInfo as T,isRasterTileRenderInfo as y,isTextureTileRenderInfo as g}from"./terrainUtils.js";import{ActivationTime as b}from"./TextureFader.js";import{TextureReference as x}from"./TextureReference.js";import{TileCompositor as k}from"./TileCompositor.js";import I from"./TileTexture.js";import{TileUpdate as w}from"./TileUpdate.js";import{blendModeFromString as P}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{BaseOpacityMode as D,BlendLayersOutput as A}from"../webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{createColorTexture as E,createEmptyTexture as R}from"../webgl-engine/lib/glUtil3D.js";import{TextureSamplingMode as M,TextureType as L,PixelFormat as j,PixelType as C,TextureWrapMode as N}from"../../webgl/enums.js";import{Texture as O}from"../../webgl/Texture.js";class U{constructor(e,t,r,s){this.start=e,this.end=t,this.blendMode=r,this.opacity=s}}class B{constructor(e,t,r){this._rctx=e,this.tileSize=t,this._techniqueRepository=r,this._passParameters=new l,this._backgroundTexture=null,this._backgroundColor=null,this._backgroundDirty=!1,this._blackTex=null,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._composition=new k(this._rctx,this._techniqueRepository),this._blackTex=new I(E(this._rctx,[0,0,0,1])),this._ensureBackgroundTexture(this.tileSize)}dispose(){this._composition=t(this._composition),this._backgroundTexture=r(this._backgroundTexture),this._blackTex=r(this._blackTex)}get backgroundIsGrid(){return s(this._backgroundColor)}get backgroundColor(){return this._backgroundColor}updateTileTexture(e,t){if(!e.renderData)return;const r=e.surface,s=r.baseOpacity;let a=0,i=0,n=this.tileSize,u=!1;const l=r.view.state.pixelRatio;let p=!1;V.clear(),Y.length=0;const f=e.layerInfo[h.MAP];let T=f.length,y=0;for(;y<f.length;y++){const t=r.layerViewByIndex(y,h.MAP),g=t.layer.opacity;z[y]=g;const b=t.fullOpacity;if(X[y]=b,c(t.layer)&&T>=f.length&&(T=y),0===g){f[y].pendingUpdates&=~(w.TEXTURE_NOFADING&w.TEXTURE_FADING);continue}++i;const x=F(e,y);if(x){if(f[y].pendingUpdates&=~(w.TEXTURE_NOFADING&w.TEXTURE_FADING),d(t)){v[y]=t.layer.blendMode;let e="normal"!==t.layer.blendMode;if(m(t.layer.parent)){const r=S(t.layer.parent);o(r)&&""!==r&&(e=q(t.layer.parent,y)||e)}e&&(p=e,u=!1)}_(t)?n=Math.max(n,this.tileSize*l):1===s&&1===b&&(t.isOpaque||this._dataToTexture(x)&&x.sourceLayerInfo.data.descriptor.isOpaque)&&(u=!0),++a}}n=G(n);const g=n/this.tileSize,b=y-1;this._ensureBackgroundTexture(this.tileSize),0!==a?1===a&&!p&&this._useLayerTexture(e,b,T,X[b])||this._composeMapLayers(e,t,b,T,z,v,n,g,!u||p,V):this._useBackgroundTexture(e,i)}_ensureBackgroundTexture(e){s(this._backgroundTexture)&&(this._backgroundTexture=this._buildTexture(e),this._backgroundDirty=!0),this._backgroundDirty&&(this._composition.bind(e),this._passParameters.offset=n,this._passParameters.scale=1,this._passParameters.opacity=1,o(this.backgroundColor)&&(this._passParameters.backgroundColor=this.backgroundColor),this._composition.drawBackground(this._passParameters,o(this.backgroundColor)),this._composition.copyFBOToTexture(this._backgroundTexture),this._composition.unbind(),this._backgroundDirty=!1)}_useBackgroundTexture(e,t){let r=b.Immediate;(e.surface.view.layerViewManager.updating||t>0)&&(r=b.Delayed),this._backgroundTexture&&s(e.renderData.textureReference)&&(r=b.Immediate),e.renderData.setTextureReference(o(this._backgroundTexture)?new x(this._backgroundTexture,p.FADING,H,e.surface.baseOpacity,0,1):null,r)}_useLayerTexture(e,t,r,s){const o=t<r,a=o?1:e.surface.baseOpacity,i=o?e.surface.baseOpacity:1,n=F(e,t);return!!this._dataToTexture(n)&&(e.renderData.setTextureReference(new x(n.sourceLayerInfo.data,p.FADING,n,a,i,s)),!0)}_composeMapLayers(e,t,r,s,o,a,i,c,u,l){this._composition.ensureBuffer(i);const p=e.surface.baseOpacity;let h=!1,d=M.LINEAR_MIPMAP_LINEAR,m=!1,_=0;for(let g=r;g>=0;g--){const t=F(e,g);if(!t)continue;if(0===o[g])continue;const r=g<s&&p<1&&!h;this._passParameters.baseOpacity=r?p:1;const y=this._passParameters.baseOpacity<1?D.Required:D.NotRequired;r&&(h=!0);let b=!1;l.forEach((e=>{e.start===g&&(Y.push(e),this._composition.openGroup(i),b=!0)}));const x=0===_,k=b?A.GroupBackgroundComposite:u&&x?this.backgroundIsGrid?A.GridComposite:A.ColorComposite:A.Composite,I=P[a[g]];for(f(t)?(this._passParameters.opacity=o[g],m=this._composition.drawVectorData(this._passParameters,k,i,I,y,t,c,this.tileSize,m)):T(t)?(this._passParameters.opacity=o[g],this._composition.drawImageryTileData(this._passParameters,k,i,I,y,t),this._hasNearestInterpolation(t)&&(d=M.NEAREST)):this._dataToTexture(t)&&(this._passParameters.texture=t.sourceLayerInfo.data.texture,this._passParameters.offset=t.offset,this._passParameters.scale=t.scale,this._passParameters.opacity=o[g],this._composition.drawRasterData(this._passParameters,k,i,I,y));Y.length>0&&Y[Y.length-1].end===g;){const e=Y.pop();this._passParameters.opacity=e.opacity,this._passParameters.offset=n,this._passParameters.scale=1;const t=u&&x?this.backgroundIsGrid?A.GridComposite:A.ColorComposite:A.Composite;this._composition.drawGroup(this._passParameters,t,i,P[e.blendMode],y)}_++}const y=e.renderData.ensureTexture(i,(()=>this._buildTexture(i,d)));this._composition.copyFBOToTexture(y),this._composition.unbind(),e.renderData.setTextureReference(new x(y,t,H,h?1:p,0,1))}_hasNearestInterpolation(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}_dataToTexture(e){if(y(e)){const t=e.sourceLayerInfo;t.data=this._buildTexture(t.data),e.tile.setMemoryDirty()}return g(e)}setBackground(e){this._backgroundColor!==e&&(this._backgroundColor=e,this._backgroundDirty=!0)}_buildTexture(e,t=M.LINEAR_MIPMAP_LINEAR){if(s(e))return null;const r={target:L.TEXTURE_2D,pixelFormat:j.RGBA,dataType:C.UNSIGNED_BYTE,wrapMode:N.CLAMP_TO_EDGE,samplingMode:t,maxAnisotropy:this._maxAnisotropy,flipped:!0,hasMipmap:!0},o=this._rctx;let a;if("number"==typeof e)r.width=r.height=e,a=new I(new O(o,r));else if(e instanceof u)r.isOpaque=e.isOpaque,a=new I(new O(o,r,e.image)),e.release();else try{r.width=e.width,r.height=e.height,a=new I(new O(o,r,e))}catch(n){a=new I(R(o)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const i=o.bindTexture(a.texture,O.TEXTURE_UNIT_FOR_UPDATES);return a.generateMipmap(),o.bindTexture(i,O.TEXTURE_UNIT_FOR_UPDATES),a}get test(){return{backgroundTexture:this._backgroundTexture}}}function G(t){const r=e(t),s=r*r,o=t*t;if(s===o)return t;const a=r/2;return s-o<o-a*a?r:a}function F(e,t){Z.layerIndex=t;const r=e.layerInfo[h.MAP][t];if(o(r.data))return a(Z.offset,0,0),Z.tile=e,Z.scale=1,Z.sourceLod=e.lij,Z.sourceLayerInfo=r,Z;const s=r.upsampleInfo;if(o(s)){const e=s.tile.layerInfo[h.MAP][t];return Z.tile=s.tile,i(Z.offset,s.offset),Z.scale=s.scale,Z.sourceLod=s.tile.lij,Z.sourceLayerInfo=e,Z}return null}function S(e){return e.get("uid")}function q(e,t){let r="normal"!==e.blendMode;m(e.parent)&&(r=q(e.parent,t)||r);const s=S(e);return o(s)&&""!==s&&(V.has(s)?V.get(s).start=t:V.set(s,new U(t,t,e.blendMode,e.opacity))),r}const z=new Array,X=new Array,v=new Array,V=new Map,Y=new Array,Z={tile:null,sourceLayerInfo:null,sourceLod:null,offset:[0,0],scale:1,layerIndex:0},H={offset:[0,0],scale:1};export{U as GroupInfo,B as TileRenderer};
5
+ import{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{disposeMaybe as t,releaseMaybe as r,isNone as s,isSome as o}from"../../../core/maybe.js";import{s as a,c as i}from"../../../chunks/vec2.js";import{Z as n}from"../../../chunks/vec2f64.js";import{isBaseLayer as c}from"../../../layers/support/layerUtils.js";import{ImageWithType as u}from"../support/StreamDataLoader.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{TextureUpdate as p}from"./interfaces.js";import{LayerClass as h}from"./LayerClass.js";import{isBlendableLayerView as d,isGroupLayer as m,isVectorTileLayerView as _,isVectorTileRenderInfo as f,isImageryTileRenderInfo as y,isRasterTileRenderInfo as T,isTextureTileRenderInfo as g}from"./terrainUtils.js";import{ActivationTime as b}from"./TextureFader.js";import{TextureReference as x}from"./TextureReference.js";import{TileCompositor as k}from"./TileCompositor.js";import I from"./TileTexture.js";import{TileUpdate as w}from"./TileUpdate.js";import{blendModeFromString as P}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{BaseOpacityMode as D,BlendLayersOutput as A}from"../webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{createColorTexture as E,createEmptyTexture as R}from"../webgl-engine/lib/glUtil3D.js";import{TextureSamplingMode as M,TextureType as L,PixelFormat as j,PixelType as C,TextureWrapMode as N}from"../../webgl/enums.js";import{Texture as O}from"../../webgl/Texture.js";class U{constructor(e,t,r,s){this.start=e,this.end=t,this.blendMode=r,this.opacity=s}}class B{constructor(e,t,r){this._rctx=e,this.tileSize=t,this._techniqueRepository=r,this._passParameters=new l,this._backgroundTexture=null,this._backgroundColor=null,this._backgroundDirty=!1,this._blackTex=null,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._composition=new k(this._rctx,this._techniqueRepository),this._blackTex=new I(E(this._rctx,[0,0,0,1])),this._ensureBackgroundTexture(this.tileSize)}dispose(){this._composition=t(this._composition),this._backgroundTexture=r(this._backgroundTexture),this._blackTex=r(this._blackTex)}get backgroundIsGrid(){return s(this._backgroundColor)}get backgroundColor(){return this._backgroundColor}updateTileTexture(e,t){if(!e.renderData)return;const r=e.surface,s=r.baseOpacity;let a=0,i=0,n=this.tileSize,u=!1;const l=r.view.state.pixelRatio;let p=!1;Y.clear(),Z.length=0;const f=e.layerInfo[h.MAP];let y=f.length,T=0;for(;T<f.length;T++){const t=r.layerViewByIndex(T,h.MAP),g=t.layer.opacity;X[T]=g;const b=t.fullOpacity;if(v[T]=b,c(t.layer)&&y>=f.length&&(y=T),d(t)){V[T]=t.layer.blendMode;let e="normal"!==t.layer.blendMode;if(m(t.layer.parent)){const r=S(t.layer.parent);o(r)&&""!==r&&(e=q(t.layer.parent)||e)}e&&(p=e,u=!1)}if(0===g&&!p){f[T].pendingUpdates&=~(w.TEXTURE_NOFADING&w.TEXTURE_FADING);continue}++i;const x=F(e,T);if(x){if(f[T].pendingUpdates&=~(w.TEXTURE_NOFADING&w.TEXTURE_FADING),m(t.layer.parent)){const e=S(t.layer.parent);o(e)&&""!==e&&z(t.layer.parent,T)}_(t)?n=Math.max(n,this.tileSize*l):1===s&&1===b&&(t.isOpaque||this._dataToTexture(x)&&x.sourceLayerInfo.data.descriptor.isOpaque)&&(u=!0),++a}}n=G(n);const g=n/this.tileSize,b=T-1;this._ensureBackgroundTexture(this.tileSize),0!==a?1===a&&!p&&this._useLayerTexture(e,b,y,v[b])||this._composeMapLayers(e,t,b,y,X,V,n,g,!u||p,Y,p):this._useBackgroundTexture(e,i)}_ensureBackgroundTexture(e){s(this._backgroundTexture)&&(this._backgroundTexture=this._buildTexture(e),this._backgroundDirty=!0),this._backgroundDirty&&(this._composition.bind(e),this._passParameters.offset=n,this._passParameters.scale=1,this._passParameters.opacity=1,o(this.backgroundColor)&&(this._passParameters.backgroundColor=this.backgroundColor),this._composition.drawBackground(this._passParameters,o(this.backgroundColor)),this._composition.copyFBOToTexture(this._backgroundTexture),this._composition.unbind(),this._backgroundDirty=!1)}_useBackgroundTexture(e,t){let r=b.Immediate;(e.surface.view.layerViewManager.updating||t>0)&&(r=b.Delayed),this._backgroundTexture&&s(e.renderData.textureReference)&&(r=b.Immediate),e.renderData.setTextureReference(o(this._backgroundTexture)?new x(this._backgroundTexture,p.FADING,J,e.surface.baseOpacity,0,1):null,r)}_useLayerTexture(e,t,r,s){const o=t<r,a=o?1:e.surface.baseOpacity,i=o?e.surface.baseOpacity:1,n=F(e,t);return!!this._dataToTexture(n)&&(e.renderData.setTextureReference(new x(n.sourceLayerInfo.data,p.FADING,n,a,i,s)),!0)}_composeMapLayers(e,t,r,s,o,a,i,c,u,l,p){this._composition.ensureBuffer(i);const h=e.surface.baseOpacity;let d=!1,m=M.LINEAR_MIPMAP_LINEAR,_=!1,T=0;for(let b=r;b>=0;b--){const t=F(e,b);if(!t)continue;if(0===o[b]&&!p)continue;const r=b<s&&h<1&&!d;this._passParameters.baseOpacity=r?h:1;const g=this._passParameters.baseOpacity<1?D.Required:D.NotRequired;r&&(d=!0);let x=!1;l.forEach((e=>{e.start===b&&(Z.push(e),this._composition.openGroup(i),x=!0)}));const k=0===T,I=x?A.GroupBackgroundComposite:u&&k?this.backgroundIsGrid?A.GridComposite:A.ColorComposite:A.Composite,w=P[a[b]];for(f(t)?(this._passParameters.opacity=o[b],_=this._composition.drawVectorData(this._passParameters,I,i,w,g,t,c,this.tileSize,_)):y(t)?(this._passParameters.opacity=o[b],this._composition.drawImageryTileData(this._passParameters,I,i,w,g,t),this._hasNearestInterpolation(t)&&(m=M.NEAREST)):this._dataToTexture(t)&&(this._passParameters.texture=t.sourceLayerInfo.data.texture,this._passParameters.offset=t.offset,this._passParameters.scale=t.scale,this._passParameters.opacity=o[b],this._composition.drawRasterData(this._passParameters,I,i,w,g));Z.length>0&&Z[Z.length-1].end===b;){const e=Z.pop();this._passParameters.opacity=e.opacity,this._passParameters.offset=n,this._passParameters.scale=1;const t=u&&k?this.backgroundIsGrid?A.GridComposite:A.ColorComposite:A.Composite;this._composition.drawGroup(this._passParameters,t,i,P[e.blendMode],g)}T++}const g=e.renderData.ensureTexture(i,(()=>this._buildTexture(i,m)));this._composition.copyFBOToTexture(g),this._composition.unbind(),e.renderData.setTextureReference(new x(g,t,J,d?1:h,0,1))}_hasNearestInterpolation(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}_dataToTexture(e){if(T(e)){const t=e.sourceLayerInfo;t.data=this._buildTexture(t.data),e.tile.setMemoryDirty()}return g(e)}setBackground(e){this._backgroundColor!==e&&(this._backgroundColor=e,this._backgroundDirty=!0)}_buildTexture(e,t=M.LINEAR_MIPMAP_LINEAR){if(s(e))return null;const r={target:L.TEXTURE_2D,pixelFormat:j.RGBA,dataType:C.UNSIGNED_BYTE,wrapMode:N.CLAMP_TO_EDGE,samplingMode:t,maxAnisotropy:this._maxAnisotropy,flipped:!0,hasMipmap:!0},o=this._rctx;let a;if("number"==typeof e)r.width=r.height=e,a=new I(new O(o,r));else if(e instanceof u)r.isOpaque=e.isOpaque,a=new I(new O(o,r,e.image)),e.release();else try{r.width=e.width,r.height=e.height,a=new I(new O(o,r,e))}catch(n){a=new I(R(o)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const i=o.bindTexture(a.texture,O.TEXTURE_UNIT_FOR_UPDATES);return a.generateMipmap(),o.bindTexture(i,O.TEXTURE_UNIT_FOR_UPDATES),a}get test(){return{backgroundTexture:this._backgroundTexture}}}function G(t){const r=e(t),s=r*r,o=t*t;if(s===o)return t;const a=r/2;return s-o<o-a*a?r:a}function F(e,t){H.layerIndex=t;const r=e.layerInfo[h.MAP][t];if(o(r.data))return a(H.offset,0,0),H.tile=e,H.scale=1,H.sourceLod=e.lij,H.sourceLayerInfo=r,H;const s=r.upsampleInfo;if(o(s)){const e=s.tile.layerInfo[h.MAP][t];return H.tile=s.tile,i(H.offset,s.offset),H.scale=s.scale,H.sourceLod=s.tile.lij,H.sourceLayerInfo=e,H}return null}function S(e){return e.get("uid")}function q(e){let t="normal"!==e.blendMode;return m(e.parent)&&(t=q(e.parent)||t),t}function z(e,t){m(e.parent)&&z(e.parent,t);const r=S(e);o(r)&&""!==r&&(Y.has(r)?Y.get(r).start=t:Y.set(r,new U(t,t,e.blendMode,e.opacity)))}const X=new Array,v=new Array,V=new Array,Y=new Map,Z=new Array,H={tile:null,sourceLayerInfo:null,sourceLod:null,offset:[0,0],scale:1,layerIndex:0},J={offset:[0,0],scale:1};export{U as GroupInfo,B as TileRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{isNone as t,isSome as o,unwrap as r,applySome as n}from"../../../../../core/maybe.js";import i from"../../../../../core/PooledArray.js";import{e as s,t as a}from"../../../../../chunks/mat3.js";import{c}from"../../../../../chunks/mat3f32.js";import{d as m,p as l,t as f}from"../../../../../chunks/vec3.js";import{a as p,c as h}from"../../../../../chunks/vec3f64.js";import{c as b}from"../../../../../chunks/vec4f32.js";import{a as u}from"../../../../../chunks/vec32.js";import{c as d}from"../../../../../chunks/vec33.js";import{ViewingMode as g}from"../../../../ViewingMode.js";import{computeOffsetObb as y}from"../../../layers/i3s/I3SUtil.js";import{ColorMixModeEnum as j,encodeSymbolColor as C}from"../../../layers/support/symbolColorUtils.js";import{clone as v,radius as _}from"../../../support/orientedBoundingBox.js";import{glLayout as w}from"../../../support/buffer/glUtil.js";import{newLayout as M}from"../../../support/buffer/InterleavedLayout.js";import O from"./ComponentData.js";import{State as x,ComponentObject as A}from"./ComponentObject.js";import D from"./IntersectionGeometry.js";import{Renderable as S}from"./Renderable.js";import{RenderGeometry as I}from"./RenderGeometry.js";import{RenderSubmitSystem as P}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as E}from"./SourceGeometry.js";import{ComponentParametersVarying as L,ComponentParametersUniform as R,ComponentParameterSummary as U,ComponentMaterial as k}from"./Material/ComponentMaterial.js";import{attributeLocations as T}from"./Material/ComponentTechnique.js";import{encodeElevationOffset as B}from"./Material/shader/ComponentData.glsl.js";import{getVisibility as V,updateVisibilityWithCount as G}from"../../lib/ComponentUtils.js";import{assert as N}from"../../lib/Util.js";import{VertexAttribute as q}from"../../lib/VertexAttribute.js";import{getVerticalOffsetI3S as H}from"../../lib/verticalOffsetUtils.js";import{EdgeInputBufferLayout as z}from"../../lib/edgeRendering/bufferLayouts.js";import{extractComponentsEdgeLocationsLayout as W}from"../../lib/edgeRendering/edgeProcessing.js";import{BufferManager as X}from"../../lib/TextureBackedBuffer/BufferManager.js";import{BufferObject as Y}from"../../../../webgl/BufferObject.js";import{Usage as F,PrimitiveType as J}from"../../../../webgl/enums.js";import{VertexArrayObject as K}from"../../../../webgl/VertexArrayObject.js";const Q=e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class Z{constructor(e,t){this._renderManager=e,this._viewingMode=t,this._objects=[new i,new i],this._renderSubmit=new P(this),this._renderManager.register(this._renderSubmit),this._hasObjectAndLayerId=has("enable-feature:objectAndLayerId-rendering"),this._componentBufferManager=new X(e.rctx,2+(this._hasObjectAndLayerId?1:0))}dispose(){N(0===this._objects[x.Hidden].length&&0===this._objects[x.Visible].length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy()}createObject(e){const t=new A;return t.toMapSpace=e.toMapSpace,t.transform=e.transform,t.obb=v(e.obb),t.components=new O(this._componentBufferManager,e.geometry.componentOffsets),t.renderable=this._createRenderable(e,t.components),t.intersectionGeometry=new D(e.geometry.positionData,t.components),this._objects[t.visible].push(t),t}destroyObject(e){const t=e;this._objects[t.visible].removeUnordered(t),t.dispose(),this._notifyDirty()}setObjectVisibility(e,t){const o=e;t!==o.visible&&(this._objects[o.visible].removeUnordered(o),this._objects[t].push(o),o.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll((e=>e.renderable.meta.cameraDepthSquared=m(t,e.obb.center)))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const o=e.renderable.material;t(o),o.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const o=e;o.components.visibility.reset(t),o.components.visibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.components.visibility.forEachComponent(t)}getComponentCount(e){const t=e,o=t.components.visibility.componentCount();return{visible:o,invisible:t.components.count-o}}setComponentData(e,r){const n=e,i=n.renderable.material,s=n.components,a=s.materialDataBuffer,c=s.materialDataIndices,m={castShadows:!0,pickable:!0,externalColor:b(),externalColorMixMode:j.Multiply,elevationOffset:0,objectAndLayerIdColor:this._hasObjectAndLayerId?b():null},l=a.textureBuffer,f=new Uint8Array(4),p=new Uint32Array(f.buffer);let h=0,u=0,d=0,g=s.verticalOffsets,_=1/0,w=-1/0,M=!1,O=!1,x=0;for(let b=0;b<s.count;b++){if(r(b,m),h+=+(m.externalColor[3]<1),u+=+(m.externalColorMixMode===j.Replace&&1===m.externalColor[3]),d+=+m.castShadows,C(m.externalColor,m.externalColorMixMode,f),f[2]=254&f[2]|+m.castShadows,l.setData(c[b],0,f[0],f[1],f[2],f[3]),M||(M=b>0&&x!==p[0]),x=p[0],O||(O=0!==m.elevationOffset),O&&t(g)&&(g=new Array(b).fill(0)),o(g)&&(g[b]=m.elevationOffset),_=Math.min(_,m.elevationOffset),w=Math.max(w,m.elevationOffset),B(m.elevationOffset,f),l.setData(c[b],1,f[0],f[1],f[2],f[3]),this._hasObjectAndLayerId){const e=m.objectAndLayerIdColor;l.setData(c[b],2,e[0],e[1],e[2],e[3])}m.pickable!==V(s.pickability,b)&&(s.pickability=G(s.pickability,s.count,b,m.pickable))}s.verticalOffsets=O?g:null,n.offsetObb=O?y(n.obb,_,w,this._viewingMode,o(n.offsetObb)?n.offsetObb:v(n.obb)):null,M||O||this._hasObjectAndLayerId?(i.componentParameters=new L,i.componentParameters.castShadows=ee(d,s.count),i.componentParameters.transparent=ee(h,s.count),i.componentParameters.opaqueOverride=ee(u,s.count),i.componentParameters.texture=l,l.updateTexture()):(i.componentParameters=new R,i.componentParameters.castShadows=m.castShadows?U.All:U.None,i.componentParameters.externalColor=m.externalColor,i.componentParameters.externalColorMixMode=m.externalColorMixMode),this._notifyDirty()}getComponentAabb(e,o,n,i=!1){e.intersectionGeometry.getComponentAabb(o,n);const s=e,a=s.components.verticalOffsets;if(i||t(a))return n;const c=a[o];if(this._viewingMode===g.Local||0===c)return n[2]+=c,n[5]+=c,n;const m=r(H(c));return m.localOrigin=s.transform.position,m.applyToAabb(n)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,o){return e.intersectionGeometry.getComponentPositions(t,o)}intersect(e,t,r,n,i,c){const m=e;o(i)&&(i.localOrigin=m.transform.position);const p=s(te,m.transform.rotationScale);l(oe,t,m.transform.position),l(re,r,m.transform.position),f(oe,oe,p),f(re,re,p);const h=a(te,p);return m.intersectionGeometry.intersect(oe,re,n,h,i,m.components.verticalOffsets,c)}addEdges(e,t,o,r){const n=e,{indices:i,positions:s}=n.intersectionGeometry,a=n.components.offsets;return t.addComponentObject(e,n.transform,{center:n.obb.center,radius:_(n.obb)},s,i,a,o,r)}async extractEdgeInformation(e,t,o){const r=e,n=r.components.visibility;if(n.allInvisible())return{buffer:W.createBuffer(0),origin:[0,0,0]};const{indices:i,positions:s}=r.intersectionGeometry,a=r.components.offsets,c=z.createBuffer(s.count);d(c.position,s),u(c.position,c.position,r.transform.rotationScale),this._setComponentIndices(c.componentIndex,i,a);const m=c.count,l=this._computeVisibilityIndices(i,n,a,m);return{origin:p(r.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:l,indicesLength:l.length,skipDeduplicate:!0,data:c,writerSettings:{reducedPrecision:!1,variants:0}},o)}}_setComponentIndices(e,t,o){let r=0;for(let n=0;n<o.length-1;n++){const i=o[n],s=o[n+1];for(let o=i;o<s;o++){const n=t?t[o]:o;e.set(n,r)}r++}}_computeVisibilityIndices(e,t,o,r){if(e&&t.allVisible())return e;let n=0;t.forEachComponentRange(((e,t)=>(n+=o[t]-o[e],!0)));const i=Array.isArray(e)?new Array(n):2===e?.BYTES_PER_ELEMENT||r<=65536?new Uint16Array(n):new Uint32Array(n);let s=0;return t.forEachComponentRange(((t,r)=>{const n=o[t],a=o[r];for(let o=n;o<a;o++)i[s++]=e?e[o]:o;return!0})),i}addComponentHighlight(e,o){const r=e.components;t(r.highlightCounts)&&(r.highlightCounts=new Uint32Array(r.count+1));0===r.highlightCounts[o]++&&(r.highlightsDirty(),this._notifyDirty()),r.highlightCounts[r.count]++}removeComponentHighlight(e,o){const r=e.components;if(t(r.highlightCounts))return void Q.warn("Removing non-existing highlight.");const n=r.highlightCounts[o],i=r.highlightCounts[r.count];if(0!==n){if(n>1)return r.highlightCounts[o]=n-1,void(r.highlightCounts[r.count]=i-1);r.highlightCounts[o]=0,r.highlightsDirty(),this._notifyDirty(),1===i?r.highlightCounts=null:r.highlightCounts[r.count]=i-1}else Q.warn("Removing non-existing highlight.")}clearHighlights(e){const t=e.components;o(t.highlightCounts)&&(t.highlightCounts=null,t.highlightsDirty(),this._notifyDirty())}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._objects[x.Visible]}_createRenderable(e,t){const i=this._renderManager.rctx,s=e.geometry,a=s.vertices.layoutParameters,c=Y.createVertex(i,F.STATIC_DRAW,s.vertices.data),m=n(s.indices,(e=>Y.createIndex(i,F.STATIC_DRAW,e))),l=w(E(a)),f=new Uint16Array(s.vertices.count);for(let r=0;r<t.count;r++){const e=t.offsets[r],n=t.offsets[r+1],i=t.materialDataIndices[r];if(o(s.indices))for(let t=e;t<n;t++){f[s.indices[t]]=i}else for(let t=e;t<n;t++)f[t]=i}const p=Y.createVertex(i,F.STATIC_DRAW,f.buffer),h=new k(e.transform,e.toMapSpace),b=new K(i,T,{data:l,componentIndices:$},{data:c,componentIndices:p},r(m)),u=new I(b,J.TRIANGLES,a,o(m)),d={cameraDepthSquared:.5,gpuMemoryEstimate:c.byteSize+p.byteSize+(o(m)?m.byteSize:0)};return new S(h,u,d)}_notifyDirty(){this._renderManager.notifyDirty()}}const $=w(M().u16(q.COMPONENTINDEX));function ee(e,t){return e===t?U.All:0===e?U.None:U.Some}const te=c(),oe=h(),re=h();export{Z as ComponentObjectCollection};
5
+ import has from"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{isNone as t,isSome as o,unwrap as r,applySome as n}from"../../../../../core/maybe.js";import i from"../../../../../core/PooledArray.js";import{e as s,t as a}from"../../../../../chunks/mat3.js";import{c}from"../../../../../chunks/mat3f32.js";import{d as m,y as l,t as f}from"../../../../../chunks/vec3.js";import{a as p,c as h}from"../../../../../chunks/vec3f64.js";import{c as b}from"../../../../../chunks/vec4f32.js";import{a as u}from"../../../../../chunks/vec32.js";import{c as d}from"../../../../../chunks/vec33.js";import{ViewingMode as g}from"../../../../ViewingMode.js";import{computeOffsetObb as y}from"../../../layers/i3s/I3SUtil.js";import{ColorMixModeEnum as j,encodeSymbolColor as C}from"../../../layers/support/symbolColorUtils.js";import{clone as v,radius as _}from"../../../support/orientedBoundingBox.js";import{glLayout as w}from"../../../support/buffer/glUtil.js";import{newLayout as M}from"../../../support/buffer/InterleavedLayout.js";import O from"./ComponentData.js";import{State as x,ComponentObject as A}from"./ComponentObject.js";import D from"./IntersectionGeometry.js";import{Renderable as S}from"./Renderable.js";import{RenderGeometry as I}from"./RenderGeometry.js";import{RenderSubmitSystem as P}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as E}from"./SourceGeometry.js";import{ComponentParametersVarying as L,ComponentParametersUniform as R,ComponentParameterSummary as U,ComponentMaterial as k}from"./Material/ComponentMaterial.js";import{attributeLocations as T}from"./Material/ComponentTechnique.js";import{encodeElevationOffset as B}from"./Material/shader/ComponentData.glsl.js";import{getVisibility as V,updateVisibilityWithCount as G}from"../../lib/ComponentUtils.js";import{assert as N}from"../../lib/Util.js";import{VertexAttribute as q}from"../../lib/VertexAttribute.js";import{getVerticalOffsetI3S as H}from"../../lib/verticalOffsetUtils.js";import{EdgeInputBufferLayout as z}from"../../lib/edgeRendering/bufferLayouts.js";import{extractComponentsEdgeLocationsLayout as W}from"../../lib/edgeRendering/edgeProcessing.js";import{BufferManager as X}from"../../lib/TextureBackedBuffer/BufferManager.js";import{BufferObject as Y}from"../../../../webgl/BufferObject.js";import{Usage as F,PrimitiveType as J}from"../../../../webgl/enums.js";import{VertexArrayObject as K}from"../../../../webgl/VertexArrayObject.js";const Q=e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class Z{constructor(e,t){this._renderManager=e,this._viewingMode=t,this._objects=[new i,new i],this._renderSubmit=new P(this),this._renderManager.register(this._renderSubmit),this._hasObjectAndLayerId=has("enable-feature:objectAndLayerId-rendering"),this._componentBufferManager=new X(e.rctx,2+(this._hasObjectAndLayerId?1:0))}dispose(){N(0===this._objects[x.Hidden].length&&0===this._objects[x.Visible].length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy()}createObject(e){const t=new A;return t.toMapSpace=e.toMapSpace,t.transform=e.transform,t.obb=v(e.obb),t.components=new O(this._componentBufferManager,e.geometry.componentOffsets),t.renderable=this._createRenderable(e,t.components),t.intersectionGeometry=new D(e.geometry.positionData,t.components),this._objects[t.visible].push(t),t}destroyObject(e){const t=e;this._objects[t.visible].removeUnordered(t),t.dispose(),this._notifyDirty()}setObjectVisibility(e,t){const o=e;t!==o.visible&&(this._objects[o.visible].removeUnordered(o),this._objects[t].push(o),o.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll((e=>e.renderable.meta.cameraDepthSquared=m(t,e.obb.center)))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const o=e.renderable.material;t(o),o.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const o=e;o.components.visibility.reset(t),o.components.visibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.components.visibility.forEachComponent(t)}getComponentCount(e){const t=e,o=t.components.visibility.componentCount();return{visible:o,invisible:t.components.count-o}}setComponentData(e,r){const n=e,i=n.renderable.material,s=n.components,a=s.materialDataBuffer,c=s.materialDataIndices,m={castShadows:!0,pickable:!0,externalColor:b(),externalColorMixMode:j.Multiply,elevationOffset:0,objectAndLayerIdColor:this._hasObjectAndLayerId?b():null},l=a.textureBuffer,f=new Uint8Array(4),p=new Uint32Array(f.buffer);let h=0,u=0,d=0,g=s.verticalOffsets,_=1/0,w=-1/0,M=!1,O=!1,x=0;for(let b=0;b<s.count;b++){if(r(b,m),h+=+(m.externalColor[3]<1),u+=+(m.externalColorMixMode===j.Replace&&1===m.externalColor[3]),d+=+m.castShadows,C(m.externalColor,m.externalColorMixMode,f),f[2]=254&f[2]|+m.castShadows,l.setData(c[b],0,f[0],f[1],f[2],f[3]),M||(M=b>0&&x!==p[0]),x=p[0],O||(O=0!==m.elevationOffset),O&&t(g)&&(g=new Array(b).fill(0)),o(g)&&(g[b]=m.elevationOffset),_=Math.min(_,m.elevationOffset),w=Math.max(w,m.elevationOffset),B(m.elevationOffset,f),l.setData(c[b],1,f[0],f[1],f[2],f[3]),this._hasObjectAndLayerId){const e=m.objectAndLayerIdColor;l.setData(c[b],2,e[0],e[1],e[2],e[3])}m.pickable!==V(s.pickability,b)&&(s.pickability=G(s.pickability,s.count,b,m.pickable))}s.verticalOffsets=O?g:null,n.offsetObb=O?y(n.obb,_,w,this._viewingMode,o(n.offsetObb)?n.offsetObb:v(n.obb)):null,M||O||this._hasObjectAndLayerId?(i.componentParameters=new L,i.componentParameters.castShadows=ee(d,s.count),i.componentParameters.transparent=ee(h,s.count),i.componentParameters.opaqueOverride=ee(u,s.count),i.componentParameters.texture=l,l.updateTexture()):(i.componentParameters=new R,i.componentParameters.castShadows=m.castShadows?U.All:U.None,i.componentParameters.externalColor=m.externalColor,i.componentParameters.externalColorMixMode=m.externalColorMixMode),this._notifyDirty()}getComponentAabb(e,o,n,i=!1){e.intersectionGeometry.getComponentAabb(o,n);const s=e,a=s.components.verticalOffsets;if(i||t(a))return n;const c=a[o];if(this._viewingMode===g.Local||0===c)return n[2]+=c,n[5]+=c,n;const m=r(H(c));return m.localOrigin=s.transform.position,m.applyToAabb(n)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,o){return e.intersectionGeometry.getComponentPositions(t,o)}intersect(e,t,r,n,i,c){const m=e;o(i)&&(i.localOrigin=m.transform.position);const p=s(te,m.transform.rotationScale);l(oe,t,m.transform.position),l(re,r,m.transform.position),f(oe,oe,p),f(re,re,p);const h=a(te,p);return m.intersectionGeometry.intersect(oe,re,n,h,i,m.components.verticalOffsets,c)}addEdges(e,t,o,r){const n=e,{indices:i,positions:s}=n.intersectionGeometry,a=n.components.offsets;return t.addComponentObject(e,n.transform,{center:n.obb.center,radius:_(n.obb)},s,i,a,o,r)}async extractEdgeInformation(e,t,o){const r=e,n=r.components.visibility;if(n.allInvisible())return{buffer:W.createBuffer(0),origin:[0,0,0]};const{indices:i,positions:s}=r.intersectionGeometry,a=r.components.offsets,c=z.createBuffer(s.count);d(c.position,s),u(c.position,c.position,r.transform.rotationScale),this._setComponentIndices(c.componentIndex,i,a);const m=c.count,l=this._computeVisibilityIndices(i,n,a,m);return{origin:p(r.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:l,indicesLength:l.length,skipDeduplicate:!0,data:c,writerSettings:{reducedPrecision:!1,variants:0}},o)}}_setComponentIndices(e,t,o){let r=0;for(let n=0;n<o.length-1;n++){const i=o[n],s=o[n+1];for(let o=i;o<s;o++){const n=t?t[o]:o;e.set(n,r)}r++}}_computeVisibilityIndices(e,t,o,r){if(e&&t.allVisible())return e;let n=0;t.forEachComponentRange(((e,t)=>(n+=o[t]-o[e],!0)));const i=Array.isArray(e)?new Array(n):2===e?.BYTES_PER_ELEMENT||r<=65536?new Uint16Array(n):new Uint32Array(n);let s=0;return t.forEachComponentRange(((t,r)=>{const n=o[t],a=o[r];for(let o=n;o<a;o++)i[s++]=e?e[o]:o;return!0})),i}addComponentHighlight(e,o){const r=e.components;t(r.highlightCounts)&&(r.highlightCounts=new Uint32Array(r.count+1));0===r.highlightCounts[o]++&&(r.highlightsDirty(),this._notifyDirty()),r.highlightCounts[r.count]++}removeComponentHighlight(e,o){const r=e.components;if(t(r.highlightCounts))return void Q.warn("Removing non-existing highlight.");const n=r.highlightCounts[o],i=r.highlightCounts[r.count];if(0!==n){if(n>1)return r.highlightCounts[o]=n-1,void(r.highlightCounts[r.count]=i-1);r.highlightCounts[o]=0,r.highlightsDirty(),this._notifyDirty(),1===i?r.highlightCounts=null:r.highlightCounts[r.count]=i-1}else Q.warn("Removing non-existing highlight.")}clearHighlights(e){const t=e.components;o(t.highlightCounts)&&(t.highlightCounts=null,t.highlightsDirty(),this._notifyDirty())}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._objects[x.Visible]}_createRenderable(e,t){const i=this._renderManager.rctx,s=e.geometry,a=s.vertices.layoutParameters,c=Y.createVertex(i,F.STATIC_DRAW,s.vertices.data),m=n(s.indices,(e=>Y.createIndex(i,F.STATIC_DRAW,e))),l=w(E(a)),f=new Uint16Array(s.vertices.count);for(let r=0;r<t.count;r++){const e=t.offsets[r],n=t.offsets[r+1],i=t.materialDataIndices[r];if(o(s.indices))for(let t=e;t<n;t++){f[s.indices[t]]=i}else for(let t=e;t<n;t++)f[t]=i}const p=Y.createVertex(i,F.STATIC_DRAW,f.buffer),h=new k(e.transform,e.toMapSpace),b=new K(i,T,{data:l,componentIndices:$},{data:c,componentIndices:p},r(m)),u=new I(b,J.TRIANGLES,a,o(m)),d={cameraDepthSquared:.5,gpuMemoryEstimate:c.byteSize+p.byteSize+(o(m)?m.byteSize:0)};return new S(h,u,d)}_notifyDirty(){this._renderManager.notifyDirty()}}const $=w(M().u16(q.COMPONENTINDEX));function ee(e,t){return e===t?U.All:0===e?U.None:U.Some}const te=c(),oe=h(),re=h();export{Z as ComponentObjectCollection};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{nullifyNonNullableForDispose as t,isSome as o}from"../../../../../core/maybe.js";import e from"../../../../../core/PooledArray.js";import{a as n,s as r}from"../../../../../chunks/mat3.js";import{c as a}from"../../../../../chunks/mat3f64.js";import{a as s}from"../../../../../chunks/quat.js";import{c as f}from"../../../../../chunks/quatf64.js";import{e as c,p as l,k as u,s as i,h,c as m,t as p,a as b}from"../../../../../chunks/vec3.js";import{c as j}from"../../../../../chunks/vec3f64.js";import{signedDistance as d}from"../../../../../geometry/support/plane.js";import{projectedRadius as g,intersectPlane as k}from"../../../support/orientedBoundingBox.js";import{empty as w,within as z,union as S}from"../../lib/depthRange.js";function y(t,e){const n=w(),{eye:r,frustum:a,viewForward:s}=t;e.forAll((t=>{const e=o(t.offsetObb)?t.offsetObb:t.obb,f=c(l(G,e.center,r),s),u=g(e,s);if(z(n,f-u)&&z(n,f+u))return;const i=C(e,a);if(-1===i)return;if(0===i)return v.far=f+u,v.near=f-u,void S(n,v);const h=q.pushNew();h.near=f-u,h.far=f+u,h.mask=i,h.object=t}));for(let f=0;f<q.length;f++){const t=q.data[f];if(z(n,t.near)&&z(n,t.far))continue;v.far=t.far,v.near=1/0;const e=N(o(t.object.offsetObb)?t.object.offsetObb:t.object.obb,r,x,(o=>{let e=B;for(let n=0;n<R&&o.length>0;n++){if(0==(t.mask&1<<n))continue;F(a[n],o,e);const r=o;o=e,e=r}for(let t=0;t<o.length;t+=3){i(O,o.data[t+0],o.data[t+1],o.data[t+2]);const e=c(l(O,O,r),s);v.near=Math.min(v.near,e)}}));0===e&&(v.near=0),S(n,v)}return q.length=0,n}const q=new e({allocator:t=>t||{near:1/0,far:-1/0,mask:0,object:null},deallocator:o=>(o.object=t(o.object),o)}),v=w(),O=j(),A=j(),x=new e({deallocator:null}),B=new e({deallocator:null});function F(t,o,e){e.length=0;const n=o.length-3;I(O,o,n);const r=d(t,O);r<=0&&(e.push(O[0]),e.push(O[1]),e.push(O[2]));let a=0,s=r;for(;a<n;a+=3){I(A,o,a);const n=d(t,A);if(s*n<0){h(O,A,O,n/(n-s)),M(e,O)}n<=0&&M(e,A),s=n,m(O,A)}if(s*r<0){I(A,o,n);h(O,A,O,r/(r-s)),M(e,O)}}function I(t,o,e){return i(t,o.data[e+0],o.data[e+1],o.data[e+2])}function M(t,o){t.push(o[0]),t.push(o[1]),t.push(o[2])}function N(t,o,e,a){s(E,t.quaternion),l(G,o,t.center),u(G,G,E);const f=8*((G[0]<-t.halfSize[0]?-1:G[0]>t.halfSize[0]?1:0)+3*(G[1]<-t.halfSize[1]?-1:G[1]>t.halfSize[1]?1:0)+9*(G[2]<-t.halfSize[2]?-1:G[2]>t.halfSize[2]?1:0)+13),c=P[f];if(0===c)return c;n(D,t.quaternion),r(D,D,t.halfSize);const h=(o,e)=>{const n=P[f+e+1];return i(o,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),p(o,o,D),b(o,t.center,o)};return e.length=0,M(e,h(H,0)),M(e,h(J,1)),M(e,h(G,2)),M(e,h(K,3)),a(e),1===c?c:(e.length=0,M(e,H),M(e,K),M(e,h(G,4)),M(e,h(L,5)),a(e),2===c||(e.length=0,M(e,H),M(e,L),M(e,h(G,6)),M(e,J),a(e)),c)}const P=(()=>{const t=new Int8Array(216);let o=0;const e=e=>{for(let n=0;n<e.length;n++)t[o+n]=e[n];o+=8};return e([3,0,6,2,3,1,5,4]),e([2,0,2,3,1,5,4,0]),e([3,1,0,2,3,7,5,4]),e([2,0,1,3,2,6,4,0]),e([1,0,1,3,2,0,0,0]),e([2,1,5,7,3,2,0,0]),e([3,2,0,1,3,7,6,4]),e([2,2,0,1,3,7,6,0]),e([3,3,0,1,5,7,6,2]),e([2,0,1,5,4,6,2,0]),e([1,0,1,5,4,0,0,0]),e([2,1,3,7,5,4,0,0]),e([1,0,2,6,4,0,0,0]),e([0,0,0,0,0,0,0,0]),e([1,1,3,7,5,0,0,0]),e([2,2,3,7,6,4,0,0]),e([1,2,3,7,6,0,0,0]),e([2,3,1,5,7,6,2,0]),e([3,4,0,1,5,7,6,2]),e([2,5,7,6,4,0,1,0]),e([3,5,0,1,3,7,6,4]),e([2,4,5,7,6,2,0,0]),e([1,4,5,7,6,0,0,0]),e([2,5,1,3,7,6,4,0]),e([3,6,0,2,3,7,5,4]),e([2,6,2,3,7,5,4,0]),e([3,7,6,2,3,1,5,4]),t})(),R=4;function C(t,o){let e=0;for(let n=0;n<R;n++){const r=k(t,o[n]);if(r>0)return-1;0===r&&(e|=1<<n)}return e}const D=a(),E=f(),G=j(),H=j(),J=j(),K=j(),L=j();export{y as computeDepthRange};
5
+ import{nullifyNonNullableForDispose as t,isSome as o}from"../../../../../core/maybe.js";import e from"../../../../../core/PooledArray.js";import{c as n,d as r}from"../../../../../chunks/mat3.js";import{c as a}from"../../../../../chunks/mat3f64.js";import{c as s}from"../../../../../chunks/quat.js";import{a as f}from"../../../../../chunks/quatf64.js";import{e as c,y as l,q as u,s as i,h,c as m,t as p,a as b}from"../../../../../chunks/vec3.js";import{c as j}from"../../../../../chunks/vec3f64.js";import{signedDistance as d}from"../../../../../geometry/support/plane.js";import{projectedRadius as g,intersectPlane as k}from"../../../support/orientedBoundingBox.js";import{empty as w,within as z,union as S}from"../../lib/depthRange.js";function y(t,e){const n=w(),{eye:r,frustum:a,viewForward:s}=t;e.forAll((t=>{const e=o(t.offsetObb)?t.offsetObb:t.obb,f=c(l(G,e.center,r),s),u=g(e,s);if(z(n,f-u)&&z(n,f+u))return;const i=C(e,a);if(-1===i)return;if(0===i)return v.far=f+u,v.near=f-u,void S(n,v);const h=q.pushNew();h.near=f-u,h.far=f+u,h.mask=i,h.object=t}));for(let f=0;f<q.length;f++){const t=q.data[f];if(z(n,t.near)&&z(n,t.far))continue;v.far=t.far,v.near=1/0;const e=N(o(t.object.offsetObb)?t.object.offsetObb:t.object.obb,r,x,(o=>{let e=B;for(let n=0;n<R&&o.length>0;n++){if(0==(t.mask&1<<n))continue;F(a[n],o,e);const r=o;o=e,e=r}for(let t=0;t<o.length;t+=3){i(O,o.data[t+0],o.data[t+1],o.data[t+2]);const e=c(l(O,O,r),s);v.near=Math.min(v.near,e)}}));0===e&&(v.near=0),S(n,v)}return q.length=0,n}const q=new e({allocator:t=>t||{near:1/0,far:-1/0,mask:0,object:null},deallocator:o=>(o.object=t(o.object),o)}),v=w(),O=j(),A=j(),x=new e({deallocator:null}),B=new e({deallocator:null});function F(t,o,e){e.length=0;const n=o.length-3;I(O,o,n);const r=d(t,O);r<=0&&(e.push(O[0]),e.push(O[1]),e.push(O[2]));let a=0,s=r;for(;a<n;a+=3){I(A,o,a);const n=d(t,A);if(s*n<0){h(O,A,O,n/(n-s)),M(e,O)}n<=0&&M(e,A),s=n,m(O,A)}if(s*r<0){I(A,o,n);h(O,A,O,r/(r-s)),M(e,O)}}function I(t,o,e){return i(t,o.data[e+0],o.data[e+1],o.data[e+2])}function M(t,o){t.push(o[0]),t.push(o[1]),t.push(o[2])}function N(t,o,e,a){s(E,t.quaternion),l(G,o,t.center),u(G,G,E);const f=8*((G[0]<-t.halfSize[0]?-1:G[0]>t.halfSize[0]?1:0)+3*(G[1]<-t.halfSize[1]?-1:G[1]>t.halfSize[1]?1:0)+9*(G[2]<-t.halfSize[2]?-1:G[2]>t.halfSize[2]?1:0)+13),c=P[f];if(0===c)return c;n(D,t.quaternion),r(D,D,t.halfSize);const h=(o,e)=>{const n=P[f+e+1];return i(o,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),p(o,o,D),b(o,t.center,o)};return e.length=0,M(e,h(H,0)),M(e,h(J,1)),M(e,h(G,2)),M(e,h(K,3)),a(e),1===c?c:(e.length=0,M(e,H),M(e,K),M(e,h(G,4)),M(e,h(L,5)),a(e),2===c||(e.length=0,M(e,H),M(e,L),M(e,h(G,6)),M(e,J),a(e)),c)}const P=(()=>{const t=new Int8Array(216);let o=0;const e=e=>{for(let n=0;n<e.length;n++)t[o+n]=e[n];o+=8};return e([3,0,6,2,3,1,5,4]),e([2,0,2,3,1,5,4,0]),e([3,1,0,2,3,7,5,4]),e([2,0,1,3,2,6,4,0]),e([1,0,1,3,2,0,0,0]),e([2,1,5,7,3,2,0,0]),e([3,2,0,1,3,7,6,4]),e([2,2,0,1,3,7,6,0]),e([3,3,0,1,5,7,6,2]),e([2,0,1,5,4,6,2,0]),e([1,0,1,5,4,0,0,0]),e([2,1,3,7,5,4,0,0]),e([1,0,2,6,4,0,0,0]),e([0,0,0,0,0,0,0,0]),e([1,1,3,7,5,0,0,0]),e([2,2,3,7,6,4,0,0]),e([1,2,3,7,6,0,0,0]),e([2,3,1,5,7,6,2,0]),e([3,4,0,1,5,7,6,2]),e([2,5,7,6,4,0,1,0]),e([3,5,0,1,3,7,6,4]),e([2,4,5,7,6,2,0,0]),e([1,4,5,7,6,0,0,0]),e([2,5,1,3,7,6,4,0]),e([3,6,0,2,3,7,5,4]),e([2,6,2,3,7,5,4,0]),e([3,7,6,2,3,1,5,4]),t})(),R=4;function C(t,o){let e=0;for(let n=0;n<R;n++){const r=k(t,o[n]);if(r>0)return-1;0===r&&(e|=1<<n)}return e}const D=a(),E=f(),G=j(),H=j(),J=j(),K=j(),L=j();export{y as computeDepthRange};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{unwrap as e,isNone as s,isSome as i}from"../../../../../core/maybe.js";import{v as a}from"../../../../../chunks/mat4.js";import{c as o}from"../../../../../chunks/mat4f64.js";import{v as c,a as r,b as l,s as t}from"../../../../../chunks/vec3.js";import{Z as n,c as f}from"../../../../../chunks/vec3f64.js";import{Float3DrawUniform as d}from"../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as _}from"../shaderModules/Float3PassUniform.js";import{NoParameters as P,glsl as h}from"../shaderModules/interfaces.js";class m extends P{constructor(e){super(),this.slicePlaneLocalOrigin=e}}function p(s,i){H(s,i,[new _("slicePlaneOrigin",((e,s)=>b(i,e,s))),new _("slicePlaneBasis1",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis1))),new _("slicePlaneBasis2",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis2)))])}function u(s,i){H(s,i,[new d("slicePlaneOrigin",((e,s)=>b(i,e,s))),new d("slicePlaneBasis1",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis1))),new d("slicePlaneBasis2",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis2)))])}function H(e,s,i){if(!s.hasSlicePlane){const i=h`#define rejectBySlice(_pos_) false
5
+ import{unwrap as e,isNone as s,isSome as i}from"../../../../../core/maybe.js";import{v as a}from"../../../../../chunks/mat4.js";import{c as o}from"../../../../../chunks/mat4f64.js";import{m as c,a as r,b as l,s as t}from"../../../../../chunks/vec3.js";import{Z as n,c as f}from"../../../../../chunks/vec3f64.js";import{Float3DrawUniform as d}from"../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as _}from"../shaderModules/Float3PassUniform.js";import{NoParameters as P,glsl as h}from"../shaderModules/interfaces.js";class m extends P{constructor(e){super(),this.slicePlaneLocalOrigin=e}}function p(s,i){H(s,i,[new _("slicePlaneOrigin",((e,s)=>b(i,e,s))),new _("slicePlaneBasis1",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis1))),new _("slicePlaneBasis2",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis2)))])}function u(s,i){H(s,i,[new d("slicePlaneOrigin",((e,s)=>b(i,e,s))),new d("slicePlaneBasis1",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis1))),new d("slicePlaneBasis2",((s,a)=>B(i,s,a,e(a.slicePlane)?.basis2)))])}function H(e,s,i){if(!s.hasSlicePlane){const i=h`#define rejectBySlice(_pos_) false
6
6
  #define discardBySlice(_pos_) {}
7
7
  #define highlightSlice(_color_, _pos_) (_color_)`;return s.hasSliceInVertexProgram&&e.vertex.code.add(i),void e.fragment.code.add(i)}e.extensions.add("GL_OES_standard_derivatives"),s.hasSliceInVertexProgram&&e.vertex.uniforms.add(i),e.fragment.uniforms.add(i);const a=h`struct SliceFactors {
8
8
  float front;
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{c as r}from"../../../../../../chunks/mat3f64.js";import{c as o}from"../../../../../../chunks/mat4f64.js";import{b as e}from"../../../../../../chunks/vec3f32.js";import{c as t}from"../../../../../../chunks/vec3f64.js";import{PositionAttribute as a}from"./PositionAttribute.glsl.js";import{DoublePrecision as s}from"../util/DoublePrecision.glsl.js";import{Float3DrawUniform as i}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as m}from"../../shaderModules/Float3PassUniform.js";import{glsl as d,NoParameters as n}from"../../shaderModules/interfaces.js";import{Matrix3DrawUniform as l}from"../../shaderModules/Matrix3DrawUniform.js";import{Matrix3PassUniform as f}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as v}from"../../shaderModules/Matrix4PassUniform.js";function F(r,o){r.include(a);const e=r.vertex;e.include(s,o),r.varyings.add("vPositionWorldCameraRelative","vec3"),r.varyings.add("vPosition_view","vec3"),e.uniforms.add([new m("transformWorldFromViewTH",(r=>r.transformWorldFromViewTH)),new m("transformWorldFromViewTL",(r=>r.transformWorldFromViewTL)),new f("transformViewFromCameraRelativeRS",(r=>r.transformViewFromCameraRelativeRS)),new v("transformProjFromView",(r=>r.transformProjFromView)),new l("transformWorldFromModelRS",(r=>r.transformWorldFromModelRS)),new i("transformWorldFromModelTH",(r=>r.transformWorldFromModelTH)),new i("transformWorldFromModelTL",(r=>r.transformWorldFromModelTL))]),e.code.add(d`vec3 positionWorldCameraRelative() {
5
+ import{c as r}from"../../../../../../chunks/mat3f64.js";import{c as o}from"../../../../../../chunks/mat4f64.js";import{c as e}from"../../../../../../chunks/vec3f32.js";import{c as t}from"../../../../../../chunks/vec3f64.js";import{PositionAttribute as a}from"./PositionAttribute.glsl.js";import{DoublePrecision as s}from"../util/DoublePrecision.glsl.js";import{Float3DrawUniform as i}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as m}from"../../shaderModules/Float3PassUniform.js";import{glsl as d,NoParameters as n}from"../../shaderModules/interfaces.js";import{Matrix3DrawUniform as l}from"../../shaderModules/Matrix3DrawUniform.js";import{Matrix3PassUniform as f}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as v}from"../../shaderModules/Matrix4PassUniform.js";function F(r,o){r.include(a);const e=r.vertex;e.include(s,o),r.varyings.add("vPositionWorldCameraRelative","vec3"),r.varyings.add("vPosition_view","vec3"),e.uniforms.add([new m("transformWorldFromViewTH",(r=>r.transformWorldFromViewTH)),new m("transformWorldFromViewTL",(r=>r.transformWorldFromViewTL)),new f("transformViewFromCameraRelativeRS",(r=>r.transformViewFromCameraRelativeRS)),new v("transformProjFromView",(r=>r.transformProjFromView)),new l("transformWorldFromModelRS",(r=>r.transformWorldFromModelRS)),new i("transformWorldFromModelTH",(r=>r.transformWorldFromModelTH)),new i("transformWorldFromModelTL",(r=>r.transformWorldFromModelTL))]),e.code.add(d`vec3 positionWorldCameraRelative() {
6
6
  vec3 rotatedModelPosition = transformWorldFromModelRS * positionModel();
7
7
  vec3 transform_CameraRelativeFromModel = dpAdd(
8
8
  transformWorldFromModelTL,
@@ -25,4 +25,4 @@ return transform_CameraRelativeFromModel + rotatedModelPosition;
25
25
  return transformWorldFromViewTL + vPositionWorldCameraRelative;
26
26
  }`),r.fragment.code.add(d`vec3 positionWorld() {
27
27
  return transformWorldFromViewTL + vPositionWorldCameraRelative;
28
- }`)}class W extends n{constructor(){super(...arguments),this.transformWorldFromViewTH=t(),this.transformWorldFromViewTL=t(),this.transformViewFromCameraRelativeRS=r(),this.transformProjFromView=o()}}class c extends n{constructor(){super(...arguments),this.transformWorldFromModelRS=r(),this.transformWorldFromModelTH=e(),this.transformWorldFromModelTL=e()}}export{F as VertexPosition,c as VertexPositionDrawParameters,W as VertexPositionPassParameters};
28
+ }`)}class c extends n{constructor(){super(...arguments),this.transformWorldFromViewTH=t(),this.transformWorldFromViewTL=t(),this.transformViewFromCameraRelativeRS=r(),this.transformProjFromView=o()}}class W extends n{constructor(){super(...arguments),this.transformWorldFromModelRS=r(),this.transformWorldFromModelTH=e(),this.transformWorldFromModelTL=e()}}export{F as VertexPosition,W as VertexPositionDrawParameters,c as VertexPositionPassParameters};
@@ -4,7 +4,7 @@ See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
5
  import{ShaderOutput as t}from"../ShaderOutput.js";import{RgbaFloatEncoding as a}from"../util/RgbaFloatEncoding.glsl.js";import{glsl as e}from"../../shaderModules/interfaces.js";function o(o,l){switch(o.fragment.include(a),l.output){case t.Shadow:case t.ShadowHighlight:case t.ShadowExludeHighlight:o.extensions.add("GL_OES_standard_derivatives"),o.fragment.code.add(e`float _calculateFragDepth(const in float depth) {
6
6
  const float SLOPE_SCALE = 2.0;
7
- const float BIAS = 2.0 * .000015259;
7
+ const float BIAS = 20.0 * .000015259;
8
8
  float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
9
9
  float result = depth + SLOPE_SCALE * m + BIAS;
10
10
  return clamp(result, .0, .999999);
@@ -0,0 +1,22 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
+ */
5
+ import{isNone as e}from"../../../../../../core/maybe.js";import{MARKER_SIZE_PER_LINE_WIDTH as r}from"../../../../support/engineContent/marker.js";import{FloatPassUniform as o}from"../../shaderModules/FloatPassUniform.js";import{glsl as a}from"../../shaderModules/interfaces.js";import{LineMarkerSpace as t}from"../../../shaders/LineMarkerTechniqueConfiguration.js";function i(i,n){const d=i.vertex;i.constants.add("markerSizePerLineWidth","float",r),d.uniforms.add(new o("pixelRatio",((e,r)=>r.camera.pixelRatio))),e(d.uniforms.get("markerScale"))&&d.constants.add("markerScale","float",1),d.code.add(a`float getLineWidth() {
6
+ return max(getSize(), 1.0) * pixelRatio;
7
+ }
8
+ float getScreenMarkerSize() {
9
+ return markerSizePerLineWidth * markerScale * getLineWidth();
10
+ }`),n.space===t.World&&(d.constants.add("maxSegmentLengthFraction","float",.45),d.uniforms.add(new o("perRenderPixelRatio",((e,r)=>r.camera.perRenderPixelRatio))),d.code.add(a`float getWorldMarkerSize(vec4 pos) {
11
+ float distanceToCamera = length(pos.xyz);
12
+ float screenToWorldRatio = perRenderPixelRatio * distanceToCamera * 0.5;
13
+ return getScreenMarkerSize() * screenToWorldRatio;
14
+ }
15
+ bool areWorldMarkersHidden(vec4 pos, vec4 other) {
16
+ vec3 midPoint = mix(pos.xyz, other.xyz, 0.5);
17
+ float distanceToCamera = length(midPoint);
18
+ float screenToWorldRatio = perRenderPixelRatio * distanceToCamera * 0.5;
19
+ float worldMarkerSize = getScreenMarkerSize() * screenToWorldRatio;
20
+ float segmentLen = length(pos.xyz - other.xyz);
21
+ return worldMarkerSize > maxSegmentLengthFraction * segmentLen;
22
+ }`))}export{i as MarkerSizing};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{c as s,p as t,s as h,a as e,g as i}from"../../../../../chunks/vec3.js";import{b as o}from"../../../../../chunks/vec3f32.js";import{c as r}from"../../../../../chunks/vec3f64.js";class c{constructor(s){this._low=o(),this._high=o(),s&&this.set(s)}get low(){return this._low}get high(){return this._high}set(h){const e=this._low,i=this._high;s(e,h),t(i,h,e)}setElements(s,t,e){h(n,s,t,e),this.set(n)}get(s){return e(s,this._low,this._high)}getLowScaled(s){return i(s,this._low,1)}}const n=r();export{c as TwoVectorPosition};
5
+ import{c as s,y as t,s as h,a as e,g as i}from"../../../../../chunks/vec3.js";import{c as o}from"../../../../../chunks/vec3f32.js";import{c as r}from"../../../../../chunks/vec3f64.js";class c{constructor(s){this._low=o(),this._high=o(),s&&this.set(s)}get low(){return this._low}get high(){return this._high}set(h){const e=this._low,i=this._high;s(e,h),t(i,h,e)}setElements(s,t,e){h(n,s,t,e),this.set(n)}get(s){return e(s,this._low,this._high)}getLowScaled(s){return i(s,this._low,1)}}const n=r();export{c as TwoVectorPosition};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../core/Logger.js";import{lerp as i}from"../../../../core/mathUtils.js";import{isSome as e,isNone as r}from"../../../../core/maybe.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as h}from"../../../../core/screenUtils.js";import{c as o,m as n,p as a,a as _,t as p,q as u}from"../../../../chunks/mat4.js";import{c as v}from"../../../../chunks/mat4f64.js";import{c,m as w}from"../../../../chunks/vec2.js";import{f as l}from"../../../../chunks/vec2f64.js";import{c as d,b as y,i as g,w as m,p as f,e as D,D as x,E as j,g as M,l as T,s as P,f as R,n as F,A as O}from"../../../../chunks/vec3.js";import{c as V,a as I,f as S}from"../../../../chunks/vec3f64.js";import{c as E,g as L,i as b,t as H}from"../../../../chunks/vec4.js";import{f as B,c as G}from"../../../../chunks/vec4f64.js";import{create as U,copy as k,fromMatrix as A}from"../../../../geometry/support/frustum.js";import{create as C}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as z}from"../../../../geometry/support/vector.js";import{ViewingMode as W}from"../../../ViewingMode.js";import{fovd2fovx as X,fovx2fovd as Y,fovd2fovy as q,fovy2fovd as N}from"./Util.js";class J{constructor(t=null,i=null,r=null){this._viewUp=V(),this._viewForward=V(),this._viewRight=V(),this._ray=C(),this._viewport=B(0,0,1,1),this._padding=B(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=l(1,1e3),this._viewDirty=!0,this._viewMatrix=v(),this._projectionDirty=!0,this._projectionMatrix=v(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=v(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=v(),this._inverseProjectionDirty=!0,this._inverseProjectionMatrix=null,this._frustumDirty=!0,this._frustum=U(),this._fullViewport=G(),this._pixelRatio=1,this.relativeElevation=0,e(t)&&d(this._ray.origin,t),this._center=e(i)?I(i):V(),this._up=e(r)?I(r):S(0,0,1)}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center)}get ray(){return y(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up)}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){o(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get x(){return this._viewport[0]}set x(t){t+=this._padding[it.LEFT],this._viewport[0]!==t&&(this._viewport[0]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get y(){return this._viewport[1]}set y(t){t+=this._padding[it.BOTTOM],this._viewport[1]!==t&&(this._viewport[1]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get fullWidth(){return this._viewport[2]+this._padding[it.RIGHT]+this._padding[it.LEFT]}set fullWidth(t){this.width=t-(this._padding[it.RIGHT]+this._padding[it.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[it.TOP]+this._padding[it.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[it.TOP]+this._padding[it.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[it.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[it.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){this._padding[it.TOP]===t[it.TOP]&&this._padding[it.RIGHT]===t[it.RIGHT]&&this._padding[it.BOTTOM]===t[it.BOTTOM]&&this._padding[it.LEFT]===t[it.LEFT]||(this._viewport[0]+=t[it.LEFT]-this._padding[it.LEFT],this._viewport[1]+=t[it.BOTTOM]-this._padding[it.BOTTOM],this._viewport[2]-=t[it.RIGHT]+t[it.LEFT]-(this._padding[it.RIGHT]+this._padding[it.LEFT]),this._viewport[3]-=t[it.TOP]+t[it.BOTTOM]-(this._padding[it.TOP]+this._padding[it.BOTTOM]),E(this._padding,t),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewProjectionMatrix(){return this._viewProjectionDirty&&(n(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){if(this._projectionDirty){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this.aspect;a(this._projectionMatrix,-r*(1+2*this._padding[it.LEFT]/t),r*(1+2*this._padding[it.RIGHT]/t),-e*(1+2*this._padding[it.BOTTOM]/i),e*(1+2*this._padding[it.TOP]/i),this.near,this.far),this._projectionDirty=!1}return this._projectionMatrix}get inverseProjectionMatrix(){return r(this._inverseProjectionMatrix)&&(this._inverseProjectionMatrix=v()),this._inverseProjectionDirty&&_(this._inverseProjectionMatrix,this.projectionMatrix),this._inverseProjectionMatrix}set projectionMatrix(t){o(this._projectionMatrix,t),this._projectionDirty=!1,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fov(){return this._fov}set fov(t){this._fov=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return X(this._fov,this.width,this.height)}set fovX(t){this._fov=Y(t,this.width,this.height),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return q(this._fov,this.width,this.height)}set fovY(t){this._fov=N(t,this.width,this.height),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return g(this._center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(_(this._viewInverseTransposeMatrix,this.viewMatrix),p(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this._pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}copyFrom(t){d(this._ray.origin,t.eye),d(this._center,t.center),d(this._up,t.up),E(this._viewport,t.viewport),E(this._padding,t.padding),c(this._nearFar,t.nearFar),this._fov=t.fov,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(o(this._viewMatrix,t.viewMatrix),d(this._viewRight,t.viewRight),d(this._viewUp,t.viewUp),d(this._viewForward,t.viewForward)),i._projectionDirty?this._projectionDirty=!0:(o(this._projectionMatrix,t.projectionMatrix),this._projectionDirty=!1),this._viewProjectionDirty=!0,this._inverseProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(k(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(o(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),E(this._fullViewport,t.fullViewport),this._pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up}clone(){return(new J).copyFrom(this)}equals(t){return m(this.eye,t.eye)&&m(this._center,t.center)&&m(this._up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&w(this._nearFar,t.nearFar)&&this._fov===t.fov&&this._pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){if(this._pixelRatio!==t.pixelRatio||Math.abs(t.fov-this._fov)>=.001)return!1;const i=5e-4,e=1-1e-10;f(Z,t.eye,t.center),f($,this.eye,this._center);const r=D(Z,$),s=x(Z),h=x($);return r*r>=e*s*h&&j(t.eye,this.eye)<Math.max(s,h)*i*i&&b(t.padding,this._padding)<.5&&b(t.viewport,this._viewport)<.5}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(z(this.viewForward,y(Z,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[it.LEFT]+this.width/2)/this._pixelRatio,t[1]=(this.padding[it.TOP]+this.height/2)/this._pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[it.LEFT]+this.width*i,t[1]=this.padding[it.BOTTOM]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,e){t!==K&&d(K,t),K[3]=1,H(K,K,this.projectionMatrix);const r=Math.abs(K[3]);M(K,K,1/r);const s=this.fullViewport;e[0]=i(0,s[0]+s[2],.5+.5*K[0]),e[1]=i(0,s[1]+s[3],.5+.5*K[1]),e[2]=.5*(K[2]+1),e[3]=r}unapplyProjection(t,i){const e=this.fullViewport;K[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],K[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],K[2]=(2*t[2]-1)*t[3],K[3]=t[3],H(K,K,this.inverseProjectionMatrix),i[0]=K[0],i[1]=K[1],i[2]=K[2]}projectToScreen(t,i){return this.projectToRenderScreen(t,tt),this.renderToScreen(tt,i),i}projectToRenderScreen(t,e){if(K[0]=t[0],K[1]=t[1],K[2]=t[2],K[3]=1,H(K,K,this.viewProjectionMatrix),0===K[3])return null;M(K,K,1/Math.abs(K[3]));const r=this.fullViewport;return"x"in e?(e.x=i(0,r[0]+r[2],.5+.5*K[0]),e.y=i(0,r[1]+r[3],.5+.5*K[1])):(e[0]=i(0,r[0]+r[2],.5+.5*K[0]),e[1]=i(0,r[1]+r[3],.5+.5*K[1]),e.length>2&&(e[2]=.5*(K[2]+1))),e}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,tt),i)}unprojectFromRenderScreen(t,i){if(n(Q,this.projectionMatrix,this.viewMatrix),!_(Q,Q))return null;const e=this.fullViewport;return K[0]=2*(t[0]-e[0])/e[2]-1,K[1]=2*(t[1]-e[1])/e[3]-1,K[2]=2*t[2]-1,K[3]=1,H(K,K,Q),0===K[3]?null:(i[0]=K[0]/K[3],i[1]=K[1]/K[3],i[2]=K[2]/K[3],i)}constrainWindowSize(t,i,e,r=e){const s=t*this._pixelRatio,h=i*this._pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),_=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-_- -Math.min(h-r/2,0)]}computeUp(t){t===W.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this._pixelRatio,r=this.fullHeight-t[1]*this._pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this._pixelRatio,r=(this.fullHeight-t[1])/this._pixelRatio;i[0]=e,i[1]=r}_computeUpGlobal(){y(Z,this.center,this.eye);const t=T(this.center);t<1?(P(this._up,0,0,1),this._markViewDirty()):Math.abs(D(Z,this.center))>.9999*T(Z)*t||(R(this._up,Z,this.center),R(this._up,this._up,Z),F(this._up,this._up),this._markViewDirty())}_computeUpLocal(){O(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&(M(Z,Z,Z[2]),P(this._up,-Z[0],-Z[1],1-Z[2]),F(this._up,this._up),this._markViewDirty())}_compareAndSetView(i,e){"number"==typeof i[0]&&isFinite(i[0])&&"number"==typeof i[1]&&isFinite(i[1])&&"number"==typeof i[2]&&isFinite(i[2])?m(i,e)||(d(e,i),this._markViewDirty()):t.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(A(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(u(this._viewMatrix,this.eye,this._center,this._up),P(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),P(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),P(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}}const K=G(),Q=v(),Z=V(),$=V(),tt=h();var it;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(it||(it={}));export{J as Camera,it as PaddingSide};
5
+ import t from"../../../../core/Logger.js";import{lerp as i}from"../../../../core/mathUtils.js";import{isSome as e,isNone as r}from"../../../../core/maybe.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as h}from"../../../../core/screenUtils.js";import{c as o,m as n,p as a,a as _,t as p,q as u}from"../../../../chunks/mat4.js";import{c as v}from"../../../../chunks/mat4f64.js";import{c,m as w}from"../../../../chunks/vec2.js";import{f as l}from"../../../../chunks/vec2f64.js";import{c as d,b as y,i as g,k as m,y as f,e as D,D as x,E as j,g as M,l as T,s as P,f as R,n as F,r as O}from"../../../../chunks/vec3.js";import{c as V,a as I,f as S}from"../../../../chunks/vec3f64.js";import{c as E,g as L,i as b,t as H}from"../../../../chunks/vec4.js";import{f as k,c as B}from"../../../../chunks/vec4f64.js";import{create as G,copy as U,fromMatrix as A}from"../../../../geometry/support/frustum.js";import{create as C}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as z}from"../../../../geometry/support/vector.js";import{ViewingMode as W}from"../../../ViewingMode.js";import{fovd2fovx as X,fovx2fovd as Y,fovd2fovy as q,fovy2fovd as N}from"./Util.js";class J{constructor(t=null,i=null,r=null){this._viewUp=V(),this._viewForward=V(),this._viewRight=V(),this._ray=C(),this._viewport=k(0,0,1,1),this._padding=k(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=l(1,1e3),this._viewDirty=!0,this._viewMatrix=v(),this._projectionDirty=!0,this._projectionMatrix=v(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=v(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=v(),this._inverseProjectionDirty=!0,this._inverseProjectionMatrix=null,this._frustumDirty=!0,this._frustum=G(),this._fullViewport=B(),this._pixelRatio=1,this.relativeElevation=0,e(t)&&d(this._ray.origin,t),this._center=e(i)?I(i):V(),this._up=e(r)?I(r):S(0,0,1)}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center)}get ray(){return y(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up)}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){o(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get x(){return this._viewport[0]}set x(t){t+=this._padding[it.LEFT],this._viewport[0]!==t&&(this._viewport[0]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get y(){return this._viewport[1]}set y(t){t+=this._padding[it.BOTTOM],this._viewport[1]!==t&&(this._viewport[1]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get fullWidth(){return this._viewport[2]+this._padding[it.RIGHT]+this._padding[it.LEFT]}set fullWidth(t){this.width=t-(this._padding[it.RIGHT]+this._padding[it.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[it.TOP]+this._padding[it.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[it.TOP]+this._padding[it.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[it.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[it.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){this._padding[it.TOP]===t[it.TOP]&&this._padding[it.RIGHT]===t[it.RIGHT]&&this._padding[it.BOTTOM]===t[it.BOTTOM]&&this._padding[it.LEFT]===t[it.LEFT]||(this._viewport[0]+=t[it.LEFT]-this._padding[it.LEFT],this._viewport[1]+=t[it.BOTTOM]-this._padding[it.BOTTOM],this._viewport[2]-=t[it.RIGHT]+t[it.LEFT]-(this._padding[it.RIGHT]+this._padding[it.LEFT]),this._viewport[3]-=t[it.TOP]+t[it.BOTTOM]-(this._padding[it.TOP]+this._padding[it.BOTTOM]),E(this._padding,t),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewProjectionMatrix(){return this._viewProjectionDirty&&(n(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){if(this._projectionDirty){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this.aspect;a(this._projectionMatrix,-r*(1+2*this._padding[it.LEFT]/t),r*(1+2*this._padding[it.RIGHT]/t),-e*(1+2*this._padding[it.BOTTOM]/i),e*(1+2*this._padding[it.TOP]/i),this.near,this.far),this._projectionDirty=!1}return this._projectionMatrix}get inverseProjectionMatrix(){return r(this._inverseProjectionMatrix)&&(this._inverseProjectionMatrix=v()),this._inverseProjectionDirty&&_(this._inverseProjectionMatrix,this.projectionMatrix),this._inverseProjectionMatrix}set projectionMatrix(t){o(this._projectionMatrix,t),this._projectionDirty=!1,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fov(){return this._fov}set fov(t){this._fov=t,this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return X(this._fov,this.width,this.height)}set fovX(t){this._fov=Y(t,this.width,this.height),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return q(this._fov,this.width,this.height)}set fovY(t){this._fov=N(t,this.width,this.height),this._projectionDirty=!0,this._inverseProjectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return g(this._center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(_(this._viewInverseTransposeMatrix,this.viewMatrix),p(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this._pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}copyFrom(t){d(this._ray.origin,t.eye),d(this._center,t.center),d(this._up,t.up),E(this._viewport,t.viewport),E(this._padding,t.padding),c(this._nearFar,t.nearFar),this._fov=t.fov,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(o(this._viewMatrix,t.viewMatrix),d(this._viewRight,t.viewRight),d(this._viewUp,t.viewUp),d(this._viewForward,t.viewForward)),i._projectionDirty?this._projectionDirty=!0:(o(this._projectionMatrix,t.projectionMatrix),this._projectionDirty=!1),this._viewProjectionDirty=!0,this._inverseProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(U(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(o(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),E(this._fullViewport,t.fullViewport),this._pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up}clone(){return(new J).copyFrom(this)}equals(t){return m(this.eye,t.eye)&&m(this._center,t.center)&&m(this._up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&w(this._nearFar,t.nearFar)&&this._fov===t.fov&&this._pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){if(this._pixelRatio!==t.pixelRatio||Math.abs(t.fov-this._fov)>=.001)return!1;const i=5e-4,e=1-1e-10;f(Z,t.eye,t.center),f($,this.eye,this._center);const r=D(Z,$),s=x(Z),h=x($);return r*r>=e*s*h&&j(t.eye,this.eye)<Math.max(s,h)*i*i&&b(t.padding,this._padding)<.5&&b(t.viewport,this._viewport)<.5}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(z(this.viewForward,y(Z,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[it.LEFT]+this.width/2)/this._pixelRatio,t[1]=(this.padding[it.TOP]+this.height/2)/this._pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[it.LEFT]+this.width*i,t[1]=this.padding[it.BOTTOM]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,e){t!==K&&d(K,t),K[3]=1,H(K,K,this.projectionMatrix);const r=Math.abs(K[3]);M(K,K,1/r);const s=this.fullViewport;e[0]=i(0,s[0]+s[2],.5+.5*K[0]),e[1]=i(0,s[1]+s[3],.5+.5*K[1]),e[2]=.5*(K[2]+1),e[3]=r}unapplyProjection(t,i){const e=this.fullViewport;K[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],K[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],K[2]=(2*t[2]-1)*t[3],K[3]=t[3],H(K,K,this.inverseProjectionMatrix),i[0]=K[0],i[1]=K[1],i[2]=K[2]}projectToScreen(t,i){return this.projectToRenderScreen(t,tt),this.renderToScreen(tt,i),i}projectToRenderScreen(t,e){if(K[0]=t[0],K[1]=t[1],K[2]=t[2],K[3]=1,H(K,K,this.viewProjectionMatrix),0===K[3])return null;M(K,K,1/Math.abs(K[3]));const r=this.fullViewport;return"x"in e?(e.x=i(0,r[0]+r[2],.5+.5*K[0]),e.y=i(0,r[1]+r[3],.5+.5*K[1])):(e[0]=i(0,r[0]+r[2],.5+.5*K[0]),e[1]=i(0,r[1]+r[3],.5+.5*K[1]),e.length>2&&(e[2]=.5*(K[2]+1))),e}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,tt),i)}unprojectFromRenderScreen(t,i){if(n(Q,this.projectionMatrix,this.viewMatrix),!_(Q,Q))return null;const e=this.fullViewport;return K[0]=2*(t[0]-e[0])/e[2]-1,K[1]=2*(t[1]-e[1])/e[3]-1,K[2]=2*t[2]-1,K[3]=1,H(K,K,Q),0===K[3]?null:(i[0]=K[0]/K[3],i[1]=K[1]/K[3],i[2]=K[2]/K[3],i)}constrainWindowSize(t,i,e,r=e){const s=t*this._pixelRatio,h=i*this._pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),_=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-_- -Math.min(h-r/2,0)]}computeUp(t){t===W.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this._pixelRatio,r=this.fullHeight-t[1]*this._pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this._pixelRatio,r=(this.fullHeight-t[1])/this._pixelRatio;i[0]=e,i[1]=r}_computeUpGlobal(){y(Z,this.center,this.eye);const t=T(this.center);t<1?(P(this._up,0,0,1),this._markViewDirty()):Math.abs(D(Z,this.center))>.9999*T(Z)*t||(R(this._up,Z,this.center),R(this._up,this._up,Z),F(this._up,this._up),this._markViewDirty())}_computeUpLocal(){O(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&(M(Z,Z,Z[2]),P(this._up,-Z[0],-Z[1],1-Z[2]),F(this._up,this._up),this._markViewDirty())}_compareAndSetView(i,e){"number"==typeof i[0]&&isFinite(i[0])&&"number"==typeof i[1]&&isFinite(i[1])&&"number"==typeof i[2]&&isFinite(i[2])?m(i,e)||(d(e,i),this._markViewDirty()):t.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(A(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(u(this._viewMatrix,this.eye,this._center,this._up),P(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),P(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),P(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}}const K=B(),Q=v(),Z=V(),$=V(),tt=h();var it;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(it||(it={}));export{J as Camera,it as PaddingSide};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../core/maybe.js";import r from"../../../../core/ObjectPool.js";import{generateUID as s}from"../../../../core/uid.js";import{v as i}from"../../../../chunks/vec3.js";class o{constructor(){this._disposed=!1}get disposed(){return this._disposed}get shaderTransformation(){return this._shaderTransformation}acquire(t,r,i,o,e,a){this.id=s(),this.geometry=t,this.material=r,this.transformation=i,this.instanceParameters=o,this.origin=e,this._shaderTransformation=a,this._disposed=!1}release(){this._disposed=!1}dispose(){this._disposed=!0}getStaticTransformation(){return this.transformation}getShaderTransformation(){return t(this._shaderTransformation)?this._shaderTransformation(this.transformation):this.transformation}computeAttachmentOrigin(t){return!!(this.material.computeAttachmentOrigin?this.material.computeAttachmentOrigin(this.geometry,t):this.geometry.computeAttachmentOrigin(t))&&(i(t,t,this.getStaticTransformation()),!0)}}o.pool=new r(o);export{o as GeometryRecord};
5
+ import{isSome as t}from"../../../../core/maybe.js";import r from"../../../../core/ObjectPool.js";import{generateUID as s}from"../../../../core/uid.js";import{m as i}from"../../../../chunks/vec3.js";class o{constructor(){this._disposed=!1}get disposed(){return this._disposed}get shaderTransformation(){return this._shaderTransformation}acquire(t,r,i,o,e,a){this.id=s(),this.geometry=t,this.material=r,this.transformation=i,this.instanceParameters=o,this.origin=e,this._shaderTransformation=a,this._disposed=!1}release(){this._disposed=!1}dispose(){this._disposed=!0}getStaticTransformation(){return this.transformation}getShaderTransformation(){return t(this._shaderTransformation)?this._shaderTransformation(this.transformation):this.transformation}computeAttachmentOrigin(t){return!!(this.material.computeAttachmentOrigin?this.material.computeAttachmentOrigin(this.geometry,t):this.geometry.computeAttachmentOrigin(t))&&(i(t,t,this.getStaticTransformation()),!0)}}o.pool=new r(o);export{o as GeometryRecord};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{b as t,f as e,n,g as s,a,e as r,s as o,c as l,v as u}from"../../../../chunks/vec3.js";import{f as c,b as i,a as h}from"../../../../chunks/vec3f32.js";import{c as f}from"../../../../chunks/vec3f64.js";import{create as O,fromPositionAndNormal as p,intersectRay as A}from"../../../../geometry/support/plane.js";import{wrap as I}from"../../../../geometry/support/ray.js";import{PrimitiveType as M}from"./basicInterfaces.js";import{Vec3Compact as g}from"./BufferVectorMath.js";import{Geometry as y}from"./Geometry.js";import{generateDefaultIndexArray as d}from"./Indices.js";import{assert as N}from"./Util.js";import{VertexAttribute as w}from"./VertexAttribute.js";const P=g;var m,S,z;!function(t){const e=.5,n=[[-e,-e,e],[e,-e,e],[e,e,e],[-e,e,e],[-e,-e,-e],[e,-e,-e],[e,e,-e],[-e,e,-e]],s=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],a=[0,0,1,0,1,1,0,1],r=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],o=new Array(36);for(let c=0;c<6;c++)for(let t=0;t<6;t++)o[6*c+t]=c;const l=new Array(36);for(let c=0;c<6;c++)l[6*c+0]=0,l[6*c+1]=1,l[6*c+2]=2,l[6*c+3]=2,l[6*c+4]=3,l[6*c+5]=0;function u(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=n[s][0]*t[0],e[3*s+1]=n[s][1]*t[1],e[3*s+2]=n[s][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s}],[w.UV0,{size:2,data:a}]],[[w.POSITION,r],[w.NORMAL,o],[w.UV0,l]])}t.createGeometry=u}(m||(m={})),function(t){const e=.5,n=[[-e,0,-e],[e,0,-e],[e,0,e],[-e,0,e],[0,-e,0],[0,e,0]],s=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],a=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],r=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function o(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=n[s][0]*t[0],e[3*s+1]=n[s][1]*t[1],e[3*s+2]=n[s][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s}]],[[w.POSITION,a],[w.NORMAL,r]])}t.createGeometry=o}(S||(S={})),function(s){const a=.5,r=0,o=c(-a,r,-a),l=c(a,r,-a),u=c(0,r,a),h=c(0,r+a,0),f=i(),O=i(),p=i(),A=i(),I=i();t(f,o,h),t(O,o,l),e(p,f,O),n(p,p),t(f,l,h),t(O,l,u),e(A,f,O),n(A,A),t(f,u,h),t(O,u,o),e(I,f,O),n(I,I);const M=[o,l,u,h],g=[0,-1,0,p[0],p[1],p[2],A[0],A[1],A[2],I[0],I[1],I[2]],d=[0,1,2,3,1,0,3,2,1,3,0,2],N=[0,0,0,1,1,1,2,2,2,3,3,3];function P(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(12);for(let n=0;n<4;n++)e[3*n]=M[n][0]*t[0],e[3*n+1]=M[n][1]*t[1],e[3*n+2]=M[n][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:g}]],[[w.POSITION,d],[w.NORMAL,N]])}s.createGeometry=P}(z||(z={}));const v=m.createGeometry,x=S.createGeometry,L=z.createGeometry;function T(t,e,n,s={uv:!0}){const a=-Math.PI,r=2*Math.PI,o=-Math.PI/2,l=Math.PI,u=Math.max(3,Math.floor(e)),c=Math.max(2,Math.floor(n)),i=(u+1)*(c+1),h=new Float32Array(3*i),f=new Float32Array(3*i),O=new Float32Array(2*i),p=[];let A=0;for(let y=0;y<=c;y++){const e=[],n=y/c,s=o+n*l,i=Math.cos(s);for(let o=0;o<=u;o++){const l=o/u,c=a+l*r,p=Math.cos(c)*i,I=Math.sin(s),M=-Math.sin(c)*i;h[3*A]=p*t,h[3*A+1]=I*t,h[3*A+2]=M*t,f[3*A]=p,f[3*A+1]=I,f[3*A+2]=M,O[2*A]=l,O[2*A+1]=n,e.push(A),++A}p.push(e)}const I=new Array;for(let y=0;y<c;y++)for(let t=0;t<u;t++){const e=p[y][t],n=p[y][t+1],s=p[y+1][t+1],a=p[y+1][t];0===y?(I.push(e),I.push(s),I.push(a)):y===c-1?(I.push(e),I.push(n),I.push(s)):(I.push(e),I.push(n),I.push(s),I.push(s),I.push(a),I.push(e))}const M=[[w.POSITION,I],[w.NORMAL,I]],g=[[w.POSITION,{size:3,data:h,exclusive:!0}],[w.NORMAL,{size:3,data:f,exclusive:!0}]];return s.uv&&(g.push([w.UV0,{size:2,data:O,exclusive:!0}]),M.push([w.UV0,I])),s.offset&&(M[0][0]=w.OFFSET,g[0][0]=w.OFFSET,M.push([w.POSITION,new Array(I.length).fill(0)]),g.push([w.POSITION,{size:3,data:Float64Array.from(s.offset),exclusive:!0}])),new y(g,M)}function R(t,e,n){const s=t;let a,r;if(n)a=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;a=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let h=0;h<a.length;h+=3)P.scale(a,h,t/P.length(a,h));let o={};function l(e,n){e>n&&([e,n]=[n,e]);const s=e.toString()+"."+n.toString();if(o[s])return o[s];let r=a.length;return a.length+=3,P.add(a,3*e,a,3*n,a,r),P.scale(a,r,t/P.length(a,r)),r/=3,o[s]=r,r}for(let h=0;h<e;h++){const t=r.length,e=new Array(4*t);for(let n=0;n<t;n+=3){const t=r[n],s=r[n+1],a=r[n+2],o=l(t,s),u=l(s,a),c=l(a,t),i=4*n;e[i]=t,e[i+1]=o,e[i+2]=c,e[i+3]=s,e[i+4]=u,e[i+5]=o,e[i+6]=a,e[i+7]=c,e[i+8]=u,e[i+9]=o,e[i+10]=u,e[i+11]=c}r=e,o={}}const u=new Float32Array(a);for(let h=0;h<u.length;h+=3)P.normalize(u,h);const c=[[w.POSITION,r],[w.NORMAL,r]],i=[[w.POSITION,{size:3,data:new Float32Array(a),exclusive:!0}],[w.NORMAL,{size:3,data:u,exclusive:!0}]];return new y(i,c)}function b(t,e,n,s,a,r,o,l){const u=e?[e[0],e[1],e[2]]:[0,0,0],c=t?[t[0],t[1],t[2]]:[0,0,1];r=r||[0,0];const i=n?[255*n[0],255*n[1],255*n[2],n.length>3?255*n[3]:255]:[255,255,255,255],h=null!=s&&2===s.length?s:[1,1],f=[[w.POSITION,{size:3,data:u,exclusive:!0}],[w.NORMAL,{size:3,data:c,exclusive:!0}],[w.UV0,{size:r.length,data:r}],[w.COLOR,{size:4,data:i,exclusive:!0}],[w.SIZE,{size:2,data:h}]];if(null!=a){const t=new Float32Array([a[0],a[1],a[2],a[3]]);f.push([w.AUXPOS1,{size:4,data:t}])}if(null!=o){const t=new Float32Array([o[0],o[1],o[2],o[3]]);f.push([w.AUXPOS2,{size:4,data:t}])}return new y(f,null,M.Point,l)}function F(t,e,n,s,a,r,o,l){if(null!=t){const{data:e}=l.getMutableAttribute(w.NORMAL);e[0]=t[0],e[1]=t[1],e[2]=t[2]}if(null!=e){const{data:t}=l.getMutableAttribute(w.POSITION);t[0]=e[0],t[1]=e[1],t[2]=e[2]}if(null!=n){const{data:t}=l.getMutableAttribute(w.COLOR);t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]}if(null!=s){const{data:t}=l.getMutableAttribute(w.SIZE);t[0]=s[0],t[1]=s[1]}if(null!=a){const{data:t}=l.getMutableAttribute(w.AUXPOS1);t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3]}if(null!=r){const{data:t}=l.getMutableAttribute(w.UV0);t[0]=r[0],t[1]=r[1]}if(null!=o){const{data:t}=l.getMutableAttribute(w.AUXPOS2);t[0]=o[0],t[1]=o[1],t[2]=o[2],t[3]=o[3]}}function U(t,e){const n=new Float32Array(3*t.length),s=new Float32Array(e?3*t.length:3),a=new Array(t.length),r=new Array(t.length).fill(0);for(let c=0;c<t.length;c++)n[3*c]=t[c][0],n[3*c+1]=t[c][1],n[3*c+2]=t[c][2],e&&(s[3*c]=e[c][0],s[3*c+1]=e[c][1],s[3*c+2]=e[c][2]),a[c]=c;e||(s[0]=0,s[1]=1,s[2]=0);const o=[0,0],l=[[w.POSITION,a],[w.NORMAL,e?a:r],[w.UV0,r]],u=[[w.POSITION,{size:3,data:n,exclusive:!0}],[w.NORMAL,{size:3,data:s,exclusive:!0}],[w.UV0,{size:2,data:o,exclusive:!0}]];return new y(u,l,M.Point)}function V(){const t=[0,0,0,0,0,100,100,0,0],e=[0,1,2],n=[0,1,0],s=[0,0,0],a=[0,0],r=[0,0,0],o=[[w.POSITION,e],[w.NORMAL,s],[w.UV0,r]],l=[[w.POSITION,{size:3,data:t,exclusive:!0}],[w.NORMAL,{size:3,data:n,exclusive:!0}],[w.UV0,{size:2,data:a,exclusive:!0}]];return new y(l,o)}const j=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function G(t=j){const e=new Array(12);for(let c=0;c<4;c++)for(let n=0;n<3;n++)e[3*c+n]=t[c][n];const n=[0,1,2,2,3,0],s=[0,0,1],a=[0,0,0,0,0,0],r=[0,0,1,0,1,1,0,1],o=[255,255,255,255],l=[[w.POSITION,n],[w.NORMAL,a],[w.UV0,n],[w.COLOR,a]],u=[[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s,exclusive:!0}],[w.UV0,{size:2,data:r,exclusive:!0}],[w.COLOR,{size:4,data:o,exclusive:!0}]];return new y(u,l)}function C(t,e,n,s,a=!0,r=!0){let o=0;const l=e,u=t;let i=c(0,o,0),h=c(0,o+u,0),f=c(0,-1,0),O=c(0,1,0);s&&(o=u,h=c(0,0,0),i=c(0,o,0),f=c(0,1,0),O=c(0,-1,0));const p=[h,i],A=[f,O],I=n+2,M=Math.sqrt(u*u+l*l);if(s)for(let y=n-1;y>=0;y--){const t=y*(2*Math.PI/n),e=c(Math.cos(t)*l,o,Math.sin(t)*l);p.push(e);const s=c(u*Math.cos(t)/M,-l/M,u*Math.sin(t)/M);A.push(s)}else for(let y=0;y<n;y++){const t=y*(2*Math.PI/n),e=c(Math.cos(t)*l,o,Math.sin(t)*l);p.push(e);const s=c(u*Math.cos(t)/M,l/M,u*Math.sin(t)/M);A.push(s)}const g=new Array,d=new Array;if(a){for(let t=3;t<p.length;t++)g.push(1),g.push(t-1),g.push(t),d.push(0),d.push(0),d.push(0);g.push(p.length-1),g.push(2),g.push(1),d.push(0),d.push(0),d.push(0)}if(r){for(let t=3;t<p.length;t++)g.push(t),g.push(t-1),g.push(0),d.push(t),d.push(t-1),d.push(1);g.push(0),g.push(2),g.push(p.length-1),d.push(1),d.push(2),d.push(A.length-1)}const N=new Float32Array(3*I);for(let c=0;c<I;c++)N[3*c]=p[c][0],N[3*c+1]=p[c][1],N[3*c+2]=p[c][2];const P=new Float32Array(3*I);for(let c=0;c<I;c++)P[3*c]=A[c][0],P[3*c+1]=A[c][1],P[3*c+2]=A[c][2];const m=[[w.POSITION,g],[w.NORMAL,d]],S=[[w.POSITION,{size:3,data:N,exclusive:!0}],[w.NORMAL,{size:3,data:P,exclusive:!0}]];return new y(S,m)}function E(t,l,u,f,O,p){const A=f?h(f):c(1,0,0),I=O?h(O):c(0,0,0);p=p??!0;const M=i();n(M,A);const g=i();s(g,M,Math.abs(t));const d=i();s(d,g,-.5),a(d,d,I);const N=c(0,1,0);Math.abs(1-r(M,N))<.2&&o(N,0,0,1);const P=i();e(P,M,N),n(P,P),e(N,P,M);const m=2*u+(p?2:0),S=u+(p?2:0),z=new Float32Array(3*m),v=new Float32Array(3*S),x=new Float32Array(2*m),L=new Array(3*u*(p?4:2)),T=new Array(3*u*(p?4:2));p&&(z[3*(m-2)+0]=d[0],z[3*(m-2)+1]=d[1],z[3*(m-2)+2]=d[2],x[2*(m-2)]=0,x[2*(m-2)+1]=0,z[3*(m-1)+0]=z[3*(m-2)+0]+g[0],z[3*(m-1)+1]=z[3*(m-2)+1]+g[1],z[3*(m-1)+2]=z[3*(m-2)+2]+g[2],x[2*(m-1)]=1,x[2*(m-1)+1]=1,v[3*(S-2)+0]=-M[0],v[3*(S-2)+1]=-M[1],v[3*(S-2)+2]=-M[2],v[3*(S-1)+0]=M[0],v[3*(S-1)+1]=M[1],v[3*(S-1)+2]=M[2]);const R=(t,e,n)=>{L[t]=e,T[t]=n};let b=0;const F=i(),U=i();for(let e=0;e<u;e++){const t=e*(2*Math.PI/u);s(F,N,Math.sin(t)),s(U,P,Math.cos(t)),a(F,F,U),v[3*e+0]=F[0],v[3*e+1]=F[1],v[3*e+2]=F[2],s(F,F,l),a(F,F,d),z[3*e+0]=F[0],z[3*e+1]=F[1],z[3*e+2]=F[2],x[2*e+0]=e/u,x[2*e+1]=0,z[3*(e+u)+0]=z[3*e+0]+g[0],z[3*(e+u)+1]=z[3*e+1]+g[1],z[3*(e+u)+2]=z[3*e+2]+g[2],x[2*(e+u)+0]=e/u,x[2*e+1]=1;const n=(e+1)%u;R(b++,e,e),R(b++,e+u,e),R(b++,n,n),R(b++,n,n),R(b++,e+u,e),R(b++,n+u,n)}if(p){for(let t=0;t<u;t++){const e=(t+1)%u;R(b++,m-2,S-2),R(b++,t,S-2),R(b++,e,S-2)}for(let t=0;t<u;t++){const e=(t+1)%u;R(b++,t+u,S-1),R(b++,m-1,S-1),R(b++,e+u,S-1)}}const V=[[w.POSITION,L],[w.NORMAL,T],[w.UV0,L]],j=[[w.POSITION,{size:3,data:z,exclusive:!0}],[w.NORMAL,{size:3,data:v,exclusive:!0}],[w.UV0,{size:2,data:x,exclusive:!0}]];return new y(j,V)}function X(t,e,n,s,a){n=n||10,s=null==s||s,N(t.length>1);const r=[[0,0,0]],o=[],l=[];for(let u=0;u<n;u++){o.push([0,-u-1,-(u+1)%n-1]);const t=u/n*2*Math.PI;l.push([Math.cos(t)*e,Math.sin(t)*e])}return k(l,t,r,o,s,a)}function k(r,u,h,M,g,d=c(0,0,0)){const N=r.length,P=new Float32Array(u.length*N*3+(6*h.length||0)),m=new Float32Array(u.length*N*3+(h?6:0)),S=new Array,z=new Array;let v=0,x=0;const L=i(),T=i(),R=i(),b=i(),F=i(),U=i(),V=i(),j=f(),G=i(),C=i(),E=i(),X=i(),k=i(),q=O();o(G,0,1,0),t(T,u[1],u[0]),n(T,T),g?(a(j,u[0],d),n(R,j)):o(R,0,0,1),J(T,R,G,G,F,R,K),l(b,R),l(X,F);for(let t=0;t<h.length;t++)s(U,F,h[t][0]),s(j,R,h[t][2]),a(U,U,j),a(U,U,u[0]),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2];m[x++]=-T[0],m[x++]=-T[1],m[x++]=-T[2];for(let t=0;t<M.length;t++)S.push(M[t][0]>0?M[t][0]:-M[t][0]-1+h.length),S.push(M[t][1]>0?M[t][1]:-M[t][1]-1+h.length),S.push(M[t][2]>0?M[t][2]:-M[t][2]-1+h.length),z.push(0),z.push(0),z.push(0);let Z=h.length;const B=h.length-1;for(let o=0;o<u.length;o++){let c=!1;if(o>0){l(L,T),o<u.length-1?(t(T,u[o+1],u[o]),n(T,T)):c=!0,a(C,L,T),n(C,C),a(E,u[o-1],b),p(u[o],C,q);A(q,I(E,L),j)?(t(j,j,u[o]),n(R,j),e(F,C,R),n(F,F)):J(C,b,X,G,F,R,K),l(b,R),l(X,F)}g&&(a(j,u[o],d),n(k,j));for(let t=0;t<N;t++)if(s(U,F,r[t][0]),s(j,R,r[t][1]),a(U,U,j),n(V,U),m[x++]=V[0],m[x++]=V[1],m[x++]=V[2],a(U,U,u[o]),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2],!c){const e=(t+1)%N;S.push(Z+t),S.push(Z+N+t),S.push(Z+e),S.push(Z+e),S.push(Z+N+t),S.push(Z+N+e);for(let t=0;t<6;t++){const e=S.length-6;z.push(S[e+t]-B)}}Z+=N}const D=u[u.length-1];for(let t=0;t<h.length;t++)s(U,F,h[t][0]),s(j,R,h[t][1]),a(U,U,j),a(U,U,D),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2];const H=x/3;m[x++]=T[0],m[x++]=T[1],m[x++]=T[2];const Q=Z-N;for(let t=0;t<M.length;t++)S.push(M[t][0]>=0?Z+M[t][0]:-M[t][0]-1+Q),S.push(M[t][2]>=0?Z+M[t][2]:-M[t][2]-1+Q),S.push(M[t][1]>=0?Z+M[t][1]:-M[t][1]-1+Q),z.push(H),z.push(H),z.push(H);const W=[[w.POSITION,S],[w.NORMAL,z]],Y=[[w.POSITION,{size:3,data:P,exclusive:!0}],[w.NORMAL,{size:3,data:m,exclusive:!0}]];return new y(Y,W)}function q(t,e,n){N(t.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),N(3===t[0].length,"createPolylineGeometry(): malformed vertex"),N(null==e||e.length===t.length,"createPolylineGeometry: need same number of points and normals"),N(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const s=new Float64Array(3*t.length),a=new Array(2*(t.length-1));let r=0,o=0;for(let c=0;c<t.length;c++){for(let e=0;e<3;e++)s[r++]=t[c][e];c>0&&(a[o++]=c-1,a[o++]=c)}const l=[],u=[];if(l.push([w.POSITION,a]),u.push([w.POSITION,{size:3,data:s,exclusive:!0}]),e){const n=new Float32Array(3*e.length);let s=0;for(let a=0;a<t.length;a++)for(let t=0;t<3;t++)n[s++]=e[a][t];l.push([w.NORMAL,a]),u.push([w.NORMAL,{size:3,data:n,exclusive:!0}])}return n&&(u.push([w.COLOR,{size:4,data:n}]),l.push([w.COLOR,d(n.length/4)])),new y(u,l,M.Line)}function Z(t,e,n,s,a=0){const r=new Array(18),o=[[-e,a,s/2],[n,a,s/2],[0,t+a,s/2],[-e,a,-s/2],[n,a,-s/2],[0,t+a,-s/2]],l=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let u=0;u<6;u++)r[3*u]=o[u][0],r[3*u+1]=o[u][1],r[3*u+2]=o[u][2];return new y([[w.POSITION,{size:3,data:r,exclusive:!0}]],[[w.POSITION,l]])}function B(t,e){const n=t.getMutableAttribute(w.POSITION).data;for(let s=0;s<n.length;s+=3){const t=n[s],a=n[s+1],r=n[s+2];o(Q,t,a,r),u(Q,Q,e),n[s]=Q[0],n[s+1]=Q[1],n[s+2]=Q[2]}}function D(t,e=t){const n=t.vertexAttributes,s=n.get(w.POSITION).data,a=n.get(w.NORMAL).data;if(a){const t=e.getMutableAttribute(w.NORMAL).data;for(let e=0;e<a.length;e+=3){const n=a[e+1];t[e+1]=-a[e+2],t[e+2]=n}}if(s){const t=e.getMutableAttribute(w.POSITION).data;for(let e=0;e<s.length;e+=3){const n=s[e+1];t[e+1]=-s[e+2],t[e+2]=n}}return e}function H(t,s,a,o,l){return!(Math.abs(r(s,t))>l)&&(e(a,t,s),n(a,a),e(o,a,t),n(o,o),!0)}function J(t,e,n,s,a,r,o){return H(t,e,a,r,o)||H(t,n,a,r,o)||H(t,s,a,r,o)}const K=.99619469809,Q=i();export{D as cgToGIS,v as createBoxGeometry,C as createConeGeometry,E as createCylinderGeometry,x as createDiamondGeometry,Z as createExtrudedTriangle,k as createPathExtrusionGeometry,U as createPointArrayGeometry,b as createPointGeometry,R as createPolySphereGeometry,q as createPolylineGeometry,T as createSphereGeometry,G as createSquareGeometry,L as createTetrahedronGeometry,V as createTriangleGeometry,X as createTubeGeometry,H as makeOrthoBasisDirUp,J as makeOrthoBasisDirUpFallback,B as transformInPlace,F as updatePointGeometry};
5
+ import{b as t,f as e,n,g as s,a,e as r,s as o,c as l,m as u}from"../../../../chunks/vec3.js";import{f as c,c as i,b as h}from"../../../../chunks/vec3f32.js";import{c as f}from"../../../../chunks/vec3f64.js";import{create as O,fromPositionAndNormal as p,intersectRay as A}from"../../../../geometry/support/plane.js";import{wrap as I}from"../../../../geometry/support/ray.js";import{PrimitiveType as M}from"./basicInterfaces.js";import{Vec3Compact as g}from"./BufferVectorMath.js";import{Geometry as y}from"./Geometry.js";import{generateDefaultIndexArray as d}from"./Indices.js";import{assert as N}from"./Util.js";import{VertexAttribute as w}from"./VertexAttribute.js";const P=g;var m,S,z;!function(t){const e=.5,n=[[-e,-e,e],[e,-e,e],[e,e,e],[-e,e,e],[-e,-e,-e],[e,-e,-e],[e,e,-e],[-e,e,-e]],s=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],a=[0,0,1,0,1,1,0,1],r=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],o=new Array(36);for(let c=0;c<6;c++)for(let t=0;t<6;t++)o[6*c+t]=c;const l=new Array(36);for(let c=0;c<6;c++)l[6*c+0]=0,l[6*c+1]=1,l[6*c+2]=2,l[6*c+3]=2,l[6*c+4]=3,l[6*c+5]=0;function u(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=n[s][0]*t[0],e[3*s+1]=n[s][1]*t[1],e[3*s+2]=n[s][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s}],[w.UV0,{size:2,data:a}]],[[w.POSITION,r],[w.NORMAL,o],[w.UV0,l]])}t.createGeometry=u}(m||(m={})),function(t){const e=.5,n=[[-e,0,-e],[e,0,-e],[e,0,e],[-e,0,e],[0,-e,0],[0,e,0]],s=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],a=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],r=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function o(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=n[s][0]*t[0],e[3*s+1]=n[s][1]*t[1],e[3*s+2]=n[s][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s}]],[[w.POSITION,a],[w.NORMAL,r]])}t.createGeometry=o}(S||(S={})),function(s){const a=.5,r=0,o=c(-a,r,-a),l=c(a,r,-a),u=c(0,r,a),h=c(0,r+a,0),f=i(),O=i(),p=i(),A=i(),I=i();t(f,o,h),t(O,o,l),e(p,f,O),n(p,p),t(f,l,h),t(O,l,u),e(A,f,O),n(A,A),t(f,u,h),t(O,u,o),e(I,f,O),n(I,I);const M=[o,l,u,h],g=[0,-1,0,p[0],p[1],p[2],A[0],A[1],A[2],I[0],I[1],I[2]],d=[0,1,2,3,1,0,3,2,1,3,0,2],N=[0,0,0,1,1,1,2,2,2,3,3,3];function P(t){Array.isArray(t)||(t=[t,t,t]);const e=new Array(12);for(let n=0;n<4;n++)e[3*n]=M[n][0]*t[0],e[3*n+1]=M[n][1]*t[1],e[3*n+2]=M[n][2]*t[2];return new y([[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:g}]],[[w.POSITION,d],[w.NORMAL,N]])}s.createGeometry=P}(z||(z={}));const v=m.createGeometry,x=S.createGeometry,L=z.createGeometry;function T(t,e,n,s={uv:!0}){const a=-Math.PI,r=2*Math.PI,o=-Math.PI/2,l=Math.PI,u=Math.max(3,Math.floor(e)),c=Math.max(2,Math.floor(n)),i=(u+1)*(c+1),h=new Float32Array(3*i),f=new Float32Array(3*i),O=new Float32Array(2*i),p=[];let A=0;for(let y=0;y<=c;y++){const e=[],n=y/c,s=o+n*l,i=Math.cos(s);for(let o=0;o<=u;o++){const l=o/u,c=a+l*r,p=Math.cos(c)*i,I=Math.sin(s),M=-Math.sin(c)*i;h[3*A]=p*t,h[3*A+1]=I*t,h[3*A+2]=M*t,f[3*A]=p,f[3*A+1]=I,f[3*A+2]=M,O[2*A]=l,O[2*A+1]=n,e.push(A),++A}p.push(e)}const I=new Array;for(let y=0;y<c;y++)for(let t=0;t<u;t++){const e=p[y][t],n=p[y][t+1],s=p[y+1][t+1],a=p[y+1][t];0===y?(I.push(e),I.push(s),I.push(a)):y===c-1?(I.push(e),I.push(n),I.push(s)):(I.push(e),I.push(n),I.push(s),I.push(s),I.push(a),I.push(e))}const M=[[w.POSITION,I],[w.NORMAL,I]],g=[[w.POSITION,{size:3,data:h,exclusive:!0}],[w.NORMAL,{size:3,data:f,exclusive:!0}]];return s.uv&&(g.push([w.UV0,{size:2,data:O,exclusive:!0}]),M.push([w.UV0,I])),s.offset&&(M[0][0]=w.OFFSET,g[0][0]=w.OFFSET,M.push([w.POSITION,new Array(I.length).fill(0)]),g.push([w.POSITION,{size:3,data:Float64Array.from(s.offset),exclusive:!0}])),new y(g,M)}function R(t,e,n){const s=t;let a,r;if(n)a=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;a=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let h=0;h<a.length;h+=3)P.scale(a,h,t/P.length(a,h));let o={};function l(e,n){e>n&&([e,n]=[n,e]);const s=e.toString()+"."+n.toString();if(o[s])return o[s];let r=a.length;return a.length+=3,P.add(a,3*e,a,3*n,a,r),P.scale(a,r,t/P.length(a,r)),r/=3,o[s]=r,r}for(let h=0;h<e;h++){const t=r.length,e=new Array(4*t);for(let n=0;n<t;n+=3){const t=r[n],s=r[n+1],a=r[n+2],o=l(t,s),u=l(s,a),c=l(a,t),i=4*n;e[i]=t,e[i+1]=o,e[i+2]=c,e[i+3]=s,e[i+4]=u,e[i+5]=o,e[i+6]=a,e[i+7]=c,e[i+8]=u,e[i+9]=o,e[i+10]=u,e[i+11]=c}r=e,o={}}const u=new Float32Array(a);for(let h=0;h<u.length;h+=3)P.normalize(u,h);const c=[[w.POSITION,r],[w.NORMAL,r]],i=[[w.POSITION,{size:3,data:new Float32Array(a),exclusive:!0}],[w.NORMAL,{size:3,data:u,exclusive:!0}]];return new y(i,c)}function b(t,e,n,s,a,r,o,l){const u=e?[e[0],e[1],e[2]]:[0,0,0],c=t?[t[0],t[1],t[2]]:[0,0,1];r=r||[0,0];const i=n?[255*n[0],255*n[1],255*n[2],n.length>3?255*n[3]:255]:[255,255,255,255],h=null!=s&&2===s.length?s:[1,1],f=[[w.POSITION,{size:3,data:u,exclusive:!0}],[w.NORMAL,{size:3,data:c,exclusive:!0}],[w.UV0,{size:r.length,data:r}],[w.COLOR,{size:4,data:i,exclusive:!0}],[w.SIZE,{size:2,data:h}]];if(null!=a){const t=new Float32Array([a[0],a[1],a[2],a[3]]);f.push([w.AUXPOS1,{size:4,data:t}])}if(null!=o){const t=new Float32Array([o[0],o[1],o[2],o[3]]);f.push([w.AUXPOS2,{size:4,data:t}])}return new y(f,null,M.Point,l)}function F(t,e,n,s,a,r,o,l){if(null!=t){const{data:e}=l.getMutableAttribute(w.NORMAL);e[0]=t[0],e[1]=t[1],e[2]=t[2]}if(null!=e){const{data:t}=l.getMutableAttribute(w.POSITION);t[0]=e[0],t[1]=e[1],t[2]=e[2]}if(null!=n){const{data:t}=l.getMutableAttribute(w.COLOR);t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]}if(null!=s){const{data:t}=l.getMutableAttribute(w.SIZE);t[0]=s[0],t[1]=s[1]}if(null!=a){const{data:t}=l.getMutableAttribute(w.AUXPOS1);t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3]}if(null!=r){const{data:t}=l.getMutableAttribute(w.UV0);t[0]=r[0],t[1]=r[1]}if(null!=o){const{data:t}=l.getMutableAttribute(w.AUXPOS2);t[0]=o[0],t[1]=o[1],t[2]=o[2],t[3]=o[3]}}function U(t,e){const n=new Float32Array(3*t.length),s=new Float32Array(e?3*t.length:3),a=new Array(t.length),r=new Array(t.length).fill(0);for(let c=0;c<t.length;c++)n[3*c]=t[c][0],n[3*c+1]=t[c][1],n[3*c+2]=t[c][2],e&&(s[3*c]=e[c][0],s[3*c+1]=e[c][1],s[3*c+2]=e[c][2]),a[c]=c;e||(s[0]=0,s[1]=1,s[2]=0);const o=[0,0],l=[[w.POSITION,a],[w.NORMAL,e?a:r],[w.UV0,r]],u=[[w.POSITION,{size:3,data:n,exclusive:!0}],[w.NORMAL,{size:3,data:s,exclusive:!0}],[w.UV0,{size:2,data:o,exclusive:!0}]];return new y(u,l,M.Point)}function V(){const t=[0,0,0,0,0,100,100,0,0],e=[0,1,2],n=[0,1,0],s=[0,0,0],a=[0,0],r=[0,0,0],o=[[w.POSITION,e],[w.NORMAL,s],[w.UV0,r]],l=[[w.POSITION,{size:3,data:t,exclusive:!0}],[w.NORMAL,{size:3,data:n,exclusive:!0}],[w.UV0,{size:2,data:a,exclusive:!0}]];return new y(l,o)}const j=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function G(t=j){const e=new Array(12);for(let c=0;c<4;c++)for(let n=0;n<3;n++)e[3*c+n]=t[c][n];const n=[0,1,2,2,3,0],s=[0,0,1],a=[0,0,0,0,0,0],r=[0,0,1,0,1,1,0,1],o=[255,255,255,255],l=[[w.POSITION,n],[w.NORMAL,a],[w.UV0,n],[w.COLOR,a]],u=[[w.POSITION,{size:3,data:e,exclusive:!0}],[w.NORMAL,{size:3,data:s,exclusive:!0}],[w.UV0,{size:2,data:r,exclusive:!0}],[w.COLOR,{size:4,data:o,exclusive:!0}]];return new y(u,l)}function C(t,e,n,s,a=!0,r=!0){let o=0;const l=e,u=t;let i=c(0,o,0),h=c(0,o+u,0),f=c(0,-1,0),O=c(0,1,0);s&&(o=u,h=c(0,0,0),i=c(0,o,0),f=c(0,1,0),O=c(0,-1,0));const p=[h,i],A=[f,O],I=n+2,M=Math.sqrt(u*u+l*l);if(s)for(let y=n-1;y>=0;y--){const t=y*(2*Math.PI/n),e=c(Math.cos(t)*l,o,Math.sin(t)*l);p.push(e);const s=c(u*Math.cos(t)/M,-l/M,u*Math.sin(t)/M);A.push(s)}else for(let y=0;y<n;y++){const t=y*(2*Math.PI/n),e=c(Math.cos(t)*l,o,Math.sin(t)*l);p.push(e);const s=c(u*Math.cos(t)/M,l/M,u*Math.sin(t)/M);A.push(s)}const g=new Array,d=new Array;if(a){for(let t=3;t<p.length;t++)g.push(1),g.push(t-1),g.push(t),d.push(0),d.push(0),d.push(0);g.push(p.length-1),g.push(2),g.push(1),d.push(0),d.push(0),d.push(0)}if(r){for(let t=3;t<p.length;t++)g.push(t),g.push(t-1),g.push(0),d.push(t),d.push(t-1),d.push(1);g.push(0),g.push(2),g.push(p.length-1),d.push(1),d.push(2),d.push(A.length-1)}const N=new Float32Array(3*I);for(let c=0;c<I;c++)N[3*c]=p[c][0],N[3*c+1]=p[c][1],N[3*c+2]=p[c][2];const P=new Float32Array(3*I);for(let c=0;c<I;c++)P[3*c]=A[c][0],P[3*c+1]=A[c][1],P[3*c+2]=A[c][2];const m=[[w.POSITION,g],[w.NORMAL,d]],S=[[w.POSITION,{size:3,data:N,exclusive:!0}],[w.NORMAL,{size:3,data:P,exclusive:!0}]];return new y(S,m)}function E(t,l,u,f,O,p){const A=f?h(f):c(1,0,0),I=O?h(O):c(0,0,0);p=p??!0;const M=i();n(M,A);const g=i();s(g,M,Math.abs(t));const d=i();s(d,g,-.5),a(d,d,I);const N=c(0,1,0);Math.abs(1-r(M,N))<.2&&o(N,0,0,1);const P=i();e(P,M,N),n(P,P),e(N,P,M);const m=2*u+(p?2:0),S=u+(p?2:0),z=new Float32Array(3*m),v=new Float32Array(3*S),x=new Float32Array(2*m),L=new Array(3*u*(p?4:2)),T=new Array(3*u*(p?4:2));p&&(z[3*(m-2)+0]=d[0],z[3*(m-2)+1]=d[1],z[3*(m-2)+2]=d[2],x[2*(m-2)]=0,x[2*(m-2)+1]=0,z[3*(m-1)+0]=z[3*(m-2)+0]+g[0],z[3*(m-1)+1]=z[3*(m-2)+1]+g[1],z[3*(m-1)+2]=z[3*(m-2)+2]+g[2],x[2*(m-1)]=1,x[2*(m-1)+1]=1,v[3*(S-2)+0]=-M[0],v[3*(S-2)+1]=-M[1],v[3*(S-2)+2]=-M[2],v[3*(S-1)+0]=M[0],v[3*(S-1)+1]=M[1],v[3*(S-1)+2]=M[2]);const R=(t,e,n)=>{L[t]=e,T[t]=n};let b=0;const F=i(),U=i();for(let e=0;e<u;e++){const t=e*(2*Math.PI/u);s(F,N,Math.sin(t)),s(U,P,Math.cos(t)),a(F,F,U),v[3*e+0]=F[0],v[3*e+1]=F[1],v[3*e+2]=F[2],s(F,F,l),a(F,F,d),z[3*e+0]=F[0],z[3*e+1]=F[1],z[3*e+2]=F[2],x[2*e+0]=e/u,x[2*e+1]=0,z[3*(e+u)+0]=z[3*e+0]+g[0],z[3*(e+u)+1]=z[3*e+1]+g[1],z[3*(e+u)+2]=z[3*e+2]+g[2],x[2*(e+u)+0]=e/u,x[2*e+1]=1;const n=(e+1)%u;R(b++,e,e),R(b++,e+u,e),R(b++,n,n),R(b++,n,n),R(b++,e+u,e),R(b++,n+u,n)}if(p){for(let t=0;t<u;t++){const e=(t+1)%u;R(b++,m-2,S-2),R(b++,t,S-2),R(b++,e,S-2)}for(let t=0;t<u;t++){const e=(t+1)%u;R(b++,t+u,S-1),R(b++,m-1,S-1),R(b++,e+u,S-1)}}const V=[[w.POSITION,L],[w.NORMAL,T],[w.UV0,L]],j=[[w.POSITION,{size:3,data:z,exclusive:!0}],[w.NORMAL,{size:3,data:v,exclusive:!0}],[w.UV0,{size:2,data:x,exclusive:!0}]];return new y(j,V)}function X(t,e,n,s,a){n=n||10,s=null==s||s,N(t.length>1);const r=[[0,0,0]],o=[],l=[];for(let u=0;u<n;u++){o.push([0,-u-1,-(u+1)%n-1]);const t=u/n*2*Math.PI;l.push([Math.cos(t)*e,Math.sin(t)*e])}return k(l,t,r,o,s,a)}function k(r,u,h,M,g,d=c(0,0,0)){const N=r.length,P=new Float32Array(u.length*N*3+(6*h.length||0)),m=new Float32Array(u.length*N*3+(h?6:0)),S=new Array,z=new Array;let v=0,x=0;const L=i(),T=i(),R=i(),b=i(),F=i(),U=i(),V=i(),j=f(),G=i(),C=i(),E=i(),X=i(),k=i(),q=O();o(G,0,1,0),t(T,u[1],u[0]),n(T,T),g?(a(j,u[0],d),n(R,j)):o(R,0,0,1),J(T,R,G,G,F,R,K),l(b,R),l(X,F);for(let t=0;t<h.length;t++)s(U,F,h[t][0]),s(j,R,h[t][2]),a(U,U,j),a(U,U,u[0]),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2];m[x++]=-T[0],m[x++]=-T[1],m[x++]=-T[2];for(let t=0;t<M.length;t++)S.push(M[t][0]>0?M[t][0]:-M[t][0]-1+h.length),S.push(M[t][1]>0?M[t][1]:-M[t][1]-1+h.length),S.push(M[t][2]>0?M[t][2]:-M[t][2]-1+h.length),z.push(0),z.push(0),z.push(0);let Z=h.length;const B=h.length-1;for(let o=0;o<u.length;o++){let c=!1;if(o>0){l(L,T),o<u.length-1?(t(T,u[o+1],u[o]),n(T,T)):c=!0,a(C,L,T),n(C,C),a(E,u[o-1],b),p(u[o],C,q);A(q,I(E,L),j)?(t(j,j,u[o]),n(R,j),e(F,C,R),n(F,F)):J(C,b,X,G,F,R,K),l(b,R),l(X,F)}g&&(a(j,u[o],d),n(k,j));for(let t=0;t<N;t++)if(s(U,F,r[t][0]),s(j,R,r[t][1]),a(U,U,j),n(V,U),m[x++]=V[0],m[x++]=V[1],m[x++]=V[2],a(U,U,u[o]),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2],!c){const e=(t+1)%N;S.push(Z+t),S.push(Z+N+t),S.push(Z+e),S.push(Z+e),S.push(Z+N+t),S.push(Z+N+e);for(let t=0;t<6;t++){const e=S.length-6;z.push(S[e+t]-B)}}Z+=N}const D=u[u.length-1];for(let t=0;t<h.length;t++)s(U,F,h[t][0]),s(j,R,h[t][1]),a(U,U,j),a(U,U,D),P[v++]=U[0],P[v++]=U[1],P[v++]=U[2];const H=x/3;m[x++]=T[0],m[x++]=T[1],m[x++]=T[2];const Q=Z-N;for(let t=0;t<M.length;t++)S.push(M[t][0]>=0?Z+M[t][0]:-M[t][0]-1+Q),S.push(M[t][2]>=0?Z+M[t][2]:-M[t][2]-1+Q),S.push(M[t][1]>=0?Z+M[t][1]:-M[t][1]-1+Q),z.push(H),z.push(H),z.push(H);const W=[[w.POSITION,S],[w.NORMAL,z]],Y=[[w.POSITION,{size:3,data:P,exclusive:!0}],[w.NORMAL,{size:3,data:m,exclusive:!0}]];return new y(Y,W)}function q(t,e,n){N(t.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),N(3===t[0].length,"createPolylineGeometry(): malformed vertex"),N(null==e||e.length===t.length,"createPolylineGeometry: need same number of points and normals"),N(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const s=new Float64Array(3*t.length),a=new Array(2*(t.length-1));let r=0,o=0;for(let c=0;c<t.length;c++){for(let e=0;e<3;e++)s[r++]=t[c][e];c>0&&(a[o++]=c-1,a[o++]=c)}const l=[],u=[];if(l.push([w.POSITION,a]),u.push([w.POSITION,{size:3,data:s,exclusive:!0}]),e){const n=new Float32Array(3*e.length);let s=0;for(let a=0;a<t.length;a++)for(let t=0;t<3;t++)n[s++]=e[a][t];l.push([w.NORMAL,a]),u.push([w.NORMAL,{size:3,data:n,exclusive:!0}])}return n&&(u.push([w.COLOR,{size:4,data:n}]),l.push([w.COLOR,d(n.length/4)])),new y(u,l,M.Line)}function Z(t,e,n,s,a=0){const r=new Array(18),o=[[-e,a,s/2],[n,a,s/2],[0,t+a,s/2],[-e,a,-s/2],[n,a,-s/2],[0,t+a,-s/2]],l=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let u=0;u<6;u++)r[3*u]=o[u][0],r[3*u+1]=o[u][1],r[3*u+2]=o[u][2];return new y([[w.POSITION,{size:3,data:r,exclusive:!0}]],[[w.POSITION,l]])}function B(t,e){const n=t.getMutableAttribute(w.POSITION).data;for(let s=0;s<n.length;s+=3){const t=n[s],a=n[s+1],r=n[s+2];o(Q,t,a,r),u(Q,Q,e),n[s]=Q[0],n[s+1]=Q[1],n[s+2]=Q[2]}}function D(t,e=t){const n=t.vertexAttributes,s=n.get(w.POSITION).data,a=n.get(w.NORMAL).data;if(a){const t=e.getMutableAttribute(w.NORMAL).data;for(let e=0;e<a.length;e+=3){const n=a[e+1];t[e+1]=-a[e+2],t[e+2]=n}}if(s){const t=e.getMutableAttribute(w.POSITION).data;for(let e=0;e<s.length;e+=3){const n=s[e+1];t[e+1]=-s[e+2],t[e+2]=n}}return e}function H(t,s,a,o,l){return!(Math.abs(r(s,t))>l)&&(e(a,t,s),n(a,a),e(o,a,t),n(o,o),!0)}function J(t,e,n,s,a,r,o){return H(t,e,a,r,o)||H(t,n,a,r,o)||H(t,s,a,r,o)}const K=.99619469809,Q=i();export{D as cgToGIS,v as createBoxGeometry,C as createConeGeometry,E as createCylinderGeometry,x as createDiamondGeometry,Z as createExtrudedTriangle,k as createPathExtrusionGeometry,U as createPointArrayGeometry,b as createPointGeometry,R as createPolySphereGeometry,q as createPolylineGeometry,T as createSphereGeometry,G as createSquareGeometry,L as createTetrahedronGeometry,V as createTriangleGeometry,X as createTubeGeometry,H as makeOrthoBasisDirUp,J as makeOrthoBasisDirUpFallback,B as transformInPlace,F as updatePointGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../core/maybe.js";import{generateUID as i}from"../../../../core/uid.js";import{I as r}from"../../../../chunks/mat4f64.js";import{b as o}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{f as e}from"../../../../chunks/vec4f64.js";import{projectBuffer as a}from"../../../../geometry/projection.js";import{PrimitiveType as n}from"./basicInterfaces.js";import{Geometry as h}from"./Geometry.js";import{fromValues as m}from"./LocalOriginFactory.js";import{Object3D as c}from"./Object3D.js";import{gridLocalOriginFactory as d}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as f}from"./WebGLLayer.js";import{RibbonLineMaterial as _}from"../materials/RibbonLineMaterial.js";class j{constructor(t,r=125e4){this._originSR=t,this._gridSize=r,this._origins=new Map,this._objects=new Map,this._rootOriginId="root/"+i()}getOrigin(i){const r=this._origins.get(this._rootOriginId);if(null==r){const r=d.rootOrigin;if(t(r))return this._origins.set(this._rootOriginId,m(r[0],r[1],r[2],this._rootOriginId)),this.getOrigin(i);const o=m(i[0]+Math.random()-.5,i[1]+Math.random()-.5,i[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,o),o}const s=this._gridSize,e=Math.round(i[0]/s),a=Math.round(i[1]/s),n=Math.round(i[2]/s),h=`${e}/${a}/${n}`;let c=this._origins.get(h);const g=.5*s;if(o(p,i,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(c){const t=Math.max(...p);o(p,i,c.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<t)return c}return r}return c||(c=m(e*s,a*s,n*s,h),this._origins.set(h,c)),c}_drawOriginBox(t,i=e(1,1,0,1)){const o=window.view,s=o._stage,m=i.toString();if(!this._objects.has(m)){this._material=new _({width:2,color:i}),s.add(this._material);const t=new f({isPickable:!1}),r=new c({castShadow:!1});s.add(r),t.add(r),s.add(t),this._objects.set(m,r)}const d=this._objects.get(m),j=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],p=j.length,b=new Array(3*p),l=new Array(2*(p-1)),u=.5*this._gridSize;for(let r=0;r<p;r++)b[3*r+0]=t[0]+(1&j[r]?u:-u),b[3*r+1]=t[1]+(2&j[r]?u:-u),b[3*r+2]=t[2]+(4&j[r]?u:-u),r>0&&(l[2*r+0]=r-1,l[2*r+1]=r);a(b,this._originSR,0,b,o.renderSpatialReference,0,p);const M=new h([[g.POSITION,{size:3,data:b,exclusive:!0}]],[[g.POSITION,l]],n.Line);s.add(M),d.addGeometry(M,this._material,r)}}const p=s();export{j as GridLocalOriginFactory};
5
+ import{isSome as t}from"../../../../core/maybe.js";import{generateUID as i}from"../../../../core/uid.js";import{I as r}from"../../../../chunks/mat4f64.js";import{b as s}from"../../../../chunks/vec3.js";import{c as o}from"../../../../chunks/vec3f64.js";import{f as e}from"../../../../chunks/vec4f64.js";import{projectBuffer as a}from"../../../../geometry/projection.js";import{PrimitiveType as n}from"./basicInterfaces.js";import{Geometry as h}from"./Geometry.js";import{fromValues as m}from"./LocalOriginFactory.js";import{Object3D as c}from"./Object3D.js";import{gridLocalOriginFactory as d}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as f}from"./WebGLLayer.js";import{RibbonLineMaterial as _}from"../materials/RibbonLineMaterial.js";class j{constructor(t){this._originSR=t,this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._rootOriginId="root/"+i()}getOrigin(i){const r=this._origins.get(this._rootOriginId);if(null==r){const r=d.rootOrigin;if(t(r))return this._origins.set(this._rootOriginId,m(r[0],r[1],r[2],this._rootOriginId)),this.getOrigin(i);const s=m(i[0]+Math.random()-.5,i[1]+Math.random()-.5,i[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,s),s}const o=this._gridSize,e=Math.round(i[0]/o),a=Math.round(i[1]/o),n=Math.round(i[2]/o),h=`${e}/${a}/${n}`;let c=this._origins.get(h);const g=.5*o;if(s(p,i,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(c){const t=Math.max(...p);s(p,i,c.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<t)return c}return r}return c||(c=m(e*o,a*o,n*o,h),this._origins.set(h,c)),c}_drawOriginBox(t,i=e(1,1,0,1)){const s=window.view,o=s._stage,m=i.toString();if(!this._objects.has(m)){this._material=new _({width:2,color:i}),o.add(this._material);const t=new f({isPickable:!1}),r=new c({castShadow:!1});o.add(r),t.add(r),o.add(t),this._objects.set(m,r)}const d=this._objects.get(m),j=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],p=j.length,b=new Array(3*p),u=new Array,l=.5*this._gridSize;for(let r=0;r<p;r++)b[3*r+0]=t[0]+(1&j[r]?l:-l),b[3*r+1]=t[1]+(2&j[r]?l:-l),b[3*r+2]=t[2]+(4&j[r]?l:-l),r>0&&u.push(r-1,r);a(b,this._originSR,0,b,s.renderSpatialReference,0,p);const M=new h([[g.POSITION,{size:3,data:b,exclusive:!0}]],[[g.POSITION,u]],n.Line);o.add(M),d.addGeometry(M,this._material,r)}get test(){const t=this;return{set gridSize(i){t._gridSize=i}}}}const p=o();export{j as GridLocalOriginFactory};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t,unwrapOr as r}from"../../../../core/maybe.js";import{c as s}from"../../../../chunks/mat4.js";import{c as i,I as e}from"../../../../chunks/mat4f64.js";import{a,v as n,g as o,l as h,c as d,n as c}from"../../../../chunks/vec3.js";import{c as l,U as m}from"../../../../chunks/vec3f64.js";import{t as f}from"../../../../chunks/vec4.js";import{c as y}from"../../../../chunks/vec4f64.js";import{create as u,fromPoints as p,copy as g}from"../../../../geometry/support/ray.js";import{ViewingMode as _}from"../../../ViewingMode.js";import{IntersectorOptions as O,StoreResults as L,IntersectorType as j}from"./IntersectorInterfaces.js";import{isValidIntersectorResult as v}from"./intersectorUtils.js";import{IntersectorTransform as E,getVerticalOffsetObject3D as w}from"./verticalOffsetUtils.js";import{isInstanceHidden as b}from"../materials/renderers/utils.js";const A=1e-5;class T{constructor(t){this.options=new O,this._results=new I,this.transform=new E,this.tolerance=A,this.verticalOffset=null,this._ray=u(),this._rayEnd=l(),this._rayBeginTransformed=l(),this._rayEndTransformed=l(),this.viewingMode=t??_.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,s){this.resetWithRay(p(t,r,this._ray),s)}resetWithRay(t,r){this.camera=r,t!==this._ray&&g(t,this._ray),0!==this.options.verticalOffset?this.viewingMode===_.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,a(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(r=null,s,i,e,a){this.point=s,this.filterPredicate=e,this.tolerance=i??A;const n=w(this.verticalOffset);if(t(r)&&r.length>0){const s=a?t=>{a(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const i of r){const r=i.getSpatialQueryAccelerator&&i.getSpatialQueryAccelerator();t(r)?(t(n)?r.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,s,n):r.forEachAlongRay(this._ray.origin,this._ray.direction,s),this.options.selectionMode&&this.options.hud&&r.forEachDegenerateObject(s)):i.objects.forAll((t=>s(t)))}}this.sortResults()}intersectObject(r){const s=r.geometryRecords;if(!s)return;const i=r.transformation,a=w(this.verticalOffset);for(const o of s){const{geometry:s,material:h,instanceParameters:d}=o;if(b(d))continue;const c=s.id;this.transform.setAndInvalidateLazyTransforms(i,o.getShaderTransformation()),n(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),n(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const l=this.transform.transform;t(a)&&(a.objectTransform=this.transform),h.intersect(s,d,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((s,i,a,n,o,h)=>{if(s>=0){if(t(this.filterPredicate)&&!this.filterPredicate(this._ray.origin,this._rayEnd,s))return;const d=n?this._results.hud:this._results,m=n?n=>{const d={object:r,geometryId:c,triangleNr:a,center:t(h)?[h[0],h[1],h[2]]:null};n.set(j.HUD,d,s,i,e,o)}:t=>t.set(j.OBJECT,{object:r,geometryId:c,triangleNr:a},s,i,l,o);if((null==d.min.drapedLayerOrder||o>=d.min.drapedLayerOrder)&&(null==d.min.dist||s<d.min.dist)&&m(d.min),this.options.store!==L.MIN&&(null==d.max.drapedLayerOrder||o<d.max.drapedLayerOrder)&&(null==d.max.dist||s>d.max.dist)&&m(d.max),this.options.store===L.ALL)if(n){const t=new M(this._ray);m(t),this._results.hud.all.push(t)}else{const t=new N(this._ray);m(t),this._results.all.push(t)}}}),o.shaderTransformation)}}sortResults(t=this._results.all){t.sort(((t,s)=>t.dist!==s.dist?r(t.dist,0)-r(s.dist,0):t.drapedLayerOrder!==s.drapedLayerOrder?r(t.drapedLayerOrder,Number.MAX_VALUE)-r(s.drapedLayerOrder,Number.MAX_VALUE):r(s.drapedLayerGraphicOrder,Number.MIN_VALUE)-r(t.drapedLayerGraphicOrder,Number.MIN_VALUE)))}}function x(t){return new T(t)}class I{constructor(){this.min=new N(u()),this.max=new N(u()),this.hud={min:new M(u()),max:new M(u()),all:new Array},this.ground=new N(u()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}class N{constructor(t){this.intersector=j.OBJECT,this.normal=l(),this.transformation=i(),this._ray=u(),this.init(t)}get ray(){return this._ray}get distanceInRenderSpace(){return t(this.dist)?(o(B,this.ray.direction,this.dist),h(B)):null}getIntersectionPoint(t){return!!v(this)&&(o(B,this.ray.direction,this.dist),a(t,this.ray.origin,B),!0)}getTransformedNormal(t){return d(R,this.normal),R[3]=0,f(R,R,this.transformation),d(t,R),c(t,t)}init(t){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=j.OBJECT,g(t,this._ray)}set(t,i,a,n,o,h,c){this.intersector=t,this.dist=a,d(this.normal,r(n,m)),s(this.transformation,r(o,e)),this.target=i,this.drapedLayerOrder=h,this.drapedLayerGraphicOrder=c}copy(t){g(t.ray,this._ray),this.intersector=t.intersector,this.dist=t.dist,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.drapedLayerGraphicOrder=t.drapedLayerGraphicOrder,d(this.normal,t.normal),s(this.transformation,t.transformation)}}class M extends N{constructor(){super(...arguments),this.intersector=j.HUD}}function U(t){return new N(t)}const B=l(),R=y();export{A as DEFAULT_TOLERANCE,x as newIntersector,U as newIntersectorResult};
5
+ import{isSome as t,unwrapOr as r}from"../../../../core/maybe.js";import{c as s}from"../../../../chunks/mat4.js";import{c as i,I as e}from"../../../../chunks/mat4f64.js";import{a,m as n,g as o,l as h,c as d,n as c}from"../../../../chunks/vec3.js";import{c as l,U as m}from"../../../../chunks/vec3f64.js";import{t as f}from"../../../../chunks/vec4.js";import{c as y}from"../../../../chunks/vec4f64.js";import{create as u,fromPoints as p,copy as g}from"../../../../geometry/support/ray.js";import{ViewingMode as _}from"../../../ViewingMode.js";import{IntersectorOptions as O,StoreResults as L,IntersectorType as j}from"./IntersectorInterfaces.js";import{isValidIntersectorResult as E}from"./intersectorUtils.js";import{IntersectorTransform as v,getVerticalOffsetObject3D as w}from"./verticalOffsetUtils.js";import{isInstanceHidden as b}from"../materials/renderers/utils.js";const A=1e-5;class T{constructor(t){this.options=new O,this._results=new I,this.transform=new v,this.tolerance=A,this.verticalOffset=null,this._ray=u(),this._rayEnd=l(),this._rayBeginTransformed=l(),this._rayEndTransformed=l(),this.viewingMode=t??_.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,s){this.resetWithRay(p(t,r,this._ray),s)}resetWithRay(t,r){this.camera=r,t!==this._ray&&g(t,this._ray),0!==this.options.verticalOffset?this.viewingMode===_.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,a(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(r=null,s,i,e,a){this.point=s,this.filterPredicate=e,this.tolerance=i??A;const n=w(this.verticalOffset);if(t(r)&&r.length>0){const s=a?t=>{a(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const i of r){const r=i.getSpatialQueryAccelerator&&i.getSpatialQueryAccelerator();t(r)?(t(n)?r.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,s,n):r.forEachAlongRay(this._ray.origin,this._ray.direction,s),this.options.selectionMode&&this.options.hud&&r.forEachDegenerateObject(s)):i.objects.forAll((t=>s(t)))}}this.sortResults()}intersectObject(r){const s=r.geometryRecords;if(!s)return;const i=r.transformation,a=w(this.verticalOffset);for(const o of s){const{geometry:s,material:h,instanceParameters:d}=o;if(b(d))continue;const c=s.id;this.transform.setAndInvalidateLazyTransforms(i,o.getShaderTransformation()),n(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),n(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const l=this.transform.transform;t(a)&&(a.objectTransform=this.transform),h.intersect(s,d,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((s,i,a,n,o,h)=>{if(s>=0){if(t(this.filterPredicate)&&!this.filterPredicate(this._ray.origin,this._rayEnd,s))return;const d=n?this._results.hud:this._results,m=n?n=>{const d={object:r,geometryId:c,triangleNr:a,center:t(h)?[h[0],h[1],h[2]]:null};n.set(j.HUD,d,s,i,e,o)}:t=>t.set(j.OBJECT,{object:r,geometryId:c,triangleNr:a},s,i,l,o);if((null==d.min.drapedLayerOrder||o>=d.min.drapedLayerOrder)&&(null==d.min.dist||s<d.min.dist)&&m(d.min),this.options.store!==L.MIN&&(null==d.max.drapedLayerOrder||o<d.max.drapedLayerOrder)&&(null==d.max.dist||s>d.max.dist)&&m(d.max),this.options.store===L.ALL)if(n){const t=new M(this._ray);m(t),this._results.hud.all.push(t)}else{const t=new N(this._ray);m(t),this._results.all.push(t)}}}),o.shaderTransformation)}}sortResults(t=this._results.all){t.sort(((t,s)=>t.dist!==s.dist?r(t.dist,0)-r(s.dist,0):t.drapedLayerOrder!==s.drapedLayerOrder?r(t.drapedLayerOrder,Number.MAX_VALUE)-r(s.drapedLayerOrder,Number.MAX_VALUE):r(s.drapedLayerGraphicOrder,Number.MIN_VALUE)-r(t.drapedLayerGraphicOrder,Number.MIN_VALUE)))}}function x(t){return new T(t)}class I{constructor(){this.min=new N(u()),this.max=new N(u()),this.hud={min:new M(u()),max:new M(u()),all:new Array},this.ground=new N(u()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}class N{constructor(t){this.intersector=j.OBJECT,this.normal=l(),this.transformation=i(),this._ray=u(),this.init(t)}get ray(){return this._ray}get distanceInRenderSpace(){return t(this.dist)?(o(B,this.ray.direction,this.dist),h(B)):null}getIntersectionPoint(t){return!!E(this)&&(o(B,this.ray.direction,this.dist),a(t,this.ray.origin,B),!0)}getTransformedNormal(t){return d(R,this.normal),R[3]=0,f(R,R,this.transformation),d(t,R),c(t,t)}init(t){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=j.OBJECT,g(t,this._ray)}set(t,i,a,n,o,h,c){this.intersector=t,this.dist=a,d(this.normal,r(n,m)),s(this.transformation,r(o,e)),this.target=i,this.drapedLayerOrder=h,this.drapedLayerGraphicOrder=c}copy(t){g(t.ray,this._ray),this.intersector=t.intersector,this.dist=t.dist,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.drapedLayerGraphicOrder=t.drapedLayerGraphicOrder,d(this.normal,t.normal),s(this.transformation,t.transformation)}}class M extends N{constructor(){super(...arguments),this.intersector=j.HUD}}function U(t){return new N(t)}const B=l(),R=y();export{A as DEFAULT_TOLERANCE,x as newIntersector,U as newIntersectorResult};