@arcgis/core 4.34.0-next.67 → 4.34.0-next.69

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 (181) hide show
  1. package/applications/Components/analysisUtils.d.ts +1 -0
  2. package/applications/Components/analysisUtils.js +1 -1
  3. package/applications/MapViewer/mediaUtils.d.ts +1 -0
  4. package/applications/MapViewer/mediaUtils.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/functions/measures.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/097a5c333de28ec5e16f.js +1 -0
  9. package/assets/esri/core/workers/chunks/2f44848916051f5501eb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2cd27b06226e30aec5da.js → 3cef77453623bbb37ad2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3d2629357242492afcfa.js +1 -0
  12. package/assets/esri/core/workers/chunks/49486c2e12e768b347ed.js +1 -0
  13. package/assets/esri/core/workers/chunks/{cad03967e132a28512c2.js → 4aa98309081e6889ccbb.js} +1 -1
  14. package/assets/esri/core/workers/chunks/570b17a1a4ab405bbdcb.js +1 -0
  15. package/assets/esri/core/workers/chunks/5a6b487b70ca85a45f57.js +1 -0
  16. package/assets/esri/core/workers/chunks/5a95688651d7e8b7101d.js +1 -0
  17. package/assets/esri/core/workers/chunks/6433116597021a9af680.js +1 -0
  18. package/assets/esri/core/workers/chunks/{5d8c64693830506c8776.js → 643acb12ec6a1d4b4fbb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{90491262b6d6a126c32f.js → 7944c18b270c85ff2e41.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{35df19d1eab3a694c3fa.js → 978fab0f0b10edde4ff8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{27027493a8dba8305693.js → a07321a901d6847d1a6b.js} +1 -1
  22. package/assets/esri/core/workers/chunks/a6f66492651646c18f10.js +1 -0
  23. package/assets/esri/core/workers/chunks/{a44f17397d8589433dae.js → b683b0fa7fc430b4d9c5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{2f7e192ee2066f863e1d.js → c908184d747d33366881.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{997a2a1a51039ce7e4e3.js → dd84f630466a26722d57.js} +1 -1
  26. package/assets/esri/core/workers/chunks/e2486bf5546443408c85.js +1 -0
  27. package/assets/esri/core/workers/chunks/{96102a9296afd1bfe1a9.js → e956d437c0c2ea81db93.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{d6f5297f7b323c340727.js → f060a52a9b69eb250d63.js} +1 -1
  29. package/assets/esri/core/workers/chunks/f1865b28f0f75cadd716.js +1 -0
  30. package/assets/esri/core/workers/chunks/{06ff5f34ad9bdf9705de.js → f47a0b9e500af2b9453b.js} +8 -2
  31. package/assets/esri/core/workers/chunks/f8adac87e48ea86bec21.js +1 -0
  32. package/assets/esri/core/workers/chunks/fe475b1ecdefecfcd541.js +1 -0
  33. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  34. package/assets/esri/themes/dark/main.css +1 -1
  35. package/assets/esri/themes/light/main.css +1 -1
  36. package/assets/esri/themes/light/view.css +1 -1
  37. package/chunks/ComponentShader.glsl.js +42 -36
  38. package/chunks/LineSeries.js +1 -1
  39. package/config.js +1 -1
  40. package/core/MemCache.js +1 -1
  41. package/core/MemCachePool.js +1 -1
  42. package/editing/geometry/lineUtils.js +1 -1
  43. package/geometry/ellipsoidUtils.js +1 -1
  44. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  45. package/geometry/support/curves/circleUtils.js +1 -1
  46. package/geometry/support/curves/curveLength.js +1 -1
  47. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  48. package/interfaces.d.ts +72 -527
  49. package/kernel.js +1 -1
  50. package/layers/support/ElevationTileData.js +1 -1
  51. package/layers/support/gaussianSplatUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/support/elevationInfoUtils.js +1 -1
  54. package/support/revision.js +1 -1
  55. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  56. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  57. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  58. package/views/2d/interactive/editingTools/MediaTransformToolsWrapper.js +5 -0
  59. package/views/3d/analysis/ElevationProfile/ElevationProfileSceneLineComputation.js +1 -1
  60. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +5 -0
  61. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  62. package/views/3d/glTF/loader.js +1 -1
  63. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  64. package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
  65. package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
  66. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  67. package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
  68. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  69. package/views/3d/layers/I3SMeshView3D.js +1 -1
  70. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  71. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  72. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  73. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  74. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  75. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  76. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  77. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  78. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  80. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  81. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  82. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  83. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  84. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  85. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  87. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  88. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  89. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  90. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  93. package/views/3d/layers/graphics/Labeler.js +1 -1
  94. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  95. package/views/3d/layers/graphics/QueryEngineCache.js +1 -1
  96. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  97. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  98. package/views/3d/layers/i3s/CachedMeshData.js +1 -1
  99. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  100. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  101. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  102. package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
  103. package/views/3d/layers/support/FeatureTile.js +1 -1
  104. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  105. package/views/3d/support/CombinedElevationProvider.js +1 -1
  106. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  107. package/views/3d/terrain/MapDataCacheItem.js +5 -0
  108. package/views/3d/terrain/OverlayManager.js +1 -1
  109. package/views/3d/terrain/OverlayRenderer.js +1 -1
  110. package/views/3d/terrain/TerrainSurface.js +1 -1
  111. package/views/3d/terrain/Tile.js +1 -1
  112. package/views/3d/terrain/TileTexture.js +1 -1
  113. package/views/3d/webgl/ManagedFBO.js +1 -1
  114. package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
  115. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  116. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  117. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  118. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  119. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  120. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +8 -2
  121. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  122. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  125. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  126. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  127. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  128. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  129. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +17 -0
  130. package/views/GroundView.js +1 -1
  131. package/views/analysis/ElevationProfile/ElevationProfileChart.js +5 -0
  132. package/views/analysis/ElevationProfile/constants.js +1 -1
  133. package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +5 -0
  134. package/views/analysis/ElevationProfile/elevationProfileChartTheme.js +5 -0
  135. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  136. package/views/webgl/Texture.js +1 -1
  137. package/views/webgl/VertexArrayObject.js +1 -1
  138. package/widgets/Bookmarks.js +1 -1
  139. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  140. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  141. package/widgets/Editor/support/EditorItem.js +1 -1
  142. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  143. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  144. package/widgets/Expand.js +1 -1
  145. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  146. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  147. package/widgets/support/SelectionList.js +1 -1
  148. package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +0 -1
  149. package/assets/esri/core/workers/chunks/0f20c0eec850a39620a1.js +0 -1
  150. package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +0 -1
  151. package/assets/esri/core/workers/chunks/39d69afc9da9db0c75ab.js +0 -1
  152. package/assets/esri/core/workers/chunks/548818df658b607a364e.js +0 -1
  153. package/assets/esri/core/workers/chunks/70dc7ec6474f0801bc04.js +0 -1
  154. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +0 -1
  155. package/assets/esri/core/workers/chunks/8a104b35708a492bd614.js +0 -1
  156. package/assets/esri/core/workers/chunks/a634764dec5404f4a1d7.js +0 -1
  157. package/assets/esri/core/workers/chunks/bafd9b0f6e817252cb31.js +0 -1
  158. package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +0 -1
  159. package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +0 -1
  160. package/assets/esri/core/workers/chunks/f4d4c1f13522f20b00d1.js +0 -1
  161. package/graphic/BuildingGraphicOrigin.d.ts +0 -4
  162. package/graphic/CSVGraphicOrigin.d.ts +0 -4
  163. package/graphic/CatalogGraphicOrigin.d.ts +0 -4
  164. package/graphic/FeatureGraphicOrigin.d.ts +0 -4
  165. package/graphic/GeoJSONGraphicOrigin.d.ts +0 -4
  166. package/graphic/GeoRSSGraphicOrigin.d.ts +0 -4
  167. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +0 -4
  168. package/graphic/MapImageGraphicOrigin.d.ts +0 -4
  169. package/graphic/MapNotesGraphicOrigin.d.ts +0 -4
  170. package/graphic/OGCFeatureGraphicOrigin.d.ts +0 -4
  171. package/graphic/OrientedImageryGraphicOrigin.d.ts +0 -4
  172. package/graphic/ParquetGraphicOrigin.d.ts +0 -4
  173. package/graphic/PointCloudGraphicOrigin.d.ts +0 -4
  174. package/graphic/SceneGraphicOrigin.d.ts +0 -4
  175. package/graphic/StreamGraphicOrigin.d.ts +0 -4
  176. package/graphic/SubtypeGroupGraphicOrigin.d.ts +0 -4
  177. package/graphic/TileGraphicOrigin.d.ts +0 -4
  178. package/graphic/VoxelGraphicOrigin.d.ts +0 -4
  179. package/graphic/WCSGraphicOrigin.d.ts +0 -4
  180. package/graphic/WFSGraphicOrigin.d.ts +0 -4
  181. package/graphic/graphicOrigins.d.ts +0 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.67",
3
+ "version": "4.34.0-next.69",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{verticalLengthUnitFromSpatialReference as e,convertUnit as n}from"../core/unitUtils.js";import{getMetersPerUnit as t}from"../symbols/support/unitConversionUtils.js";function o(e){return e?j:z}function r(e,n){return n?.mode?n.mode:o(e).mode}function u(e,n){return null!=n?n:o(e)}function i(e,n){return r(null==e||(e.hasZ??!1),n)}function s(e,n){return u(null==e||(e.hasZ??!1),n)}function l(e){const n=g(e);return i(e.geometry,n)}function a(e){const n=g(e),t=i(e.geometry,n),o=null!=n&&"on-the-ground"!==t?R(n):0,r=n?.featureExpressionInfo;return{mode:t,offset:o,featureExpressionInfo:r}}function f(e){return v(a(e))}function c(e){return v(e)||d(e)}function d(e){return"0"===e?.featureExpressionInfo?.expression}function v(e){if(!e)return!1;if("on-the-ground"===e.mode)return!1;const n=e?.featureExpressionInfo?e.featureExpressionInfo.expression:null;return!(!n||"0"===n)}function g(e){return e.layer&&"elevationInfo"in e.layer?e.layer.elevationInfo:null}function h(t,o){if(!t?.offset)return 0;const{offset:r,unit:u}=t;if("decimal-degrees"===u)return 0;const i="unknown"!==u&&u?u:"meters",s=e(o);return s?n(r,i,s):0}function p(e,n,t){if(!t?.mode)return;const o=e.hasZ?e.z:0,r=h(t,e.spatialReference);switch(t.mode){case"absolute-height":return o-r;case"on-the-ground":return 0;case"relative-to-ground":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"ground")??0)+r);case"relative-to-scene":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"scene")??0)+r)}}function m(e,n,t,o=null){return E(e,n.x,n.y,n.hasZ?n.z:0,n.spatialReference,t,o)}function x(e,n,t,o,r=null){return E(e,n[0],n[1],n.length>2?n[2]:0,t,o,r)}function E(e,n,t,o,r,u,i=null){if(null==u)return;const s=null!=i?i.mode:"absolute-height";if("on-the-ground"===s)return 0;const{absoluteZ:l}=b(n,t,o,r,e,u);return I(l,n,t,o,r,e,i,s)}function b(e,n,t,o,r,u){const i=h(u,o);switch(u.mode){case"absolute-height":return{absoluteZ:t+i,elevation:0};case"on-the-ground":{const t=r.elevationProvider.getElevation(e,n,0,o,"ground")??0;return{absoluteZ:t,elevation:t}}case"relative-to-ground":{const u=r.elevationProvider.getElevation(e,n,t,o,"ground")??0;return{absoluteZ:t+u+i,elevation:u}}case"relative-to-scene":{const u=r.elevationProvider.getElevation(e,n,t,o,"scene")??0;return{absoluteZ:t+u+i,elevation:u}}}}function I(e,n,t,o,r,u,i,s){const l=h(i,r);switch(s){case"absolute-height":return e-l;case"relative-to-ground":return e-((u.elevationProvider.getElevation(n,t,o,r,"ground")??0)+l);case"relative-to-scene":return e-((u.elevationProvider.getElevation(n,t,o,r,"scene")??0)+l)}}function y(e,n){if(null==n)return!1;const{mode:t}=n;return null!=t&&("scene"===e&&"relative-to-scene"===t||"ground"===e&&"absolute-height"!==t)}function Z(e,n,t){return t&&t.mode!==n?`${e} only support ${n} elevation mode`:null}function P(e,n,t){return t?.mode===n?`${e} do not support ${n} elevation mode`:null}function w(e,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function $(e,n){n&&e.warn(".elevationInfo=",n)}function R(e){return(e?.offset??0)*t(e?.unit)}const j={mode:"absolute-height",offset:0},z={mode:"on-the-ground",offset:null};export{j as absoluteHeightElevationInfo,y as elevationContextAffectsAlignment,Z as elevationModeRequiredMessage,P as elevationModeUnsupportedMessage,d as featureExpressionInfoIsZero,w as featureExpressionUnsupportedMessage,m as getConvertedElevation,x as getConvertedElevationFromVector,E as getConvertedElevationFromXYZ,u as getEffectiveElevationInfo,r as getEffectiveElevationMode,h as getElevationOffset,R as getElevationOffsetInMeters,s as getGeometryEffectiveElevationInfo,i as getGeometryEffectiveElevationMode,a as getGraphicEffectiveElevationInfo,l as getGraphicEffectiveElevationMode,p as getZForElevationMode,v as hasEffectiveFeatureExpressionInfo,c as hasFeatureExpressionInfo,f as hasGraphicFeatureExpressionInfo,$ as logInvalidElevationInfoWarning,z as onTheGroundElevationInfo,b as zValueInAbsoluteHeightMode};
5
+ import{verticalLengthUnitFromSpatialReference as e,convertUnit as n}from"../core/unitUtils.js";import{getMetersPerUnit as t}from"../symbols/support/unitConversionUtils.js";function o(e){return e?j:z}function r(e,n){return n?.mode?n.mode:o(e).mode}function u(e,n){return null!=n?n:o(e)}function i(e,n){return r(null==e||(e.hasZ??!1),n)}function s(e,n){return u(null==e||(e.hasZ??!1),n)}function l(e){const n=g(e);return i(e.geometry,n)}function a(e){const n=g(e),t=i(e.geometry,n),o=null!=n&&"on-the-ground"!==t?R(n):0,r=n?.featureExpressionInfo;return{mode:t,offset:o,featureExpressionInfo:r}}function f(e){return v(a(e))}function c(e){return v(e)||d(e)}function d(e){return"0"===e?.featureExpressionInfo?.expression}function v(e){if(!e)return!1;if("on-the-ground"===e.mode)return!1;const n=e?.featureExpressionInfo?e.featureExpressionInfo.expression:null;return!(!n||"0"===n)}function g(e){return e.layer&&"elevationInfo"in e.layer?e.layer.elevationInfo:null}function h(t,o){if(!t?.offset)return 0;const{offset:r,unit:u}=t;if("decimal-degrees"===u)return 0;const i="unknown"!==u&&u?u:"meters",s=e(o);return s?n(r,i,s):0}function p(e,n,t){if(!t?.mode)return;const o=e.hasZ?e.z:0,r=h(t,e.spatialReference);switch(t.mode){case"absolute-height":return o-r;case"on-the-ground":return 0;case"relative-to-ground":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"ground")??0)+r);case"relative-to-scene":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"scene")??0)+r)}}function m(e,n,t,o=null){return E(e,n.x,n.y,n.hasZ?n.z:0,n.spatialReference,t,o)}function x(e,n,t,o,r=null){return E(e,n[0],n[1],n.length>2?n[2]:0,t,o,r)}function E(e,n,t,o,r,u,i=null){if(null==u)return;const s=null!=i?i.mode:"absolute-height";if("on-the-ground"===s)return 0;const{absoluteZ:l}=b(n,t,o,r,e,u);return I(l,n,t,o,r,e,i,s)}function b(e,n,t,o,r,u){const i=h(u,o);switch(u.mode){case"absolute-height":return{absoluteZ:t+i,elevation:0};case"on-the-ground":{const t=r.elevationProvider.getElevation(e,n,0,o,"ground")??0;return{absoluteZ:t,elevation:t}}case"relative-to-ground":{const u=r.elevationProvider.getElevation(e,n,t,o,"ground")??0;return{absoluteZ:t+u+i,elevation:u}}case"relative-to-scene":{const u=r.elevationProvider.getElevation(e,n,t,o,"scene")??0;return{absoluteZ:t+u+i,elevation:u}}}}function I(e,n,t,o,r,u,i,s){const l=h(i,r);switch(s){case"absolute-height":return e-l;case"relative-to-ground":return e-((u.elevationProvider.getElevation(n,t,o,r,"ground")??0)+l);case"relative-to-scene":return e-((u.elevationProvider.getElevation(n,t,o,r,"scene")??0)+l)}}function y(e,n){if(null==n)return!1;const{mode:t}=n;return null!=t&&("scene"===e&&"relative-to-scene"===t||"ground"===e&&"absolute-height"!==t)}function Z(e,n,t){return t&&t.mode!==n?`${e} only support ${n} elevation mode`:null}function P(e,n,t){return t?.mode===n?`${e} do not support ${n} elevation mode`:null}function w(e,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function $(e,n){n&&e.warn(".elevationInfo=",n)}function R(e){return(e?.offset??0)*t(e?.unit)}const j={mode:"absolute-height",offset:0},z={mode:"on-the-ground",offset:null};export{j as absoluteHeightElevationInfo,y as elevationContextAffectsAlignment,Z as elevationModeRequiredMessage,P as elevationModeUnsupportedMessage,d as featureExpressionInfoIsZero,w as featureExpressionUnsupportedMessage,m as getConvertedElevation,x as getConvertedElevationFromVector,E as getConvertedElevationFromXYZ,u as getEffectiveElevationInfo,r as getEffectiveElevationMode,h as getElevationOffset,R as getElevationOffsetInMeters,s as getGeometryEffectiveElevationInfo,i as getGeometryEffectiveElevationMode,a as getGraphicEffectiveElevationInfo,l as getGraphicEffectiveElevationMode,p as getZForElevationMode,c as hasFeatureExpressionInfo,f as hasGraphicFeatureExpressionInfo,$ as logInvalidElevationInfoWarning,z as onTheGroundElevationInfo,b as zValueInAbsoluteHeightMode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const e="20250826",f="10c0f118e0e96375ffc983aa84d21ee9bb040fde";export{e as buildDate,f as commitHash};
5
+ const c="20250828",e="b08e88ca486e7ece4d3dc7cbf57094161583a438";export{c as buildDate,e as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import"../../tiling/TileInfoView.js";import r from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{deserializeSymbols as n}from"./decluttering/util.js";import{BufferObject as i}from"../../../webgl/BufferObject.js";import{VertexArrayObject as s}from"../../../webgl/VertexArrayObject.js";import{VertexBuffer as a}from"../../../webgl/VertexBuffer.js";class o{constructor(t,e){this.layerUIDs=[],this.isDestroyed=!1,this._data=t;let r=1;const n=new Uint32Array(t);this.layerUIDs=[];const i=n[r++];for(let s=0;s<i;s++)this.layerUIDs[s]=n[r++];this.bufferDataOffset=r,e&&(this.layer=e.getStyleLayerByUID(this.layerUIDs[0]))}get isPreparedForRendering(){return null==this._data}get offset(){return this.bufferDataOffset}get data(){return this._data}destroy(){this.isDestroyed||(this.doDestroy(),this._data=null,this.isDestroyed=!0)}prepareForRendering(t){null!=this._data&&(this.doPrepareForRendering(t,this._data,this.bufferDataOffset),this._data=null)}}class h extends o{constructor(t,e){super(t,e),this.type=2,this.lineIndexStart=0,this.lineIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.lineIndexStart=r[n++],this.lineIndexCount=r[n++];const i=r[n++];if(i>0){this.patternMap=new Map;for(let t=0;t<i;t++){const t=r[n++],e=r[n++],i=r[n++];this.patternMap.set(t,[e,i])}}this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.vao?.cachedMemory??0)}hasData(){return this.lineIndexCount>0}triangleCount(){return this.lineIndexCount/3}doDestroy(){this.vao=t(this.vao)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer.lineMaterial,f=new a(t,l.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const c=n[r++],y=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,c));r+=c,this.vao=new s(t,f,y)}}class l extends o{constructor(t,e){super(t,e),this.type=1,this.fillIndexStart=0,this.fillIndexCount=0,this.outlineIndexStart=0,this.outlineIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.fillIndexStart=r[n++],this.fillIndexCount=r[n++],this.outlineIndexStart=r[n++],this.outlineIndexCount=r[n++];const i=r[n++];if(i>0){this.patternMap=new Map;for(let t=0;t<i;t++){const t=r[n++],e=r[n++],i=r[n++];this.patternMap.set(t,[e,i])}}this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.fillVAO?.cachedMemory??0)+(this.outlineVAO?.cachedMemory??0)}hasData(){return this.fillIndexCount>0||this.outlineIndexCount>0}triangleCount(){return(this.fillIndexCount+this.outlineIndexCount)/3}doDestroy(){this.fillVAO=t(this.fillVAO),this.outlineVAO=t(this.outlineVAO)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer,f=l.fillMaterial,c=new a(t,f.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const y=n[r++],u=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,y));r+=y;const d=n[r++],p=l.outlineMaterial,g=new a(t,p.geometryLayout,new Int32Array(o.buffer,4*r,d));r+=d;const w=n[r++],I=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,w));r+=w,this.fillVAO=new s(t,c,u),this.outlineVAO=new s(t,g,I)}}class f extends o{constructor(t,e,i){super(t,e),this.type=3,this.iconPerPageElementsMap=new Map,this.glyphPerPageElementsMap=new Map,this.symbolInstances=[],this.isIconSDF=!1,this.opacityChanged=!1,this.lastOpacityUpdate=0,this.symbols=[];const s=new Uint32Array(t),a=new Int32Array(t),o=new Float32Array(t);let h=this.bufferDataOffset;this.isIconSDF=!!s[h++];const l=s[h++],f=s[h++],c=s[h++],y=new r(l,f,c,0),u=s[h++];for(let r=0;r<u;r++){const t=s[h++],e=s[h++],r=s[h++];this.iconPerPageElementsMap.set(t,[e,r])}const d=s[h++];for(let r=0;r<d;r++){const t=s[h++],e=s[h++],r=s[h++];this.glyphPerPageElementsMap.set(t,[e,r])}const p=s[h++],g=s[h++];this.iconOpacity=new Int32Array(p),this.textOpacity=new Int32Array(g),h=n(s,a,o,h,this.symbols,i,y),this.bufferDataOffset=h}get usedMemory(){return(this.data?.byteLength??0)+(this.iconVAO?.cachedMemory??0)+(this.textVAO?.cachedMemory??0)+e(this.iconOpacity)+e(this.textOpacity)}hasData(){return this.iconPerPageElementsMap.size>0||this.glyphPerPageElementsMap.size>0}triangleCount(){let t=0;for(const e of this.iconPerPageElementsMap.values())t+=e[1];for(const e of this.glyphPerPageElementsMap.values())t+=e[1];return t/3}doDestroy(){this.iconVAO=t(this.iconVAO),this.textVAO=t(this.textVAO)}updateOpacityInfo(){if(!this.opacityChanged)return;this.opacityChanged=!1;const t=this.iconOpacity,e=this.iconVAO.buffer("opacity");t.length>0&&t.byteLength===e.usedMemory&&e.setSubData(t,0,0,t.length);const r=this.textOpacity,n=this.textVAO.buffer("opacity");r.length>0&&r.byteLength===n.usedMemory&&n.setSubData(r,0,0,r.length)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer,f=l.iconMaterial,c=new a(t,f.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const y=n[r++],u=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,y));r+=y;const d=n[r++],p=l.textMaterial,g=new a(t,p.geometryLayout,new Int32Array(o.buffer,4*r,d));r+=d;const w=n[r++],I=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,w));r+=w;const m=new a(t,f.opacityLayout,this.iconOpacity.buffer),b=new a(t,p.opacityLayout,this.textOpacity.buffer);this.iconVAO=new s(t,new Map([["geometry",c],["opacity",m]]),u),this.textVAO=new s(t,new Map([["geometry",g],["opacity",b]]),I)}}class c extends o{constructor(t,e){super(t,e),this.type=4,this.circleIndexStart=0,this.circleIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.circleIndexStart=r[n++],this.circleIndexCount=r[n++],this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.vao?.cachedMemory??0)}hasData(){return this.circleIndexCount>0}triangleCount(){return this.circleIndexCount/3}doDestroy(){this.vao=t(this.vao)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer.circleMaterial,f=new a(t,l.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const c=n[r++],y=i.createIndex(t,35044,new Uint32Array(n.buffer,4*r,c));r+=c,this.vao=new s(t,f,y)}}export{c as CircleRenderBucket,l as FillRenderBucket,h as LineRenderBucket,o as RenderBucketBase,f as SymbolRenderBucket};
5
+ import{disposeMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import"../../tiling/TileInfoView.js";import r from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{deserializeSymbols as n}from"./decluttering/util.js";import{BufferObject as s}from"../../../webgl/BufferObject.js";import{VertexArrayObject as i}from"../../../webgl/VertexArrayObject.js";import{VertexBuffer as a}from"../../../webgl/VertexBuffer.js";class o{constructor(t,e){this.layerUIDs=[],this.isDestroyed=!1,this._data=t;let r=1;const n=new Uint32Array(t);this.layerUIDs=[];const s=n[r++];for(let i=0;i<s;i++)this.layerUIDs[i]=n[r++];this.bufferDataOffset=r,e&&(this.layer=e.getStyleLayerByUID(this.layerUIDs[0]))}get isPreparedForRendering(){return null==this._data}get offset(){return this.bufferDataOffset}get data(){return this._data}destroy(){this.isDestroyed||(this.doDestroy(),this._data=null,this.isDestroyed=!0)}prepareForRendering(t){null!=this._data&&(this.doPrepareForRendering(t,this._data,this.bufferDataOffset),this._data=null)}}class h extends o{constructor(t,e){super(t,e),this.type=2,this.lineIndexStart=0,this.lineIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.lineIndexStart=r[n++],this.lineIndexCount=r[n++];const s=r[n++];if(s>0){this.patternMap=new Map;for(let t=0;t<s;t++){const t=r[n++],e=r[n++],s=r[n++];this.patternMap.set(t,[e,s])}}this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.vao?.usedMemory??0)}hasData(){return this.lineIndexCount>0}triangleCount(){return this.lineIndexCount/3}doDestroy(){this.vao=t(this.vao)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer.lineMaterial,f=new a(t,l.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const u=n[r++],y=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,u));r+=u,this.vao=new i(t,f,y)}}class l extends o{constructor(t,e){super(t,e),this.type=1,this.fillIndexStart=0,this.fillIndexCount=0,this.outlineIndexStart=0,this.outlineIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.fillIndexStart=r[n++],this.fillIndexCount=r[n++],this.outlineIndexStart=r[n++],this.outlineIndexCount=r[n++];const s=r[n++];if(s>0){this.patternMap=new Map;for(let t=0;t<s;t++){const t=r[n++],e=r[n++],s=r[n++];this.patternMap.set(t,[e,s])}}this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.fillVAO?.usedMemory??0)+(this.outlineVAO?.usedMemory??0)}hasData(){return this.fillIndexCount>0||this.outlineIndexCount>0}triangleCount(){return(this.fillIndexCount+this.outlineIndexCount)/3}doDestroy(){this.fillVAO=t(this.fillVAO),this.outlineVAO=t(this.outlineVAO)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer,f=l.fillMaterial,u=new a(t,f.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const y=n[r++],c=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,y));r+=y;const d=n[r++],p=l.outlineMaterial,g=new a(t,p.geometryLayout,new Int32Array(o.buffer,4*r,d));r+=d;const w=n[r++],I=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,w));r+=w,this.fillVAO=new i(t,u,c),this.outlineVAO=new i(t,g,I)}}class f extends o{constructor(t,e,s){super(t,e),this.type=3,this.iconPerPageElementsMap=new Map,this.glyphPerPageElementsMap=new Map,this.symbolInstances=[],this.isIconSDF=!1,this.opacityChanged=!1,this.lastOpacityUpdate=0,this.symbols=[];const i=new Uint32Array(t),a=new Int32Array(t),o=new Float32Array(t);let h=this.bufferDataOffset;this.isIconSDF=!!i[h++];const l=i[h++],f=i[h++],u=i[h++],y=new r(l,f,u,0),c=i[h++];for(let r=0;r<c;r++){const t=i[h++],e=i[h++],r=i[h++];this.iconPerPageElementsMap.set(t,[e,r])}const d=i[h++];for(let r=0;r<d;r++){const t=i[h++],e=i[h++],r=i[h++];this.glyphPerPageElementsMap.set(t,[e,r])}const p=i[h++],g=i[h++];this.iconOpacity=new Int32Array(p),this.textOpacity=new Int32Array(g),h=n(i,a,o,h,this.symbols,s,y),this.bufferDataOffset=h}get usedMemory(){return(this.data?.byteLength??0)+(this.iconVAO?.usedMemory??0)+(this.textVAO?.usedMemory??0)+e(this.iconOpacity)+e(this.textOpacity)}hasData(){return this.iconPerPageElementsMap.size>0||this.glyphPerPageElementsMap.size>0}triangleCount(){let t=0;for(const e of this.iconPerPageElementsMap.values())t+=e[1];for(const e of this.glyphPerPageElementsMap.values())t+=e[1];return t/3}doDestroy(){this.iconVAO=t(this.iconVAO),this.textVAO=t(this.textVAO)}updateOpacityInfo(){if(!this.opacityChanged)return;this.opacityChanged=!1;const t=this.iconOpacity,e=this.iconVAO.buffer("opacity");t.length>0&&t.byteLength===e.usedMemory&&e.setSubData(t,0,0,t.length);const r=this.textOpacity,n=this.textVAO.buffer("opacity");r.length>0&&r.byteLength===n.usedMemory&&n.setSubData(r,0,0,r.length)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer,f=l.iconMaterial,u=new a(t,f.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const y=n[r++],c=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,y));r+=y;const d=n[r++],p=l.textMaterial,g=new a(t,p.geometryLayout,new Int32Array(o.buffer,4*r,d));r+=d;const w=n[r++],I=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,w));r+=w;const m=new a(t,f.opacityLayout,this.iconOpacity.buffer),b=new a(t,p.opacityLayout,this.textOpacity.buffer);this.iconVAO=new i(t,new Map([["geometry",u],["opacity",m]]),c),this.textVAO=new i(t,new Map([["geometry",g],["opacity",b]]),I)}}class u extends o{constructor(t,e){super(t,e),this.type=4,this.circleIndexStart=0,this.circleIndexCount=0;const r=new Uint32Array(t);let n=this.bufferDataOffset;this.circleIndexStart=r[n++],this.circleIndexCount=r[n++],this.bufferDataOffset=n}get usedMemory(){return(this.data?.byteLength??0)+(this.vao?.usedMemory??0)}hasData(){return this.circleIndexCount>0}triangleCount(){return this.circleIndexCount/3}doDestroy(){this.vao=t(this.vao)}doPrepareForRendering(t,e,r){const n=new Uint32Array(e),o=new Int32Array(n.buffer),h=n[r++],l=this.layer.circleMaterial,f=new a(t,l.geometryLayout,new Int32Array(o.buffer,4*r,h));r+=h;const u=n[r++],y=s.createIndex(t,35044,new Uint32Array(n.buffer,4*r,u));r+=u,this.vao=new i(t,f,y)}}export{u as CircleRenderBucket,l as FillRenderBucket,h as LineRenderBucket,o as RenderBucketBase,f as SymbolRenderBucket};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{MinPriority as e}from"../../../../core/MemCache.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{create as o}from"../../../../geometry/support/aaBoundingRect.js";import{tilePixelSize as s}from"./constants.js";import{TileHandler as r}from"./TileHandler.js";import{VectorTile as n}from"./VectorTile.js";import l from"../../tiling/TileInfoViewPOT.js";import a from"../../tiling/TileKey.js";class g extends r{constructor(e,t,i,o){super(e,t,i,e.tileInfo.lods.length-1),this._memCache=o,this._vectorTiles=new Map,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map,this._tileInfoView=new l(e.tileInfo,e.fullExtent)}destroy(){super.destroy(),this._ongoingRequestToController.forEach(e=>e.abort()),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear(),this._vectorTiles.clear()}async getVectorTile(r,l){const g=new a(r[0],r[1],r[2],0);let h=this._vectorTiles.get(g.id)??this._memCache.get(g.id);if(h)return h.retain(),h;const c=await this._getVectorTileData(g);if(t(l),!this._layer)return null;if(h=this._vectorTiles.get(g.id)??this._memCache.get(g.id),h)return h.retain(),h;const T=this._layer.tileInfo.getTileBounds(o(),g),m=this._tileInfoView.getTileResolution(r[0]);return h=new n(g,m,T[0],T[3],s,s,this._styleRepository,this),h.setData(c),c&&(h.retain(),this._memCache.put(g.id,h,e),this._vectorTiles.set(g.id,h)),h.neededForCoverage=!0,h.transforms.tileUnitsToPixels=i(1/8,0,0,0,1/8,0,0,0,1),h}updateTileSize(e){this._memCache.updateSize(e.id,e)}onDisposeTile(e){this._vectorTiles.delete(e.id)}_getVectorTileData(e){const t=e.id;if(this._ongoingTileRequests.has(t))return this._ongoingTileRequests.get(t);const i=new AbortController,o={signal:i.signal},s=this._getParsedVectorTileData(e,o).then(e=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),e)).catch(()=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),null));return this._ongoingTileRequests.set(t,s),this._ongoingRequestToController.set(t,i),s}_getParsedVectorTileData(e,t){return this.fetchTileData(e,t).then(i=>this.parseTileData({key:e,data:i},t))}}export{g as default};
5
+ import{MinPriority as e}from"../../../../core/MemCache.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{create as o}from"../../../../geometry/support/aaBoundingRect.js";import{tilePixelSize as s}from"./constants.js";import{TileHandler as r}from"./TileHandler.js";import{VectorTile as n}from"./VectorTile.js";import l from"../../tiling/TileInfoViewPOT.js";import a from"../../tiling/TileKey.js";class g extends r{constructor(e,t,i,o){super(e,t,i,e.tileInfo.lods.length-1),this._memCache=o,this._vectorTiles=new Map,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map,this._tileInfoView=new l(e.tileInfo,e.fullExtent)}destroy(){super.destroy(),this._ongoingRequestToController.forEach(e=>e.abort()),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear(),this._vectorTiles.clear()}async getVectorTile(r,l){const g=new a(r[0],r[1],r[2],0);let h=this._vectorTiles.get(g.id)??this._memCache.get(g.id);if(h)return h.retain(),h;const c=await this._getVectorTileData(g);if(t(l),!this._layer)return null;if(h=this._vectorTiles.get(g.id)??this._memCache.get(g.id),h)return h.retain(),h;const T=this._layer.tileInfo.getTileBounds(o(),g),m=this._tileInfoView.getTileResolution(r[0]);return h=new n(g,m,T[0],T[3],s,s,this._styleRepository,this),h.setData(c),c&&(h.retain(),this._memCache.put(g.id,h,e),this._vectorTiles.set(g.id,h)),h.neededForCoverage=!0,h.transforms.tileUnitsToPixels=i(1/8,0,0,0,1/8,0,0,0,1),h}updateTileSize(e){this._memCache.updateSize(e.id)}onDisposeTile(e){this._vectorTiles.delete(e.id)}_getVectorTileData(e){const t=e.id;if(this._ongoingTileRequests.has(t))return this._ongoingTileRequests.get(t);const i=new AbortController,o={signal:i.signal},s=this._getParsedVectorTileData(e,o).then(e=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),e)).catch(()=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),null));return this._ongoingTileRequests.set(t,s),this._ongoingRequestToController.set(t,i),s}_getParsedVectorTileData(e,t){return this.fetchTileData(e,t).then(i=>this.parseTileData({key:e,data:i},t))}}export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{identity as e,translate as t,rotate as s,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileCoordSize as i}from"./constants.js";import{CircleRenderBucket as o,SymbolRenderBucket as h,LineRenderBucket as n,FillRenderBucket as l}from"./RenderBucket.js";import{fadeDuration as c}from"./decluttering/config.js";import{TiledDisplayObject as d}from"../webgl/TiledDisplayObject.js";const u=null;class y extends d{constructor(e,t,s,r,a,o,h,n=null){super(e,t,s,r,a,o,i,i),this.styleRepository=h,this._owner=n,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=e.id}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<c}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<c)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,3===e.type&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._owner?.updateTileSize(this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(y._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this._owner?.onDisposeTile(this),this.dispose(),this.stage=null)}retain(){++this._referenced}get cachedMemory(){return this._usedMemory}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),3===i.type&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._owner?.updateTileSize(this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())3===s.type&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(a){super.setTransform(a);const i=this.resolution/(a.resolution*a.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];a.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*a.rotation/180),r(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:a(),tileMat3:a(),tileUnitsToPixels:a()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case 1:s=new l(e,this.styleRepository);break;case 2:s=new n(e,this.styleRepository);break;case 3:s=new h(e,this.styleRepository,this);break;case 4:s=new o(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{y as VectorTile,u as tracer};
5
+ import"../../../../core/has.js";import{identity as e,translate as t,rotate as s,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileCoordSize as i}from"./constants.js";import{CircleRenderBucket as o,SymbolRenderBucket as h,LineRenderBucket as n,FillRenderBucket as l}from"./RenderBucket.js";import{fadeDuration as c}from"./decluttering/config.js";import{TiledDisplayObject as d}from"../webgl/TiledDisplayObject.js";const u=null;class y extends d{constructor(e,t,s,r,a,o,h,n=null){super(e,t,s,r,a,o,i,i),this.styleRepository=h,this._owner=n,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=e.id}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<c}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<c)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,3===e.type&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._owner?.updateTileSize(this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(y._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this._owner?.onDisposeTile(this),this.dispose(),this.stage=null)}retain(){++this._referenced}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),3===i.type&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._owner?.updateTileSize(this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())3===s.type&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(a){super.setTransform(a);const i=this.resolution/(a.resolution*a.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];a.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*a.rotation/180),r(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:a(),tileMat3:a(),tileUnitsToPixels:a()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case 1:s=new l(e,this.styleRepository);break;case 2:s=new n(e,this.styleRepository);break;case 3:s=new h(e,this.styleRepository,this);break;case 4:s=new o(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{y as VectorTile,u as tracer};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import t from"../../../../core/Accessor.js";import{watch as e}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{ControlPointsTransformTool as a}from"./ControlPointsTransformTool.js";import{TransformTool as r}from"./TransformTool.js";const n={redo:"r",undo:"z"};let d=class extends t{constructor(o){super(o),this._transformTool=null,this._controlPointsTransformTool=null,this._advancedModeTransformTool=null,this._activeTool=null,this._sharedUndoStack=[],this._sharedRedoStack=[],this._originalOpacity=null,this.activeHandle=0}initialize(){const{view:o,mediaElement:t,preserveAspectRatio:s,snapRotation:i,advancedMode:d}=this;this._originalOpacity=t.opacity,this._transformTool=new r({target:t,view:o,preserveAspectRatio:s,snapRotation:i}),this._controlPointsTransformTool=new a({mediaElement:t,view:o}),this._advancedModeTransformTool=new a({mediaElement:d.mediaElement,view:d.view}),this._transformTool.setSharedUndoStack(this._sharedUndoStack),this._transformTool.setSharedRedoStack(this._sharedRedoStack),this._controlPointsTransformTool.setSharedUndoStack(this._sharedUndoStack),this._controlPointsTransformTool.setSharedRedoStack(this._sharedRedoStack),this._advancedModeTransformTool.setSharedUndoStack(this._sharedUndoStack),this._advancedModeTransformTool.setSharedRedoStack(this._sharedRedoStack);const l=t.georeference,c=d.mediaElement.georeference;d.view.tools.addMany([this._advancedModeTransformTool]),"controlPoints"in c&&"controlPoints"in l&&this.addHandles([d.view.on("key-down",o=>{o.key===n.undo&&this.canUndo()&&(this.undo(),o.stopPropagation()),o.key===n.redo&&this.canRedo()&&(this.redo(),o.stopPropagation())}),d.view.on("focus",async o=>{this._controlPointsTransformTool.removeHighlightActiveHandle(),await this._advancedModeTransformTool.highlightActiveHandle()}),e(()=>c.controlPoints,o=>{l.controlPoints=o.map(({sourcePoint:o},t)=>({sourcePoint:o,mapPoint:l.controlPoints[t].mapPoint})),this._activeTool?.refresh()}),e(()=>this._controlPointsTransformTool.activeHandle,o=>{this._advancedModeTransformTool.updateActiveHandle(o),this.activeHandle=o}),e(()=>this._advancedModeTransformTool.activeHandle,o=>{this._controlPointsTransformTool.updateActiveHandle(o),this.activeHandle=o})]),this.addHandles([o.on("key-down",o=>{o.key===n.undo&&this.canUndo()&&(this.undo(),o.stopPropagation()),o.key===n.redo&&this.canRedo()&&(this.redo(),o.stopPropagation())}),o.on("focus",async o=>{this._advancedModeTransformTool.removeHighlightActiveHandle(),await this._controlPointsTransformTool.highlightActiveHandle()})]),o.tools.addMany([this._transformTool,this._controlPointsTransformTool]),o.activeTool=this._transformTool,this._activeTool=this._transformTool,o.focus()}destroy(){this._transformTool?.destroy(),this._controlPointsTransformTool?.destroy(),this._transformTool=null,this._controlPointsTransformTool=null,this._advancedModeTransformTool=null,this._activeTool=null,this._sharedUndoStack=null,this._sharedRedoStack=null}canUndo(){return this._sharedUndoStack.length>0}canRedo(){return this._sharedRedoStack.length>0}undo(){if(this._sharedUndoStack.length>0){const{tool:o,operation:t}=this._sharedUndoStack.pop();o!==this._activeTool&&o.refresh(),t.undo(),o.updateGraphics(),this._sharedRedoStack.push({tool:o,operation:t}),this._activeTool!==o&&this._activeTool?.refresh()}}redo(){if(this._sharedRedoStack.length>0){const{tool:o,operation:t}=this._sharedRedoStack.pop();o!==this._activeTool&&o.refresh(),t.apply(),o.updateGraphics(),this._sharedUndoStack.push({tool:o,operation:t}),this._activeTool!==o&&this._activeTool?.refresh()}}refresh(){this._activeTool.refresh()}reset(){this._activeTool.reset(),this._advancedModeTransformTool.reset()}async enableAdvancedMode(){this.view.activeTool=this._controlPointsTransformTool,this._activeTool=this._controlPointsTransformTool,this._activeTool.refresh(),await this.advancedMode.view.when(),this.advancedMode.view.activeTool=this._advancedModeTransformTool,this._originalOpacity=this._controlPointsTransformTool.mediaElement.opacity,this._controlPointsTransformTool.mediaElement.opacity=.25*this._originalOpacity}disableAdvancedMode(){this.view.activeTool=this._transformTool,this._activeTool=this._transformTool,this._activeTool.refresh(),this.advancedMode.view.activeTool=null,this._controlPointsTransformTool.mediaElement.opacity=this._originalOpacity}};o([s()],d.prototype,"activeHandle",void 0),o([s({constructOnly:!0})],d.prototype,"advancedMode",void 0),o([s()],d.prototype,"preserveAspectRatio",void 0),o([s()],d.prototype,"snapRotation",void 0),o([s({constructOnly:!0,nonNullable:!0})],d.prototype,"mediaElement",void 0),o([s({constructOnly:!0})],d.prototype,"view",void 0),d=o([i("esri.views.2d.interactive.editingTools.MediaTransformToolsWrapper")],d);export{d as MediaTransformToolsWrapper,n as keys};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{throwIfAborted as i}from"../../../../core/promiseUtils.js";import{watch as o,whenOnce as n}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as s}from"../../../../core/unitUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as c}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../../../geometry/ellipsoidUtils.js";import{create as m,fromPoints as d}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as y}from"../../../../layers/support/ElevationQuery.js";import{externalToInternalIntersectOptions as f}from"../../support/hitTest.js";import{Intersector as v}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as h}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{getInputGraphic as _}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{ElevationProfileLineComputation as g}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const w=2e5;let j=class extends g{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,i,o,n,s)=>({inputGraphicUid:b(e),visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s})),this._vecA=p(),this._vecB=p(),this._ray=m()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*s(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([o(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const o=this._queryElevationDependencies;if(null==o)throw new Error(`${this.declaredClass}: no dependencies`);const s=this._intersector;if(null==s)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:l,view:a,spatialReference:p}=o;await n(()=>a.stationary&&!a.interacting,{signal:r}),i(r);const u=a.renderCoordsHelper,m=a.sceneIntersectionHelper,f=this._vecA,v=this._vecA,h=this._vecB,_=this._ray;if(!p)return{geometry:e,noDataValue:t};const g=await y.fromGeometry(e).project(p,r);if(!g)return{geometry:e,noDataValue:t};const j=g.coordinates,b=j.length;for(let i=0;i<b;++i){const e=j[i];c(h,e.x,e.y,e.z??0),u.toRenderCoords(h,p,h),u.setAltitude(f,w,h);const r=d(f,h,_);m.computeIntersection(r,s,!0,l);const n=I(o,s.results.all);n?(n.getIntersectionPoint(v),u.fromRenderCoords(v,v,p),e.z=v[2]):e.z=t}return{geometry:g.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:i}=this.profileLine;return f(e,{include:r,exclude:[...this._pointCloudLayers,...t(i)?i:i?[i]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?u(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new v(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function I({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=h(o,e);if(null==i||b(i)!==t)return o}return null}function b(e){const t=_(e);if(!t)return null;if(t.layer&&"objectIdField"in t.layer){const e=t.attributes[t.layer.objectIdField];if(e)return`o-${t.layer.id}-${e}`}return`u-${t.uid}`}e([l({readOnly:!0})],j.prototype,"minDemResolution",null),e([l()],j.prototype,"_queryElevationDependencies",null),e([l()],j.prototype,"_visibleLayers",null),e([l()],j.prototype,"_intersectOptions",null),e([l()],j.prototype,"_pointCloudLayers",null),e([l()],j.prototype,"_view",null),e([l()],j.prototype,"_maxIntersectionDistance",null),e([l()],j.prototype,"_intersector",null),j=e([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileSceneLineComputation")],j);export{j as ElevationProfileSceneLineComputation};
5
+ import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as o}from"../../../../core/unitUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as u}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as m}from"../../../../layers/support/ElevationQuery.js";import{externalToInternalIntersectOptions as d}from"../../support/hitTest.js";import{Intersector as y}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{getInputGraphic as v}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{ElevationProfileLineComputation as h}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const _=2e5;let w=class extends h{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,i,o,n,s)=>({inputGraphicUid:j(e),visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s})),this._vecA=a(),this._vecB=a(),this._ray=p()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*o(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([i(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const i=this._queryElevationDependencies;if(null==i)throw new Error(`${this.declaredClass}: no dependencies`);const o=this._intersector;if(null==o)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:n,view:s,spatialReference:a}=i,c=s.renderCoordsHelper,p=s.sceneIntersectionHelper,d=this._vecA,y=this._vecA,f=this._vecB,v=this._ray;if(!a)return{geometry:e,noDataValue:t};const h=await m.fromGeometry(e).project(a,r);if(!h)return{geometry:e,noDataValue:t};const w=h.coordinates,j=w.length;for(let m=0;m<j;++m){const e=w[m];l(f,e.x,e.y,e.z??0),c.toRenderCoords(f,a,f),c.setAltitude(d,_,f);const r=u(d,f,v);p.computeIntersection(r,o,!0,n);const s=g(i,o.results.all);s?(s.getIntersectionPoint(y),c.fromRenderCoords(y,y,a),e.z=y[2]):e.z=t}return{geometry:h.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:i}=this.profileLine;return d(e,{include:r,exclude:[...this._pointCloudLayers,...t(i)?i:i?[i]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?c(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new y(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function g({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=f(o,e);if(null==i||j(i)!==t)return o}return null}function j(e){const t=v(e);if(!t)return null;if(t.layer&&"objectIdField"in t.layer){const e=t.attributes[t.layer.objectIdField];if(e)return`o-${t.layer.id}-${e}`}return`u-${t.uid}`}e([n({readOnly:!0})],w.prototype,"minDemResolution",null),e([n()],w.prototype,"_queryElevationDependencies",null),e([n()],w.prototype,"_visibleLayers",null),e([n()],w.prototype,"_intersectOptions",null),e([n()],w.prototype,"_pointCloudLayers",null),e([n()],w.prototype,"_view",null),e([n()],w.prototype,"_maxIntersectionDistance",null),e([n()],w.prototype,"_intersector",null),w=e([s("esri.views.3d.analysis.ElevationProfile.ElevationProfileSceneLineComputation")],w);export{w as ElevationProfileSceneLineComputation};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as t}from"tslib";import{deg2rad as i}from"../../../../core/mathUtils.js";import{watch as e,sync as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{rotateZ as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as l,m as p}from"../../../../chunks/vec32.js";import{fromArray as c,clone as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as h,sm4d as u}from"../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as d}from"../Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as f}from"../Slice/sliceToolUtils.js";import{calculateTranslateRotateFromBases as y}from"../../interactive/manipulatorUtils.js";import{screenToZConstrained as v}from"../../interactive/editingTools/dragEventPipeline3D.js";import{createManipulatorDragEventPipeline as g}from"../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as j}from"../../../interactive/InteractiveToolBase.js";let M=class extends j{constructor(t){super(t)}initialize(){const{view:t}=this;this._shiftManipulator=new d(t,0),this._shiftManipulator.state|=f,this.manipulators.add(this._shiftManipulator),this.addHandles([this._createDragPipeline(),e(()=>this.analysisViewData.targetGeometry,()=>this._updateManipulatorPosition(),s),e(()=>[this.analysisViewData.interactive,this.analysisViewData.targetGeometry,this.analysis.measureType],()=>this._updateManipulatorVisibility(),o)]),this.finishToolCreation()}destroy(){this._shiftManipulator.destroy()}_createDragPipeline(){return g(this._shiftManipulator,(t,i,e)=>{const s=m(t.renderLocation),o=this.analysis.cutFillOptions.targetElevation;i.next(v(this.view,s,this.view.spatialReference)).next(this._updateValue()),e.next(()=>{this.analysis.cutFillOptions.targetElevation=o})})}_updateManipulatorPosition(){const{targetGeometry:t}=this.analysisViewData,{renderCoordsHelper:e}=this.view;if(!t)return;const s=.5,o=t.rings[0],a=c(o[0]),r=c(o[1]);e.toRenderCoords(a,t.spatialReference,a),e.toRenderCoords(r,t.spatialReference,r);const d=h.get();l(d,r,a);const f=h.get();p(f,a,r,s);const v=e.worldBasisAtPosition(f,1,h.get()),g=e.worldBasisAtPosition(f,0,h.get()),j=y(v,g,f,u.get()),M=e.headingAtPosition(f,d),w=t.isClockwise(t.rings[0])?-Math.PI/2:Math.PI/2;n(j,j,i(M)+w),j[12]=0,j[13]=0,j[14]=0,this._shiftManipulator.renderLocation=m(f),this._shiftManipulator.modelTransform=j}_updateManipulatorVisibility(){const{interactive:t,targetGeometry:i}=this.analysisViewData,{measureType:e}=this.analysis,s=t&&null!=i&&"cut-fill"===e;this._shiftManipulator.available=s}_updateValue(){const{analysis:t}=this;return i=>(t.cutFillOptions.targetElevation=i.mapEnd.z,i)}};t([a({constructOnly:!0})],M.prototype,"analysis",void 0),t([a({constructOnly:!0})],M.prototype,"view",void 0),t([a({constructOnly:!0})],M.prototype,"analysisViewData",void 0),M=t([r("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementShiftTool")],M);export{M as VolumeMeasurementShiftTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as r,isAborted as o,createResolver as h,createAbortError as c,onAbort as p}from"../../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import u from"../../../../layers/GraphicsLayer.js";import _ from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as k,isPolygonGraphic as g}from"./volumeMeasurementGeometryUtils.js";import G from"../../../../widgets/Sketch/SketchViewModel.js";const w=Symbol("interactive-operation");let v=class extends s{constructor(e){super(e),this._updatingHandles=new y,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{view:e}=this;this._graphicsLayer=new u({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}}),this._sketchViewModel=new G({layer:this._graphicsLayer,view:e,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol}),this.addHandles(this._sketchViewModel.on(["undo","redo"],this._onUndoRedo)),this.addHandles(n(()=>({map:e.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(b(e,t),s){case"idle":case"sketching":break;case"awaiting-sketch":this.analysisViewData.interactive=!0;break;case"reshaping":this._startReshape();break;case"reshaping-disabled":this._stopOperation(),this._ensureUpdatedSketchGraphic()}},l))}destroy(){this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new _({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._startPlaceOperation(e,(t,s)=>{const i=this.analysis.clone(),h=this._sketchViewModel.on("create",e=>{switch(e.state){case"complete":this._updateGeometryFromSketchGraphic(),this._stopOperation();break;case"cancel":this._stopOperation();break;case"active":this._updateGeometryFromSketchGraphic();break;case"start":this.sketchGraphic=e.graphic}});return this._ensureUpdatedSketchGraphic(),this._updatingHandles.addPromise(r(this._sketchViewModel.create("polygon"))),a(()=>(h.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?o(e)||i.equals(this.analysis)?s():void t():(this._clearGeometry(),s())))})}async _startPlaceOperation(e,t){const s=h(),i=t(()=>s.resolve({}),()=>s.reject(c()));return p(e,()=>this._stopOperation()),this._replaceHandles([i,p(e,()=>this._stopOperation())],w),await s.promise}_startReshape(){this._stopOperation();const e=this._sketchViewModel.on("update",e=>{this._updateGeometryFromSketchGraphic(),"complete"===e.state&&("reshaping"===this.state?this._startReshape():this._stopOperation())});this._replaceHandles(a(()=>{e.remove(),this._sketchViewModel.cancel()}),w);const t=this._ensureUpdatedSketchGraphic();t&&this._updatingHandles.addPromise(r(this._sketchViewModel.update(t,{tool:"reshape"})))}_stopOperation(){this.removeHandles(w)}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return k(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this._graphicsLayer.add(this.sketchGraphic),this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=g(e)?e.geometry:null}_replaceHandles(e,t){this.removeHandles(t),this.addHandles((Array.isArray(e)?e:[e]).filter(i),t)}};function b(e,t){t&&(t.parent&&"remove"in t.parent&&t.parent.remove(t),e?.add(t))}e([d({constructOnly:!0})],v.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],v.prototype,"view",void 0),e([d({constructOnly:!0})],v.prototype,"analysis",void 0),e([d()],v.prototype,"sketchGraphic",null),e([d({nonNullable:!0})],v.prototype,"state",null),e([d()],v.prototype,"updating",null),e([d()],v.prototype,"_polygonSymbol",null),v=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],v);export{v as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as r,isAborted as o,createResolver as h,createAbortError as c,onAbort as n}from"../../../../core/promiseUtils.js";import{watch as p,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import u from"../../../../layers/GraphicsLayer.js";import _ from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as k,isPolygonGraphic as g}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as G}from"./VolumeMeasurementShiftTool.js";import w from"../../../../widgets/Sketch/SketchViewModel.js";const v=Symbol("interactive-operation");let b=class extends s{constructor(e){super(e),this._updatingHandles=new y,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new u({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}}),this._sketchViewModel=new w({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol}),this.addHandles(this._sketchViewModel.on(["undo","redo"],this._onUndoRedo)),this.addHandles(p(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(S(e,t),s){case"idle":case"sketching":break;case"awaiting-sketch":this.analysisViewData.interactive=!0;break;case"reshaping":this._startReshape();break;case"reshaping-disabled":this._stopOperation(),this._ensureUpdatedSketchGraphic()}},l)),this._shiftTool=new G({analysis:e,view:s,analysisViewData:t}),s.tools.add(this._shiftTool)}destroy(){this._sketchViewModel.destroy(),this._shiftTool.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new _({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._startPlaceOperation(e,(t,s)=>{const i=this.analysis.clone(),h=this._sketchViewModel.on("create",e=>{switch(e.state){case"complete":this._updateGeometryFromSketchGraphic(),this._stopOperation();break;case"cancel":this._stopOperation();break;case"active":this._updateGeometryFromSketchGraphic();break;case"start":this.sketchGraphic=e.graphic}});return this._ensureUpdatedSketchGraphic(),this._updatingHandles.addPromise(r(this._sketchViewModel.create("polygon"))),a(()=>(h.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?o(e)||i.equals(this.analysis)?s():void t():(this._clearGeometry(),s())))})}async _startPlaceOperation(e,t){const s=h(),i=t(()=>s.resolve({}),()=>s.reject(c()));return n(e,()=>this._stopOperation()),this._replaceHandles([i,n(e,()=>this._stopOperation())],v),await s.promise}_startReshape(){this._stopOperation();const e=this._sketchViewModel.on("update",e=>{this._updateGeometryFromSketchGraphic(),"complete"===e.state&&("reshaping"===this.state?this._startReshape():this._stopOperation())});this._replaceHandles(a(()=>{e.remove(),this._sketchViewModel.cancel()}),v);const t=this._ensureUpdatedSketchGraphic();t&&this._updatingHandles.addPromise(r(this._sketchViewModel.update(t,{tool:"reshape"})))}_stopOperation(){this.removeHandles(v)}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return k(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this._graphicsLayer.add(this.sketchGraphic),this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=g(e)?e.geometry:null}_replaceHandles(e,t){this.removeHandles(t),this.addHandles((Array.isArray(e)?e:[e]).filter(i),t)}};function S(e,t){t&&(t.parent&&"remove"in t.parent&&t.parent.remove(t),e?.add(t))}e([d({constructOnly:!0})],b.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],b.prototype,"view",void 0),e([d({constructOnly:!0})],b.prototype,"analysis",void 0),e([d()],b.prototype,"sketchGraphic",null),e([d({nonNullable:!0})],b.prototype,"state",null),e([d()],b.prototype,"updating",null),e([d()],b.prototype,"_polygonSymbol",null),b=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],b);export{b as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{getKey as o}from"../../../core/object.js";import{clone as t}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{makeMaterialParameters as r,makeTextureSource as s}from"./LoaderResult.js";import{GLTFResource as a}from"./internal/Resource.js";import{PrimitiveType as i}from"../../webgl/enums.js";let n=0;async function l(r,s,l={},m=!0){const T=await a.load(r,s,l),p="gltf_"+n++,f={lods:[],materials:new Map,textures:new Map,meta:u(T)},x=!(!T.json.asset.extras||"symbolResource"!==T.json.asset.extras.ESRI_type),g=T.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,h=new Map;await c(T,async(r,s,a,n)=>{const u=h.get(a)??0;h.set(a,u+1);const c=void 0!==r.mode?r.mode:i.TRIANGLES,x=c===i.TRIANGLES||c===i.TRIANGLE_STRIP||c===i.TRIANGLE_FAN?c:null;if(null==x)return void e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+o(i,c)+"). Skipping primitive.");if(!T.hasPositions(r))return void e.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const g=T.getPositionData(r,l),w=T.getMaterial(r,l,m),v=T.hasNormals(r)?T.getNormalData(r,l):null,S=T.hasTangents(r)?T.getTangentData(r,l):null,R=T.hasTextureCoordinates(r)?T.getTextureCoordinates(r,l):null,_=T.hasVertexColors(r)?T.getVertexColors(r,l):null,F=T.getIndexData(r,l),y={name:n,transform:t(s),attributes:{position:await g,normal:v?await v:null,texCoord0:R?await R:null,color:_?await _:null,tangent:S?await S:null},indices:await F,primitiveType:x,material:d(f,await w,p)};let E=null;null!=f.meta?.ESRI_lod&&"screenSpaceRadius"===f.meta.ESRI_lod.metric&&(E=f.meta.ESRI_lod.thresholds[a]),f.lods[a]=f.lods[a]||{parts:[],name:n,lodThreshold:E},f.lods[a].parts[u]=y});for(const e of f.lods)e.parts=e.parts.filter(e=>!!e);const w=await T.getLoadedBuffersSize();return{model:f,meta:{isEsriSymbolResource:x,uri:T.uri,ESRI_webstyle:g},customMeta:{},cachedMemory:w}}function u(e){const o=e.json;let t=null;return o.nodes.forEach(e=>{const o=e.extras;null!=o&&(o.ESRI_proxyEllipsoid||o.ESRI_lod)&&(t=o)}),t}async function c(o,t){const r=o.json,s=r.scenes[r.scene||0].nodes,a=s.length>1,i=[];for(const e of s){const o=r.nodes[e];if(i.push(n(e,0)),m(o)&&!a){o.extensions.MSFT_lod.ids.forEach((e,o)=>n(e,o+1))}}async function n(s,a){const l=r.nodes[s],u=o.getNodeTransform(s);if(null!=l.weights&&e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=l.mesh){const e=r.meshes[l.mesh];for(const o of e.primitives)i.push(t(o,u,a,e.name))}for(const e of l.children||[])i.push(n(e,a))}await Promise.all(i)}function m(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function d(e,o,t){const a=o=>{const r=`${t}_tex_${o&&o.id}${o?.name?"_"+o.name:""}`;if(o&&!e.textures.has(r)){const t=s(o.data,{wrap:{s:o.wrapS,t:o.wrapT},mipmap:T.has(o.minFilter),noUnpackFlip:!0});e.textures.set(r,t)}return r},i=`${t}_mat_${o.id}_${o.name}`;if(!e.materials.has(i)){const t=r({color:[o.color[0],o.color[1],o.color[2]],opacity:o.color[3],alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,doubleSided:o.doubleSided,colorMixMode:o.ESRI_externalColorMixMode,colorTexture:o.colorTexture?a(o.colorTexture):void 0,normalTexture:o.normalTexture?a(o.normalTexture):void 0,occlusionTexture:o.occlusionTexture?a(o.occlusionTexture):void 0,emissiveTexture:o.emissiveTexture?a(o.emissiveTexture):void 0,metallicRoughnessTexture:o.metallicRoughnessTexture?a(o.metallicRoughnessTexture):void 0,emissiveFactor:[o.emissiveFactor[0],o.emissiveFactor[1],o.emissiveFactor[2]],colorTextureTransform:o.colorTextureTransform,normalTextureTransform:o.normalTextureTransform,occlusionTextureTransform:o.occlusionTextureTransform,emissiveTextureTransform:o.emissiveTextureTransform,metallicRoughnessTextureTransform:o.metallicRoughnessTextureTransform,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor,receiveShadows:o.receiveShadows,receiveAmbientOcclusion:o.receiveAmbientOcclusion});e.materials.set(i,t)}return i}const T=new Set([9987,9985]);export{l as loadGLTF};
5
+ import e from"../../../core/Logger.js";import{getKey as o}from"../../../core/object.js";import{clone as t}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{makeMaterialParameters as r,makeTextureSource as s}from"./LoaderResult.js";import{GLTFResource as a}from"./internal/Resource.js";import{PrimitiveType as i}from"../../webgl/enums.js";let n=0;async function l(r,s,l={},m=!0){const T=await a.load(r,s,l),p="gltf_"+n++,f={lods:[],materials:new Map,textures:new Map,meta:u(T)},x=!(!T.json.asset.extras||"symbolResource"!==T.json.asset.extras.ESRI_type),g=T.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,h=new Map;await c(T,async(r,s,a,n)=>{const u=h.get(a)??0;h.set(a,u+1);const c=void 0!==r.mode?r.mode:i.TRIANGLES,x=c===i.TRIANGLES||c===i.TRIANGLE_STRIP||c===i.TRIANGLE_FAN?c:null;if(null==x)return void e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+o(i,c)+"). Skipping primitive.");if(!T.hasPositions(r))return void e.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const g=T.getPositionData(r,l),w=T.getMaterial(r,l,m),v=T.hasNormals(r)?T.getNormalData(r,l):null,S=T.hasTangents(r)?T.getTangentData(r,l):null,R=T.hasTextureCoordinates(r)?T.getTextureCoordinates(r,l):null,_=T.hasVertexColors(r)?T.getVertexColors(r,l):null,F=T.getIndexData(r,l),y={name:n,transform:t(s),attributes:{position:await g,normal:v?await v:null,texCoord0:R?await R:null,color:_?await _:null,tangent:S?await S:null},indices:await F,primitiveType:x,material:d(f,await w,p)};let E=null;null!=f.meta?.ESRI_lod&&"screenSpaceRadius"===f.meta.ESRI_lod.metric&&(E=f.meta.ESRI_lod.thresholds[a]),f.lods[a]=f.lods[a]||{parts:[],name:n,lodThreshold:E},f.lods[a].parts[u]=y});for(const e of f.lods)e.parts=e.parts.filter(e=>!!e);const w=await T.getLoadedBuffersSize();return{model:f,meta:{isEsriSymbolResource:x,uri:T.uri,ESRI_webstyle:g},customMeta:{},usedMemory:w}}function u(e){const o=e.json;let t=null;return o.nodes.forEach(e=>{const o=e.extras;null!=o&&(o.ESRI_proxyEllipsoid||o.ESRI_lod)&&(t=o)}),t}async function c(o,t){const r=o.json,s=r.scenes[r.scene||0].nodes,a=s.length>1,i=[];for(const e of s){const o=r.nodes[e];if(i.push(n(e,0)),m(o)&&!a){o.extensions.MSFT_lod.ids.forEach((e,o)=>n(e,o+1))}}async function n(s,a){const l=r.nodes[s],u=o.getNodeTransform(s);if(null!=l.weights&&e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=l.mesh){const e=r.meshes[l.mesh];for(const o of e.primitives)i.push(t(o,u,a,e.name))}for(const e of l.children||[])i.push(n(e,a))}await Promise.all(i)}function m(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function d(e,o,t){const a=o=>{const r=`${t}_tex_${o&&o.id}${o?.name?"_"+o.name:""}`;if(o&&!e.textures.has(r)){const t=s(o.data,{wrap:{s:o.wrapS,t:o.wrapT},mipmap:T.has(o.minFilter),noUnpackFlip:!0});e.textures.set(r,t)}return r},i=`${t}_mat_${o.id}_${o.name}`;if(!e.materials.has(i)){const t=r({color:[o.color[0],o.color[1],o.color[2]],opacity:o.color[3],alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,doubleSided:o.doubleSided,colorMixMode:o.ESRI_externalColorMixMode,colorTexture:o.colorTexture?a(o.colorTexture):void 0,normalTexture:o.normalTexture?a(o.normalTexture):void 0,occlusionTexture:o.occlusionTexture?a(o.occlusionTexture):void 0,emissiveTexture:o.emissiveTexture?a(o.emissiveTexture):void 0,metallicRoughnessTexture:o.metallicRoughnessTexture?a(o.metallicRoughnessTexture):void 0,emissiveFactor:[o.emissiveFactor[0],o.emissiveFactor[1],o.emissiveFactor[2]],colorTextureTransform:o.colorTextureTransform,normalTextureTransform:o.normalTextureTransform,occlusionTextureTransform:o.occlusionTextureTransform,emissiveTextureTransform:o.emissiveTextureTransform,metallicRoughnessTextureTransform:o.metallicRoughnessTextureTransform,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor,receiveShadows:o.receiveShadows,receiveAmbientOcclusion:o.receiveAmbientOcclusion});e.materials.set(i,t)}return i}const T=new Set([9987,9985]);export{l as loadGLTF};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as y}from"../meshFastUpdateUtils.js";import{Settings as V}from"../settings.js";import{ExtendedLineVisualElement as w}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as L}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as I}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as S,geometryTypeToDrawOperationGeometryType as D}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as G}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as x,SceneDrawSurface as C}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as O}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as T}from"../../../../../core/accessorSupport/trackingUtils.js";let b=class extends S{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new V({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,r=this._createGraphicState=new I({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(r),o(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),T(()=>{O(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...y(r)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new G({view:this.view,manipulators:this.manipulators,geometryType:D(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new C(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new x(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),r();const l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=m;const p=l.visualElements.zVerticalLine,h=new w({view:n,extensionType:p.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=h;const u=i([o(()=>l.visualElements.zVerticalLine,e=>e.apply(h),a),o(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)})]);return m.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:r}=this.view;p(U,e[0],e[1],e[2]),z.setFromElevationInfo(this.elevationInfo),U[2]=j(U,r,z,i);i.toRenderCoords(U,this.view.spatialReference,U)?(t.setStartEndFromWorldDownAtLocation(U),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,r();const t=this.internalGraphicsLayer.elevationInfo,{view:n}=this,l=this._settings,c=new E({view:n,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const m=i([o(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),o(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),r(()=>{this._outlineVisualElement=s(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,m}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,r();const{view:n}=this,l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),p=i([o(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._verticesVisualElement=s(this._verticesVisualElement)})]);return m.attached=!0,this._verticesVisualElement=m,p}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),O(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace||e.displaying)return t.loading=!1,null;t.loading=!0;const s=r(()=>{t.loading=!1});let o;const a=()=>{o&&cancelAnimationFrame(o)};return i([l(()=>e.displaying,()=>{a(),o=requestAnimationFrame(()=>s.remove())},{...n,once:!0}),r(a),s])}};e([c({constructOnly:!0})],b.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],b.prototype,"geometryType",void 0),e([c()],b.prototype,"type",void 0),e([c({constructOnly:!0})],b.prototype,"view",void 0),b=e([m("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],b);const z=new L,U=h();export{b as DrawGraphicTool3D};
5
+ import{__decorate as e}from"tslib";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as y}from"../meshFastUpdateUtils.js";import{Settings as E}from"../settings.js";import{ExtendedLineVisualElement as V}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as w}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as I}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as L}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as S,geometryTypeToDrawOperationGeometryType as x}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as D}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as G,SceneDrawSurface as C}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as O}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as T}from"../../../../../core/accessorSupport/trackingUtils.js";let b=class extends S{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new E({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i,featureExpressionInfo:r}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i,featureExpressionInfo:r})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,r=this._createGraphicState=new L({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(r),o(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),T(()=>{O(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...y(r)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new D({view:this.view,manipulators:this.manipulators,geometryType:x(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new C(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new G(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),r();const l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=m;const p=l.visualElements.zVerticalLine,h=new V({view:n,extensionType:p.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=h;const u=i([o(()=>l.visualElements.zVerticalLine,e=>e.apply(h),a),o(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)})]);return m.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:r}=this.view;p(U,e[0],e[1],e[2]),z.setFromElevationInfo(this.elevationInfo),U[2]=j(U,r,z,i);i.toRenderCoords(U,this.view.spatialReference,U)?(t.setStartEndFromWorldDownAtLocation(U),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,r();const t=this.internalGraphicsLayer.elevationInfo,{view:n}=this,l=this._settings,c=new w({view:n,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const m=i([o(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),o(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),r(()=>{this._outlineVisualElement=s(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,m}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,r();const{view:n}=this,l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),p=i([o(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._verticesVisualElement=s(this._verticesVisualElement)})]);return m.attached=!0,this._verticesVisualElement=m,p}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),O(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace||e.displaying)return t.loading=!1,null;t.loading=!0;const s=r(()=>{t.loading=!1});let o;const a=()=>{o&&cancelAnimationFrame(o)};return i([l(()=>e.displaying,()=>{a(),o=requestAnimationFrame(()=>s.remove())},{...n,once:!0}),r(a),s])}};e([c({constructOnly:!0})],b.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],b.prototype,"geometryType",void 0),e([c()],b.prototype,"type",void 0),e([c({constructOnly:!0})],b.prototype,"view",void 0),b=e([m("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],b);const z=new I,U=h();export{b as DrawGraphicTool3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";function e(e){switch(e){case 0:break;case 1:return"not owned by a graphics layer";case 2:return"no geometry";case 3:return"the geometry type is not supported";case 4:return"the elevation mode is not supported";case 5:return"the symbol type is not supported"}return""}export{e as isSupportedObjectResultMessage};
5
+ import"../../../../core/has.js";function e(e){switch(e){case 0:break;case 1:return"not owned by a graphics layer";case 2:return"no geometry";case 3:return"the geometry type is not supported";case 4:return"the symbol type is not supported"}return""}export{e as isSupportedObjectResultMessage};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/has.js";import{hasEffectiveFeatureExpressionInfo as e}from"../../../../../support/elevationInfoUtils.js";function t(t){if(t.graphic&&"graphics"!==t.graphic.layer?.type)return 1;const r=t.operations?.data.type;if(!r)return 3;switch(r){case"polygon":case"point":case"polyline":case"mesh":break;default:return 3}const o=t.elevationInfo;return e(o)?4:0}export{t as isSupportedObject};
5
+ import"../../../../../core/has.js";function e(e){if(e.graphic&&"graphics"!==e.graphic.layer?.type)return 1;const r=e.operations?.data.type;if(!r)return 3;switch(r){case"polygon":case"point":case"polyline":case"mesh":break;default:return 3}return 0}export{e as isSupportedObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{hasEffectiveFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";function r(t){return e(t).result}function e(r){if(r.graphic&&"graphics"!==r.graphic.layer?.type)return{result:1};if(!r.operations)return{result:2};if(t(r.elevationInfo))return{result:4};const e=r.operations.data.type,o=r.operations.data.geometry;return"point"===e||"mesh"===e||"polyline"===e||"polygon"===e?{result:0,geometry:o}:{result:3}}export{r as isSupportedObject};
5
+ function r(r){return t(r).result}function t(r){if(r.graphic&&"graphics"!==r.graphic.layer?.type)return{result:1};if(!r.operations)return{result:2};const t=r.operations.data.type,e=r.operations.data.geometry;return"point"===t||"mesh"===t||"polyline"===t||"polygon"===t?{result:0,geometry:e}:{result:3}}export{r as isSupportedObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/has.js";import{getGraphicEffectiveElevationMode as e,hasGraphicFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";function o(o){if("graphics"!==o.layer?.type)return 1;if(null==o.geometry)return 2;switch(o.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return 0;default:return 3}const r=null!=o.symbol&&"point-3d"===o.symbol.type&&o.symbol.symbolLayers;if(!r||!r.some(e=>"object"===e.type))return 5;return"on-the-ground"!==e(o)&&t(o)?4:0}export{o as isSupportedGraphic};
5
+ import"../../../../../core/has.js";function e(e){if("graphics"!==e.layer?.type)return 1;if(null==e.geometry)return 2;switch(e.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return 0;default:return 3}const t=null!=e.symbol&&"point-3d"===e.symbol.type&&e.symbol.symbolLayers;return t&&t.some(e=>"object"===e.type)?0:4}export{e as isSupportedGraphic};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import s from"../../../core/Logger.js";import{removeMaybe as t,destroyMaybe as r}from"../../../core/maybe.js";import{watch as a,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GaussianSplatAtlasPageAllocator as l,splatPageSizeInU32 as d,elementsPerSplatPage as h,packedGaussianSizeInU32 as u,splatPageSizeInU32WithoutHeader as c,gaussiansPerSplatPage as p,splatAtlasTextureSize as f}from"../../../layers/support/GaussianSplatAtlasPageAllocator.js";import{GaussianTile as m}from"../../../layers/support/gaussianSplatUtils.js";import{getElevationOffsetInMeters as g}from"../../../support/elevationInfoUtils.js";import{LayerView3D as w}from"./LayerView3D.js";import{getLyr3DWasm as y,addLayerViewToWasm as _,removeLayerViewFromWasm as b}from"./Lyr3DWasm.js";import{GaussianSplatRenderNode as v}from"../webgl-engine/lib/GaussianSplatRenderNode.js";import A from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as H}from"../../support/layerViewUtils.js";const j=()=>s.getLogger("esri.views.3d.layers.GaussianSPlatLayerView3D");let U=class extends(w(A)){constructor(){super(...arguments),this.type="gaussian-splat-3d",this._gaussianTileHandles=new Map,this._pageAllocator=new l,this._pageBuffer=new Uint32Array(d),this._wasmLayerId=-1,this.ignoresMemoryFactor=!1,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer)}get wasmLayerId(){return this._wasmLayerId}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&e.isUpdating(this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}get _wasm(){return y(this.view)}get usedMemory(){let e=0;return this._gaussianTileHandles.forEach(s=>{s.isVisible&&(e+=s.usedMemory)}),e}get unloadedMemory(){return 0}get cachedMemory(){let e=0;return this._gaussianTileHandles.forEach(s=>{s.isVisible||(e+=s.usedMemory)}),e}async createRenderable(e){const s=e.meshData;if(null==s.data)throw new Error("meshData.data undefined");if(s.desc=JSON.parse(s.desc),null==s.desc)throw new Error("meshData.desc undefined");const t=s.desc.prims[0],r=t.vertexCount,a=t.atrbs[0].view,i=t.atrbs[0].view.byteCount,n=t.atrbs[0].view.byteOffset;let o=null;if("U32"!==a.type)return j().warnOnce("unexpected meshData.data format"),{memUsageBytes:0};o=new Uint32Array(s.data.buffer,n,i/4);const l=this.extractHeader(o),d=Math.ceil(r/p),g=new Uint32Array(r),w=[];for(let m=0;m<d;m++){const e=this._pageAllocator.findFirstFreePage();if(null!==e){this._pageAllocator.allocate(e),w.push(e);const s=r-m*p,t=Math.min(s,p),a=m*p;for(let r=0;r<t;r++)g[r+a]=r+h*e;const i=m*c;this._pageBuffer.set(o.subarray(i,i+t*u)),this._pageBuffer.set(l.packedHeader,c);const n=e*h,d=n%f,y=Math.floor(n/f);this._renderNode?.updateTextureAtlas(d,y,this._pageBuffer)}}const y=new Float64Array(3*r),_=2.048,b=l.tileOrigin.x*_,v=l.tileOrigin.y*_,A=l.tileOrigin.z*_,H=l.invPosScale;let U=0;for(let h=0;h<r;h++){const e=h*u,{rawX:s,rawY:t,rawZ:r}=this.extractPackedGaussianPosition(o,e);y[U]=s*H+b,y[U+1]=t*H+v,y[U+2]=r*H+A,U+=3}const L=new m(e.handle,g,w,y);return this._gaussianTileHandles.set(e.handle,L),{memUsageBytes:0}}extractPackedGaussianPosition(e,s){const t=e[s+1];return{rawX:16383&t,rawY:t>>>14&16383,rawZ:t>>>28&15|(1023&e[s+2])<<4}}freeRenderable(e){const s=this._gaussianTileHandles.get(e);s&&(s.pageIds.forEach(e=>this._pageAllocator.free(e)),this._gaussianTileHandles.delete(e))}setRenderableVisibility(e,s,t){for(let r=0;r<t;++r){const t=e[r],a=s[r],i=this._gaussianTileHandles.get(t);i&&(i.isVisible=a)}this.updateGaussians()}initialize(){if(!this._canProjectWithoutEngine())throw H("layer",this.layer.spatialReference.wkid,this.view.renderSpatialReference?.wkid);const e=_(this).then(e=>{this._wasmLayerId=e,this.addHandles([a(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=a(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),i)});this.addResolvingPromise(e),this._renderNode=new v({view:this.view})}destroy(){b(this),this._suspendedHandle&&(this._suspendedHandle=t(this._suspendedHandle)),this._renderNode=r(this._renderNode)}_canProjectWithoutEngine(){return!0}_elevationInfoChanged(e){this._wasm?.setLayerOffset(this,g(e))}updateGaussians(){const e=[];for(const s of this._gaussianTileHandles.values())s.isVisible&&e.push(s);this._renderNode?.updateGaussianVisibility(e)}extractHeader(e){const s=e.length-4,t=this.reinterpretU32AsFloat(e[s]),r=this.reinterpretU32AsFloat(e[s+1]),a=this.reinterpretU32AsFloat(e[s+2]),i=1/(1<<(255&e[s+3]));return{packedHeader:e.subarray(s,s+4),tileOrigin:{x:t,y:r,z:a},invPosScale:i}}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}};e([n()],U.prototype,"layer",void 0),U=e([o("esri.views.3d.layers.GaussianSplatLayerView3D")],U);const L=U;export{L as default};
5
+ import{__decorate as e}from"tslib";import s from"../../../core/Logger.js";import{removeMaybe as t,destroyMaybe as i}from"../../../core/maybe.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GaussianSplatAtlasPageAllocator as l,splatPageSizeInU32 as d,elementsPerSplatPage as h,packedGaussianSizeInU32 as u,splatPageSizeInU32WithoutHeader as c,gaussiansPerSplatPage as m,splatAtlasTextureSize as p}from"../../../layers/support/GaussianSplatAtlasPageAllocator.js";import{GaussianTile as f}from"../../../layers/support/gaussianSplatUtils.js";import{getElevationOffsetInMeters as y}from"../../../support/elevationInfoUtils.js";import{LayerView3D as _}from"./LayerView3D.js";import{addLayerViewToWasm as w,getLyr3DWasm as g,removeLayerViewFromWasm as b}from"./Lyr3DWasm.js";import{GaussianSplatRenderNode as M}from"../webgl-engine/lib/GaussianSplatRenderNode.js";import v from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as j}from"../../support/layerViewUtils.js";const A=()=>s.getLogger("esri.views.3d.layers.GaussianSPlatLayerView3D");let H=class extends(_(v)){constructor(e){super(e),this.type="gaussian-splat-3d",this._gaussianTileHandles=new Map,this._pageAllocator=new l,this._pageBuffer=new Uint32Array(d),this._wasmLayerId=-1,this.ignoresMemoryFactor=!1,this._usedMemory=0,this._cacheMemory=0,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer),this._memCache=e.view.resourceController.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e))}initialize(){if(!this._canProjectWithoutEngine())throw j("layer",this.layer.spatialReference.wkid,this.view.renderSpatialReference?.wkid);const e=w(this).then(e=>{this._wasmLayerId=e,this.addHandles([r(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=r(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),a)});this.addResolvingPromise(e),this._renderNode=new M({view:this.view})}get wasmLayerId(){return this._wasmLayerId}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&e.isUpdating(this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}get _wasm(){return g(this.view)}get usedMemory(){return this._usedMemory}get unloadedMemory(){return 0}get cachedMemory(){return this._cacheMemory}async createRenderable(e){const s=e.meshData;if(null==s.data)throw new Error("meshData.data undefined");if(s.desc=JSON.parse(s.desc),null==s.desc)throw new Error("meshData.desc undefined");const t=s.desc.prims[0],i=t.vertexCount,r=t.atrbs[0].view,a=t.atrbs[0].view.byteCount,n=t.atrbs[0].view.byteOffset;let o=null;if("U32"!==r.type)return A().warnOnce("unexpected meshData.data format"),{memUsageBytes:0};o=new Uint32Array(s.data.buffer,n,a/4);const l=this.extractHeader(o),d=Math.ceil(i/m),y=new Uint32Array(i),_=[];for(let f=0;f<d;f++){const e=this._pageAllocator.findFirstFreePage();if(null!==e){this._pageAllocator.allocate(e),_.push(e);const s=i-f*m,t=Math.min(s,m),r=f*m;for(let i=0;i<t;i++)y[i+r]=i+h*e;const a=f*c;this._pageBuffer.set(o.subarray(a,a+t*u)),this._pageBuffer.set(l.packedHeader,c);const n=e*h,d=n%p,w=Math.floor(n/p);this._renderNode?.updateTextureAtlas(d,w,this._pageBuffer)}}const w=new Float64Array(3*i),g=2.048,b=l.tileOrigin.x*g,M=l.tileOrigin.y*g,v=l.tileOrigin.z*g,j=l.invPosScale;let H=0;for(let h=0;h<i;h++){const e=h*u,{rawX:s,rawY:t,rawZ:i}=this._extractPackedGaussianPosition(o,e);w[H]=s*j+b,w[H+1]=t*j+M,w[H+2]=i*j+v,H+=3}const U=new f(e.handle,y,_,w);return this._memCache.put(`${U.handle}`,U),this._gaussianTileHandles.set(e.handle,U),this._cacheMemory+=U.usedMemory,{memUsageBytes:U.usedMemory}}_extractPackedGaussianPosition(e,s){const t=e[s+1];return{rawX:16383&t,rawY:t>>>14&16383,rawZ:t>>>28&15|(1023&e[s+2])<<4}}freeRenderable(e){const s=this._gaussianTileHandles.get(e);s&&(s.isVisible?this._usedMemory-=s.usedMemory:this._cacheMemory-=s.usedMemory,s.pageIds.forEach(e=>this._pageAllocator.free(e)),this.freeObject(s),this._gaussianTileHandles.delete(e)),this._updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}setRenderableVisibility(e,s,t){for(let i=0;i<t;i++){if(!s[i])continue;const t=e[i],r=this._gaussianTileHandles.get(t);if(r){if(r.isVisible)continue;r.isVisible=!0,this._usedMemory+=r.usedMemory,this._cacheMemory-=r.usedMemory,this._memCache.pop(`${t}`)}}for(let i=0;i<t;i++){if(s[i])continue;const t=e[i],r=this._gaussianTileHandles.get(t);if(r){if(!r.isVisible)continue;r.isVisible=!1,this._usedMemory-=r.usedMemory,this._cacheMemory+=r.usedMemory,this._memCache.put(`${t}`,r)}}this._updateGaussians()}destroy(){b(this),this._suspendedHandle&&(this._suspendedHandle=t(this._suspendedHandle)),this._renderNode=i(this._renderNode),this._memCache.destroy()}_canProjectWithoutEngine(){return!0}_elevationInfoChanged(e){this._wasm?.setLayerOffset(this,y(e))}_updateGaussians(){const e=[];for(const s of this._gaussianTileHandles.values())s.isVisible&&e.push(s);this._renderNode?.updateGaussianVisibility(e)}extractHeader(e){const s=e.length-4,t=this.reinterpretU32AsFloat(e[s]),i=this.reinterpretU32AsFloat(e[s+1]),r=this.reinterpretU32AsFloat(e[s+2]),a=1/(1<<(255&e[s+3]));return{packedHeader:e.subarray(s,s+4),tileOrigin:{x:t,y:i,z:r},invPosScale:a}}_deleteTile(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}};e([n()],H.prototype,"layer",void 0),H=e([o("esri.views.3d.layers.GaussianSplatLayerView3D")],H);const U=H;export{U as default};