@arcgis/core 6.0.0-next.30 → 6.0.0-next.32

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 (147) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0694c7bcfe71692e2ccf.js +1 -0
  3. package/assets/esri/core/workers/chunks/{e2c6cd8dac01e129ccfe.js → 0e445ec3523de9f2dfa2.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0f6c0d42100c21367e5c.js +1 -0
  5. package/assets/esri/core/workers/chunks/{242a77066ac5cdb5b7d7.js → 14d81280807a3d3c1b7e.js} +1 -1
  6. package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +1 -0
  7. package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ba4520ddcb6a49988da6.js → 1a8d8274df292d65f82e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{0b4481b57a611b15f65c.js → 1eaf8bfdd3765a90ccc2.js} +1 -1
  10. package/assets/esri/core/workers/chunks/29cc6b1705418b1be5d7.js +1 -0
  11. package/assets/esri/core/workers/chunks/2de077c7b971f2c215a6.js +1 -0
  12. package/assets/esri/core/workers/chunks/{fefdd10bdd5a4c8d8ed0.js → 360c944c610efa2051fc.js} +3 -3
  13. package/assets/esri/core/workers/chunks/{8ca2bb3c0551bb1898b6.js → 3fdcc383bbd9cf0d274c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{cc97e4fd0dacad970a23.js → 46453ebfee17b5421d9d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{64b360625c68cb863a08.js → 487c46d5245cfb35c4bb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{ad21757d78e372fa2ed6.js → 4a979fce1c971b614a18.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{b5eff28cf482d920b9ea.js → 4d18b48d4a282a0f341c.js} +1 -1
  18. package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +1 -0
  19. package/assets/esri/core/workers/chunks/52a0aa2d19a495e48ab1.js +1 -0
  20. package/assets/esri/core/workers/chunks/{865cebc5c982c040ab6f.js → 55a9eaeb152a3abada67.js} +1 -1
  21. package/assets/esri/core/workers/chunks/572aec57593a08b8045b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{9d40786c5ceface786ba.js → 601e1d020b8115497944.js} +1 -1
  23. package/assets/esri/core/workers/chunks/6029773458ab98600f67.js +1 -0
  24. package/assets/esri/core/workers/chunks/6b5c073dddd89d06ed80.js +1 -0
  25. package/assets/esri/core/workers/chunks/{7030a4d0714a35995a58.js → 6bb191b19ce43a27f205.js} +1 -1
  26. package/assets/esri/core/workers/chunks/6f6d1873753a9c6994aa.js +1 -0
  27. package/assets/esri/core/workers/chunks/7084dd6e10c6c1393e92.js +1 -0
  28. package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +1 -0
  29. package/assets/esri/core/workers/chunks/7e211d8a8ad6c6a7cf3e.js +1 -0
  30. package/assets/esri/core/workers/chunks/853563c66ecf58d53d36.js +1 -0
  31. package/assets/esri/core/workers/chunks/{c90388932a7825d9d933.js → 85de980c5b296ec69323.js} +1 -1
  32. package/assets/esri/core/workers/chunks/89dc49e784f7ba3b93ea.js +1 -0
  33. package/assets/esri/core/workers/chunks/8da2a10318f49d0dc73a.js +1 -0
  34. package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +1 -0
  35. package/assets/esri/core/workers/chunks/{71f792a20077aa739f87.js → a607541959169741a943.js} +1 -1
  36. package/assets/esri/core/workers/chunks/b2d6b1ac9fbb50c7c8ab.js +1 -0
  37. package/assets/esri/core/workers/chunks/b657363113f4a37e634b.js +1 -0
  38. package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +1 -0
  39. package/assets/esri/core/workers/chunks/{12b84262dedc6b393136.js → d9a240a3c6bf85124474.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{8f008eedb11685ee2048.js → e096c1d9d53af74d3207.js} +1 -1
  41. package/assets/esri/core/workers/chunks/e4e2edfdc85dd14e66d4.js +1 -0
  42. package/assets/esri/core/workers/chunks/f4d91d470ca5fea0bd26.js +1 -0
  43. package/assets/esri/core/workers/chunks/f717005e14a7e9141df7.js +1 -0
  44. package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +1 -0
  45. package/assets/esri/core/workers/chunks/fcc3902d6d9eda6f09f5.js +1 -0
  46. package/assets/esri/core/workers/chunks/{28a821de9dbf10324033.js → fd031150d3a7f896e6b3.js} +1 -1
  47. package/config.js +1 -1
  48. package/core/scheduling.js +1 -1
  49. package/geometry/Mesh.d.ts +2 -125
  50. package/geometry/Mesh.js +1 -1
  51. package/geometry/support/GlobalCoordinateSystem.js +2 -0
  52. package/geometry/support/LocalCoordinateSystem.js +2 -0
  53. package/geometry/support/boundedPlane.js +1 -1
  54. package/geometry/support/coordinateSystem.js +1 -1
  55. package/geometry/support/meshErrors.js +1 -1
  56. package/geometry/support/plane.js +1 -1
  57. package/geometry/support/polygonUtils.js +1 -1
  58. package/geometry/support/ray.js +1 -1
  59. package/geometry/support/sphere.js +1 -1
  60. package/interfaces.d.ts +0 -3
  61. package/kernel.js +1 -1
  62. package/layers/SceneLayer.js +1 -1
  63. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  64. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  65. package/layers/mixins/ArcGISImageService.js +1 -1
  66. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  67. package/layers/support/featureLayerUtils.js +1 -1
  68. package/package.json +2 -2
  69. package/support/arcadeUtils.js +1 -1
  70. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  71. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  72. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  73. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  74. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  75. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  76. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  77. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  78. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  79. package/views/3d/analysis/Slice/SliceController.js +1 -1
  80. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  81. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  82. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  83. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  84. package/views/3d/environment/SunLighting.d.ts +10 -8
  85. package/views/3d/environment/VirtualLighting.d.ts +10 -8
  86. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  87. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  88. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  89. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  90. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  91. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  92. package/views/3d/state/ScreenSizePerspective.js +1 -1
  93. package/views/3d/support/RenderCoordsHelper.js +1 -1
  94. package/views/3d/support/ViewSlice.js +1 -1
  95. package/views/3d/support/hitTest.js +1 -1
  96. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  97. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  98. package/views/3d/terrain/PlanarPatch.js +1 -1
  99. package/views/3d/terrain/SphericalPatch.js +1 -1
  100. package/views/3d/webgl-engine/lib/Path.js +1 -1
  101. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  102. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  103. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  104. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  105. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  106. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  107. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  108. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  109. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  110. package/views/support/TextureCompressionWorker.js +1 -1
  111. package/views/webgl/Texture.js +1 -1
  112. package/webscene/Environment.d.ts +1 -1
  113. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  114. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  115. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  116. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  117. package/widgets/BatchAttributeForm.js +1 -1
  118. package/widgets/FeatureForm.js +1 -1
  119. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  120. package/assets/esri/core/workers/chunks/02335385b1476fe322eb.js +0 -1
  121. package/assets/esri/core/workers/chunks/07b726a46864501b90a0.js +0 -1
  122. package/assets/esri/core/workers/chunks/189321d88026bd7e6d3e.js +0 -1
  123. package/assets/esri/core/workers/chunks/18d47ab571b613fbe719.js +0 -1
  124. package/assets/esri/core/workers/chunks/1967b9c96045a5802d08.js +0 -1
  125. package/assets/esri/core/workers/chunks/199a7f97916679e0257c.js +0 -1
  126. package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +0 -1
  127. package/assets/esri/core/workers/chunks/1dc6f093028530a492e6.js +0 -1
  128. package/assets/esri/core/workers/chunks/2cd60fd062d954322c1f.js +0 -1
  129. package/assets/esri/core/workers/chunks/2d3e0e4442dbc6ec6def.js +0 -1
  130. package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +0 -1
  131. package/assets/esri/core/workers/chunks/3105336a05f38a95ebea.js +0 -1
  132. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +0 -1
  133. package/assets/esri/core/workers/chunks/4fb2fcc95f852bf8f86c.js +0 -1
  134. package/assets/esri/core/workers/chunks/59bc55880e6fd8ce20c0.js +0 -1
  135. package/assets/esri/core/workers/chunks/5f787809b74eed7b9a91.js +0 -1
  136. package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +0 -1
  137. package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +0 -1
  138. package/assets/esri/core/workers/chunks/7d3f7940815fa5dc244e.js +0 -1
  139. package/assets/esri/core/workers/chunks/999c23da883eb11cb29e.js +0 -1
  140. package/assets/esri/core/workers/chunks/9bc3afe7013ef4ae737b.js +0 -1
  141. package/assets/esri/core/workers/chunks/bab1d010970d98c25470.js +0 -1
  142. package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +0 -1
  143. package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +0 -1
  144. package/assets/esri/core/workers/chunks/e04fb83ab2634bc15cc7.js +0 -1
  145. package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +0 -1
  146. package/assets/esri/core/workers/chunks/f0d0ed155275c2e6d3da.js +0 -1
  147. package/chunks/boundedPlane.js +0 -2
@@ -1,7 +1,6 @@
1
1
  import type Extent from "./Extent.js";
2
2
  import type BaseGeometry from "./Geometry.js";
3
3
  import type Point from "./Point.js";
4
- import type Polygon from "./Polygon.js";
5
4
  import type MeshComponent from "./support/MeshComponent.js";
6
5
  import type MeshTransform from "./support/MeshTransform.js";
7
6
  import type MeshVertexAttributes from "./support/MeshVertexAttributes.js";
@@ -10,8 +9,7 @@ import type { LoadableMixin, LoadableMixinProperties } from "../core/Loadable.js
10
9
  import type { EsriPromiseMixin } from "../core/Promise.js";
11
10
  import type { MeshVertexSpaceUnion } from "./types.js";
12
11
  import type { MeshComponentProperties } from "./support/MeshComponent.js";
13
- import type { MeshMaterialProperties } from "./support/MeshMaterial.js";
14
- import type { CreateBoxParameters, CreateCylinderParameters, CreateSphereParameters, CreatePlaneParameters, RotateParameters, CenterAtParameters, ScaleParameters, CreateFromGLTFParameters, ExportGLTFOptions } from "./support/meshUtils/types.js";
12
+ import type { RotateParameters, CenterAtParameters, ScaleParameters, ExportGLTFOptions } from "./support/meshUtils/types.js";
15
13
  import type { MeshLocalVertexSpaceProperties } from "./support/MeshLocalVertexSpace.js";
16
14
  import type { MeshGeoreferencedVertexSpaceProperties } from "./support/MeshGeoreferencedVertexSpace.js";
17
15
  import type { MeshTransformProperties } from "./support/MeshTransform.js";
@@ -401,121 +399,6 @@ export interface MeshProperties extends BaseGeometryProperties, LoadableMixinPro
401
399
  * @see [Sample - Low poly terrain using mesh geometry](https://developers.arcgis.com/javascript/latest/sample-code/geometry-mesh-elevation/)
402
400
  */
403
401
  export default class Mesh extends MeshSuperclass {
404
- /**
405
- * Creates a mesh representing a box. The spatial reference of the resulting mesh is the same
406
- * as the location where it is placed.
407
- *
408
- * #### Box UV coordinate space
409
- *
410
- * The box geometry will have UV coordinates generated according to the following scheme:
411
- *
412
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-box-uv.avif" width="300" height="300"/>
413
- *
414
- * @deprecated since version 5.1. Use [createBox()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createBox) instead.
415
- * @param location - The location bottom center of the box.
416
- * @param parameters - Parameters to configure the box creation.
417
- * @returns The resulting mesh.
418
- * @example
419
- * let mesh = Mesh.createBox(point, {
420
- * size: {
421
- * width: 10,
422
- * height: 100,
423
- * depth: 20
424
- * },
425
- * material: {
426
- * color: "green"
427
- * }
428
- * });
429
- * @example
430
- * let mesh = Mesh.createBox(point, {
431
- * imageFace: "top",
432
- * material: {
433
- * colorTexture: new MeshTexture({ url: "./url-to-image.png" })
434
- * }
435
- * });
436
- */
437
- static createBox(location: Point, parameters?: CreateBoxParameters): Mesh;
438
- /**
439
- * Creates a mesh representing a cylinder. The spatial reference of the resulting mesh is the same
440
- * as the location where it is placed.
441
- *
442
- * #### Cylinder UV coordinate space
443
- *
444
- * The cylinder geometry will have UV coordinates generated according to the following scheme
445
- * (example is shown for 8 vertices cylinder):
446
- *
447
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-cylinder-uv.avif" width="300" height="300"/>
448
- *
449
- * @deprecated since version 5.1. Use [createCylinder()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createCylinder) instead.
450
- * @param location - The location of the bottom center of the cylinder.
451
- * @param parameters - Parameters to configure the cylinder creation.
452
- * @returns The resulting mesh.
453
- */
454
- static createCylinder(location: Point, parameters?: CreateCylinderParameters): Mesh;
455
- /**
456
- * Creates a new mesh geometry from a glTF model referenced by the `url` parameter. The spatial reference of the
457
- * resulting mesh is the same as the spatial reference of the `location` parameter.
458
- *
459
- * See section [Supported GLTF features](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#supported-gltf-features)
460
- * for details.
461
- *
462
- * @deprecated since version 5.1. Use [createFromGLTF()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createFromGLTF) instead.
463
- * @param location - The location of the origin of the model. If the location does not
464
- * contain a z-value, z is assumed to be `0`.
465
- * @param url - The URL of the glTF model. The URL should point to a glTF file (.gltf or .glb) which can
466
- * reference additional binary (.bin) and image files (.jpg, .png).
467
- * @param parameters - Parameters to configure the mesh from glTF creation.
468
- * @returns A promise that resolves to a mesh geometry representing the loaded
469
- * glTF model.
470
- * @since 4.11
471
- */
472
- static createFromGLTF(location: Point, url: string, parameters?: CreateFromGLTFParameters): Promise<Mesh>;
473
- /**
474
- * Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only
475
- * a position vertex attribute and a single component with faces. The default shading will be
476
- * set to `flat`. The spatial reference of the resulting mesh is the same
477
- * as the input polygon. The resulting mesh will not contain any UV nor normal vertex attributes.
478
- *
479
- * @deprecated since version 5.1. Use [createFromPolygon()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createFromPolygon) instead.
480
- * @param polygon - The input polygon.
481
- * @param parameters - Optional parameters.
482
- * @returns A new mesh representing the triangulated polygon.
483
- */
484
- static createFromPolygon(polygon: Polygon, parameters?: CreateFromPolygonParameters): Mesh;
485
- /**
486
- * Creates a mesh representing a plane. The spatial reference of the resulting mesh is the same
487
- * as the location where it is placed. A plane consists of two triangles and may be conveniently
488
- * oriented at creation time.
489
- *
490
- * #### Plane UV coordinate space
491
- *
492
- * The plane geometry will have UV coordinates generated according to the following scheme:
493
- *
494
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-plane-uv.avif" width="300" height="300"/>
495
- *
496
- * @deprecated since version 5.1. Use [createPlane()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createPlane) instead.
497
- * @param location - The location of the bottom center of the plane.
498
- * @param parameters - Parameters to configure the plane creation.
499
- * @returns The resulting mesh.
500
- */
501
- static createPlane(location: Point, parameters?: CreatePlaneParameters): Mesh;
502
- /**
503
- * Creates a mesh representing a sphere. The spatial reference of the resulting mesh is the same
504
- * as the location where it is placed.
505
- *
506
- * #### Sphere UV coordinate space
507
- *
508
- * The sphere geometry will have UV coordinates generated according to the following scheme
509
- * (example is shown for 8x8 vertices sphere):
510
- *
511
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-sphere-uv.avif" width="300" height="300"/>
512
- *
513
- * @deprecated since version 5.1. Use [createSphere()](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#createSphere) instead.
514
- * @param location - The location of the bottom center of the sphere.
515
- * @param parameters - Parameters to configure the sphere creation.
516
- * @returns The resulting mesh.
517
- */
518
- static createSphere(location: Point, parameters?: CreateSphereParameters): Mesh;
519
402
  constructor(properties?: MeshProperties);
520
403
  /**
521
404
  * An array of mesh components that can be used to apply materials
@@ -727,10 +610,4 @@ export default class Mesh extends MeshSuperclass {
727
610
  */
728
611
  vertexAttributesChanged(): void;
729
612
  }
730
- declare const MeshSuperclass: typeof BaseGeometry & typeof EsriPromiseMixin & typeof LoadableMixin & typeof ClonableMixin
731
-
732
- /** @deprecated since version 5.1. Use [CreateFromPolygonParameters](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/meshUtils/#CreateFromPolygonParameters) in `meshUtils` instead. */
733
- export interface CreateFromPolygonParameters {
734
- /** The material to be used for the mesh. */
735
- material?: MeshMaterialProperties;
736
- }
613
+ declare const MeshSuperclass: typeof BaseGeometry & typeof EsriPromiseMixin & typeof LoadableMixin & typeof ClonableMixin
package/geometry/Mesh.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import{LoadableMixin as n}from"../core/Loadable.js";import r from"../core/Logger.js";import{EsriPromiseMixin as i}from"../core/Promise.js";import{throwIfAborted as a,isPromiseLike as o,whenOrAbort as s}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{fromValues as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"./Geometry.js";import p from"./Point.js";import m from"./Polygon.js";import{create as h,zero as g,fromBuffer as _}from"./support/aaBoundingBox.js";import{composeAxes as v,create as y}from"./support/axisAngleDegrees.js";import b from"./support/MeshComponent.js";import{componentNotFoundMessage as x,meshNotLoadedMessage as S,invalidLocationMessage as C,invalidPolygonMessage as w,InvalidLocationError as T}from"./support/meshErrors.js";import E from"./support/MeshGeoreferencedVertexSpace.js";import D from"./support/MeshLocalVertexSpace.js";import O from"./support/MeshTransform.js";import k from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as A,isRelativeVertexSpace as j}from"./support/meshVertexSpaceUtils.js";import{centerAt as M}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as N}from"./support/meshUtils/extent.js";import{loadExternal as P}from"./support/meshUtils/loadExternal.js";import{addMeshMaterialCloneContext as F,addMeshTextureCloneContext as I,getMeshCloneContext as L}from"./support/meshUtils/meshCloneUtils.js";import{Metadata as R}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as z,createUnitSizeBox as B,extractSingleFaceOfBox as V,createUnitSizeSphere as H,createUnitSizeCylinder as U,convertPlaneSizeParameter as W,createUnitSizePlane as G}from"./support/meshUtils/primitives.js";import{rotate as K}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";import{polygonToRenderInfoNotElevationAligned as J}from"../views/3d/support/renderInfoUtils/polygon.js";var Y;const X={base:null,key:`type`,defaultKeyValue:`georeferenced`,typeMap:{georeferenced:E,local:D}};let Z=Y=class extends t(n(i(f))){constructor(e){super(e),this.components=null,this.vertexSpace=new E,this.transform=null,this.metadata=new R,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new k,this.type=`mesh`}initialize(){(this.metadata.externalSources.length===0||this.vertexAttributes.position.length)&&(this.loadStatus=`loaded`),this.when(()=>{this.addHandles(c(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):this.metadata.displaySource?.extent!=null}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return N({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return e.length===0||t?.length===0?h(g):_(e)}get origin(){let e=A(this.vertexSpace,this.spatialReference);if(e!=null)return e;let{center:t,zmin:n}=this._transformedExtent;return new p({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return!this.loaded&&this.metadata?.displaySource?.extent!=null?this.metadata.displaySource.extent.clone():this._transformedExtent}addComponent(e){this._checkIfLoaded(`addComponent()`)&&(this.components||=[],this.components.push(b.from(e)),this.notifyChange(`components`))}removeComponent(e){if(this._checkIfLoaded(`removeComponent()`)){if(this.components){let t=this.components.indexOf(e);if(t!==-1){this.components.splice(t,1),this.notifyChange(`components`);return}}r.getLogger(this).error(`removeComponent()`,x)}}rotate(e,t,n,r){return v(e,t,n,Q),K(this,Q,r),this}offset(e,t,n){if(!this._checkIfLoaded(`offset()`))return this;let{vertexSpace:r,vertexAttributes:i}=this,a=i?.position;if(!a)return this;if(j(r)){let[i,a,o]=r.origin;r.origin=d(i+e,a+t,o+n)}else{for(let r=0;r<a.length;r+=3)a[r]+=e,a[r+1]+=t,a[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded(`scale()`)&&q(this,e,t),this}centerAt(e,t){return this._checkIfLoaded(`centerAt()`)&&M(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(P(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone(F(I(e)))}cloneShallow(){return new Y({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange(`vertexAttributes`)}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([import(`./support/meshUtils/exporters/gltf/gltfexport.js`),this.load(e)]);return a(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return this.loaded?!0:(r.getLogger(this).error(e,S),!1)}static createBox(e,t){if(!(e instanceof p))return r.getLogger(this.prototype).error(`.createBox()`,C),null;let n=new Y(z(B(),e,t));return t?.imageFace&&t.imageFace!==`all`?V(n,t.imageFace):n}static createSphere(e,t){return e instanceof p?new Y(z(H(t?.densificationFactor||0),e,t)):(r.getLogger(this.prototype).error(`.createSphere()`,C),null)}static createCylinder(e,t){return e instanceof p?new Y(z(U(t?.densificationFactor||0),e,t)):(r.getLogger(this.prototype).error(`.createCylinder()`,C),null)}static createPlane(e,t){if(!(e instanceof p))return r.getLogger(this.prototype).error(`.createPlane()`,C),null;let n=t?.facing??`up`,i=W(n,t?.size);return new Y(z(G(n),e,{...t,size:i}))}static createFromPolygon(e,t){if(!(e instanceof m))return r.getLogger(this.prototype).error(`.createFromPolygon()`,w),null;let n=J(e,{method:`earcut`}),i=o(n)?null:n,a=i?.positions??[],s=i?.polygonIndices??[];return new Y({vertexAttributes:new k({position:a}),components:[new b({faces:s,shading:`flat`,material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new E})}static async createFromGLTF(e,t,n){if(!(e instanceof p)){let e=new T;throw r.getLogger(this.prototype).error(`.createfromGLTF()`,e.message),e}let{loadGLTFMesh:i}=await s(import(`./support/meshUtils/loadGLTFMesh.js`),n);return new Y((await i(e,t,n)).mesh)}};e([l({type:[b],json:{write:!0}})],Z.prototype,`components`,void 0),e([l({nonNullable:!0,types:X,constructOnly:!0,json:{write:!0},clonable:(e,t)=>L(t)?.vertexSpace??e.clone(t)})],Z.prototype,`vertexSpace`,void 0),e([l({type:O,clonable:(e,t)=>{let n=L(t);return n&&`transform`in n?n.transform:e?.clone()??e},json:{write:!0}})],Z.prototype,`transform`,void 0),e([l({constructOnly:!0,type:R,clonable:(e,t)=>L(t)?.metadata??e.clone()})],Z.prototype,`metadata`,void 0),e([l()],Z.prototype,`hasExtent`,null),e([l()],Z.prototype,`_transformedExtent`,null),e([l()],Z.prototype,`_untransformedBounds`,null),e([l()],Z.prototype,`origin`,null),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`extent`,null),e([l({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Z.prototype,`hasZ`,void 0),e([l({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Z.prototype,`hasM`,void 0),e([l({type:k,nonNullable:!0,json:{write:!0},clonable:(e,t)=>L(t)?.vertexAttributes??e.clone(t)})],Z.prototype,`vertexAttributes`,void 0),Z=Y=e([u(`esri.geometry.Mesh`)],Z);const Q=y();export{Z as default};
2
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import{LoadableMixin as n}from"../core/Loadable.js";import r from"../core/Logger.js";import{EsriPromiseMixin as i}from"../core/Promise.js";import{throwIfAborted as a}from"../core/promiseUtils.js";import{watch as o}from"../core/reactiveUtils.js";import{property as s,subclass as c}from"../core/accessorSupport/decorators.js";import{fromValues as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"./Geometry.js";import d from"./Point.js";import{create as f,zero as p,fromBuffer as m}from"./support/aaBoundingBox.js";import{composeAxes as h,create as g}from"./support/axisAngleDegrees.js";import _ from"./support/MeshComponent.js";import{componentNotFoundMessage as v,meshNotLoadedMessage as y}from"./support/meshErrors.js";import b from"./support/MeshGeoreferencedVertexSpace.js";import x from"./support/MeshLocalVertexSpace.js";import S from"./support/MeshTransform.js";import C from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as w,isRelativeVertexSpace as T}from"./support/meshVertexSpaceUtils.js";import{centerAt as E}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as D}from"./support/meshUtils/extent.js";import{loadExternal as O}from"./support/meshUtils/loadExternal.js";import{addMeshMaterialCloneContext as k,addMeshTextureCloneContext as A,getMeshCloneContext as j}from"./support/meshUtils/meshCloneUtils.js";import{Metadata as M}from"./support/meshUtils/Metadata.js";import{rotate as N}from"./support/meshUtils/rotate.js";import{scale as P}from"./support/meshUtils/scale.js";var F;const I={base:null,key:`type`,defaultKeyValue:`georeferenced`,typeMap:{georeferenced:b,local:x}};let L=F=class extends t(n(i(u))){constructor(e){super(e),this.components=null,this.vertexSpace=new b,this.transform=null,this.metadata=new M,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C,this.type=`mesh`}initialize(){(this.metadata.externalSources.length===0||this.vertexAttributes.position.length)&&(this.loadStatus=`loaded`),this.when(()=>{this.addHandles(o(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):this.metadata.displaySource?.extent!=null}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return D({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return e.length===0||t?.length===0?f(p):m(e)}get origin(){let e=w(this.vertexSpace,this.spatialReference);if(e!=null)return e;let{center:t,zmin:n}=this._transformedExtent;return new d({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return!this.loaded&&this.metadata?.displaySource?.extent!=null?this.metadata.displaySource.extent.clone():this._transformedExtent}addComponent(e){this._checkIfLoaded(`addComponent()`)&&(this.components||=[],this.components.push(_.from(e)),this.notifyChange(`components`))}removeComponent(e){if(this._checkIfLoaded(`removeComponent()`)){if(this.components){let t=this.components.indexOf(e);if(t!==-1){this.components.splice(t,1),this.notifyChange(`components`);return}}r.getLogger(this).error(`removeComponent()`,v)}}rotate(e,t,n,r){return h(e,t,n,R),N(this,R,r),this}offset(e,t,n){if(!this._checkIfLoaded(`offset()`))return this;let{vertexSpace:r,vertexAttributes:i}=this,a=i?.position;if(!a)return this;if(T(r)){let[i,a,o]=r.origin;r.origin=l(i+e,a+t,o+n)}else{for(let r=0;r<a.length;r+=3)a[r]+=e,a[r+1]+=t,a[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded(`scale()`)&&P(this,e,t),this}centerAt(e,t){return this._checkIfLoaded(`centerAt()`)&&E(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(O(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone(k(A(e)))}cloneShallow(){return new F({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange(`vertexAttributes`)}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([import(`./support/meshUtils/exporters/gltf/gltfexport.js`),this.load(e)]);return a(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return this.loaded?!0:(r.getLogger(this).error(e,y),!1)}};e([s({type:[_],json:{write:!0}})],L.prototype,`components`,void 0),e([s({nonNullable:!0,types:I,constructOnly:!0,json:{write:!0},clonable:(e,t)=>j(t)?.vertexSpace??e.clone(t)})],L.prototype,`vertexSpace`,void 0),e([s({type:S,clonable:(e,t)=>{let n=j(t);return n&&`transform`in n?n.transform:e?.clone()??e},json:{write:!0}})],L.prototype,`transform`,void 0),e([s({constructOnly:!0,type:M,clonable:(e,t)=>j(t)?.metadata??e.clone()})],L.prototype,`metadata`,void 0),e([s()],L.prototype,`hasExtent`,null),e([s()],L.prototype,`_transformedExtent`,null),e([s()],L.prototype,`_untransformedBounds`,null),e([s()],L.prototype,`origin`,null),e([s({readOnly:!0,json:{read:!1}})],L.prototype,`extent`,null),e([s({readOnly:!0,json:{read:!1,write:!0,default:!0}})],L.prototype,`hasZ`,void 0),e([s({readOnly:!0,json:{read:!1,write:!0,default:!1}})],L.prototype,`hasM`,void 0),e([s({type:C,nonNullable:!0,json:{write:!0},clonable:(e,t)=>j(t)?.vertexAttributes??e.clone(t)})],L.prototype,`vertexAttributes`,void 0),L=F=e([c(`esri.geometry.Mesh`)],L);const R=g();export{L as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import"../../core/has.js";import"../../core/Logger.js";import{subtract as e,length as t,normalize as n,set as r,add as i,scale as a,distance as o}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as s}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../ellipsoidUtils.js";import{Sphere as l}from"./sphere.js";import{cartesianToSpherical as u}from"./sphereUtils.js";class d{constructor(e){this._sphere=new l,this._sphere.radius=typeof e==`number`?e:c(e).radius}setExtent(){}getExtent(e){return e}altitudeAt(n){let r=e(f,n,this._sphere.center);return t(r)-this._sphere.radius}worldBasisAtPosition(t,i,a){let o=e(f,t,this._sphere.center);switch(i){case 0:{let e=u(o,f)[2];r(a,-Math.sin(e),Math.cos(e),0);break}case 1:{let e=u(o,f),t=e[1],n=e[2],i=Math.sin(t);r(a,-i*Math.cos(n),-i*Math.sin(n),Math.cos(t));break}case 2:n(a,o)}}intersectRay(e,t){return this._sphere.intersectRay(e,t)}intersectRayClosestSilhouette(e,n){if(this._sphere.intersectRay(e,n))return;let r=this._sphere.closestPointOnSilhouette(e,f);i(n,e.origin,a(p,e.direction,o(e.origin,r)/t(e.direction)))}setAltitudeAt(e,t,n){let r=this.altitudeAt(e);this.worldBasisAtPosition(e,2,f);let o=a(f,f,t-r);i(n,e,o)}elevate(e,t){t._sphere.copyFrom(this._sphere),t._sphere.radius+=e}clone(){let e=new d(this._sphere.radius);return e._sphere.copyFrom(this._sphere),e}}const f=s(),p=s();export{d as GlobalCoordinateSystem};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{fromValues as e,setExtent as t,getExtent as n,altitudeAt as r,axisAt as i,intersectRay as a,intersectRayClosestSilhouette as o,setAltitudeAt as s,elevate as c,copy as l}from"./boundedPlane.js";class u{constructor(){this._plane=e([0,0,0],[d,0,0],[0,d,0])}setExtent(e){e&&t(this._plane,e,this._plane)}getExtent(e){return n(this._plane,e)}altitudeAt(e){return r(this._plane,e)}worldBasisAtPosition(e,t,n){i(this._plane,e,t,n)}intersectRay(e,t){return a(this._plane,e,t)}intersectRayClosestSilhouette(e,t){o(this._plane,e,t)}setAltitudeAt(e,t,n){s(this._plane,e,t,n)}elevate(e,t){c(this._plane,e,t._plane)}clone(){let e=new u;return l(this._plane,e._plane),e}get plane(){return this._plane.plane}}const d=2**50;export{u as LocalCoordinateSystem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/ObjectStack.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../core/libs/gl-matrix-2/math/vec3.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./aaBoundingRect.js";import"./lineSegment.js";import"./plane.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{k as altitudeAt,l as axisAt,j as cameraFrustumCoverage,m as closestPoint,o as closestPointOnSilhouette,a as copy,p as copyWithoutVerify,c as create,e as distance,q as distance2,s as distanceToSilhouette,t as elevate,g as equals,h as extrusionContainsPoint,d as fromAABoundingRect,f as fromValues,v as getExtent,i as intersectRay,w as intersectRayClosestSilhouette,n as normal,x as projectPoint,y as projectPointLocal,r as rotate,z as setAltitudeAt,A as setExtent,B as transform,C as up,u as updateUnboundedPlane,D as wrap}from"../../chunks/boundedPlane.js";
2
+ import e from"../../core/Logger.js";import{acosClamped as t}from"../../core/mathUtils.js";import{ObjectStack as n}from"../../core/ObjectStack.js";import{fromRotation as r,invert as i,transpose as a}from"../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as s,dot as c,length as l,set as u,subtract as d,add as f,scale as p,distance as ee,normalize as m,squaredLength as h,direction as te,exactEquals as g,transformMat4 as _}from"../../core/libs/gl-matrix-2/math/vec3.js";import{clone as v,fromValues as y,create as b}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as ne}from"./aaBoundingRect.js";import{create as re,projectPointClamp as x,distance2 as ie}from"./lineSegment.js";import{create as S,fromVectorsAndPoint as C,getNormal as w,fromValues as ae,intersectRay as oe,intersectLineSegment as se,intersectLineSegmentClamp as ce,isPointInClosedPositiveHalfspace as T,projectPoint as le,signedDistance as ue,copy as de,setOffsetFromPoint as fe,wrap as pe}from"./plane.js";import{distance2 as me}from"./ray.js";import{projectPointSignedLength as E}from"./vector.js";import{sv3d as D}from"./vectorStacks.js";const O=()=>e.getLogger(`esri.views.3d.support.geometryUtils.boundedPlane`);function k(e=J){return{plane:S(e.plane),origin:v(e.origin),basis1:v(e.basis1),basis2:v(e.basis2)}}function he(e,t,n){let r=Me.get();return r.origin=e,r.basis1=t,r.basis2=n,r.plane=pe(0,0,0,0),M(r),r}function A(e,t=k()){return j(e.origin,e.basis1,e.basis2,t)}function ge(e,t){s(t.origin,e.origin),s(t.basis1,e.basis1),s(t.basis2,e.basis2),de(t.plane,e.plane)}function j(e,t,n,r=k()){return s(r.origin,e),s(r.basis1,t),s(r.basis2,n),M(r),K(r,`fromValues()`),r}function M(e){C(e.basis2,e.basis1,e.origin,e.plane)}function N(e,t,n){e!==n&&A(e,n);let r=p(D.get(),H(e),t);return f(n.origin,n.origin,r),n.plane[3]-=t,n}function _e(e,t,n){return P(t,n),N(n,V(e,e.origin),n),n}function ve(e,t){let n=e.basis1[0],r=e.basis2[1],[i,a]=e.origin;return ne(i-n,a-r,i+n,a+r,t)}function P(e,t=k()){let n=(e[2]-e[0])/2,r=(e[3]-e[1])/2;return u(t.origin,e[0]+n,e[1]+r,0),u(t.basis1,n,0,0),u(t.basis2,0,r,0),ae(0,0,1,0,t.plane),t}function F(e,t,n){let r=n??ye;return oe(e.plane,t,r)?U(e,r):!1}const ye=b();function be(e,t,n){if(F(e,t,n))return n;let r=I(e,t,D.get());return f(n,t.origin,p(D.get(),t.direction,ee(t.origin,r)/l(t.direction))),n}function I(e,n,r){let i=Y.get();q(e,n,i,Y.get());let a=1/0;for(let o of Z){let l=G(e,o,X.get()),u=D.get();if(se(i,l,u)){let e=te(D.get(),n.origin,u),i=Math.abs(t(c(n.direction,e)));i<a&&(a=i,s(r,u))}}return a===1/0?L(e,n,r):r}function xe(e,t){return(t-e)/t}function L(e,t,n){if(F(e,t,n))return n;let r=Y.get(),i=Y.get();q(e,t,r,i);let a=1/0;for(let o of Z){let c=G(e,o,X.get()),l=D.get();if(ce(r,c,l)){let e=me(t,l);if(!T(i,l))continue;e<a&&(a=e,s(n,l))}}return B(e,t.origin)<a&&R(e,t.origin,n),n}function R(e,t,n){let r=le(e.plane,t,D.get()),i=x(W(e,e.basis1),r,-1,1,D.get()),a=x(W(e,e.basis2),r,-1,1,D.get());return d(n,f(D.get(),i,a),e.origin),n}function z(e,t,n){let{origin:r,basis1:i,basis2:a}=e,o=d(D.get(),t,r),s=E(i,o),c=E(a,o),l=E(H(e),o);return u(n,s,c,l)}function B(e,t){let n=z(e,t,D.get()),{basis1:r,basis2:i}=e,a=l(r),o=l(i),s=Math.max(Math.abs(n[0])-a,0),c=Math.max(Math.abs(n[1])-o,0),u=n[2];return s*s+c*c+u*u}function Se(e,t){return Math.sqrt(B(e,t))}function Ce(e,t){let n=-1/0;for(let r of Z){let i=G(e,r,X.get()),a=ie(i,t);a>n&&(n=a)}return Math.sqrt(n)}function we(e,t){return ue(e.plane,t)>0&&U(e,t)}function Te(e,t,n,r){return Ae(e,n,r)}function V(e,t){let n=-e.plane[3];return E(H(e),t)-n}function Ee(e,t,n,r){let i=V(e,t),a=p(je,H(e),n-i);return f(r,t,a),r}function De(e,t){return e===t||e==null&&t==null||e!=null&&t!=null&&g(e.basis1,t.basis1)&&g(e.basis2,t.basis2)&&g(e.origin,t.origin)}function Oe(e,t,n){return e!==n&&A(e,n),i(Q,t),a(Q,Q),_(n.basis1,e.basis1,Q),_(n.basis2,e.basis2,Q),_(w(n.plane),w(e.plane),Q),_(n.origin,e.origin,t),fe(n.plane,n.plane,n.origin),n}function ke(e,t,n,i){return e!==i&&A(e,i),r($,t,n),_(i.basis1,e.basis1,$),_(i.basis2,e.basis2,$),M(i),i}function H(e){return w(e.plane)}function Ae(e,t,n){switch(t){case 0:s(n,e.basis1),m(n,n);break;case 1:s(n,e.basis2),m(n,n);break;case 2:s(n,H(e))}return n}function U(e,t){let n=d(D.get(),t,e.origin),r=h(e.basis1),i=h(e.basis2),a=c(e.basis1,n),o=c(e.basis2,n);return-a-r<0&&a-r<0&&-o-i<0&&o-i<0}function W(e,t){let n=X.get();return s(n.origin,e.origin),s(n.vector,t),n}function G(e,t,n){let{basis1:r,basis2:i,origin:a}=e,o=p(D.get(),r,t.origin[0]),s=p(D.get(),i,t.origin[1]);f(n.origin,o,s),f(n.origin,n.origin,a);let c=p(D.get(),r,t.direction[0]),l=p(D.get(),i,t.direction[1]);return p(n.vector,f(c,c,l),2),n}function K(e,t){Math.abs(c(e.basis1,e.basis2)/(l(e.basis1)*l(e.basis2)))>1e-6&&O().warn(t,`Provided basis vectors are not perpendicular`),Math.abs(c(e.basis1,H(e)))>1e-6&&O().warn(t,`Basis vectors and plane normal are not perpendicular`),Math.abs(-c(H(e),e.origin)-e.plane[3])>1e-6&&O().warn(t,`Plane offset is not consistent with plane origin`)}function q(e,t,n,r){let i=H(e);C(i,t.direction,t.origin,n),C(w(n),i,t.origin,r)}const J={plane:S(),origin:y(0,0,0),basis1:y(1,0,0),basis2:y(0,1,0)},Y=new n(S),X=new n(re),je=b(),Me=new n(()=>k()),Z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],Q=o(),$=o();export{V as altitudeAt,Te as axisAt,xe as cameraFrustumCoverage,L as closestPoint,I as closestPointOnSilhouette,A as copy,ge as copyWithoutVerify,k as create,Se as distance,B as distance2,Ce as distanceToSilhouette,N as elevate,De as equals,we as extrusionContainsPoint,P as fromAABoundingRect,j as fromValues,ve as getExtent,F as intersectRay,be as intersectRayClosestSilhouette,H as normal,R as projectPoint,z as projectPointLocal,ke as rotate,Ee as setAltitudeAt,_e as setExtent,Oe as transform,J as up,M as updateUnboundedPlane,he as wrap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{copy as e}from"../../core/libs/gl-matrix-2/math/mat4.js";import{set as t,dot as n,copy as r,normalize as i,cross as a}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as s}from"../ellipsoidUtils.js";import c from"../SpatialReference.js";import{getSphericalPCPF as l}from"../spatialReferenceEllipsoidUtils.js";import{f as u,b as d}from"../../chunks/boundedPlane.js";import{Sphere as f,sphereCSO as p}from"./sphere.js";function m(e){let{value:t,operations:n}=e;return{operations:n,value:n.create(t)}}function h(e,t,n){return e.operations.setExtent(e.value,t,n.value),n}function g(e,t){return e.operations.getExtent(e.value,t),t}function _(e){return{operations:e,value:e.create()}}function v(e,t,n=_(e)){return n.operations=e,e.copy(t,n.value),n}function y(e){return v(p,new f(0,0,0,s(e).radius))}const b=2**50;function x(){return v(d,u([0,0,0],[b,0,0],[0,b,0]))}function S(e,t,n){return e.operations.axisAt(e.value,t,2,n)}function C(e,t,n,r){return e.operations.axisAt(e.value,t,n,r)}function w(e,t,n){return e.operations.intersectRay(e.value,t,n)}function T(e,t,n){return e.operations.closestPoint(e.value,t,n)}function E(e,t,n){return e.operations.intersectRayClosestSilhouette(e.value,t,n)}function D(e,t,n){return e.operations.closestPointOnSilhouette(e.value,t,n)}function O(e,t){return e.operations.distanceToSilhouette(e.value,t)}function k(e,t){return e.operations.altitudeAt(e.value,t)}function A(e,t,n,r){return e.operations.setAltitudeAt(e.value,t,n,r)}function j(n,r,i,a){return r!==a&&e(a,r),t(N,a[12],a[13],a[14]),A(n,N,i,N),a[12]=N[0],a[13]=N[1],a[14]=N[2],a}function M(e,t,n){return e.operations.elevate(e.value,t,n.value)}const N=o();function P(e,t,r,i,a){return a[0]=n(e,t),a[1]=n(e,r),a[2]=n(e,i),a}function F(e,t,n,o,s){r(n,e),r(L,t),i(L,L),a(o,L,n),a(s,o,n)}function I(e,t){return e?l(t):t.isGeographic?c.PlateCarree:t}const L=o();export{k as altitudeAt,C as axisAt,T as closestPoint,D as closestPointOnSilhouette,F as coordinateSystemFromOneAxisAndNormalVector,m as create,_ as createFromOperations,y as createGlobal,x as createLocal,O as distanceToSilhouette,M as elevate,v as fromValues,g as getExtent,w as intersectRay,E as intersectRayClosestSilhouette,S as normalAt,I as renderSRFromViewSR,A as setAltitudeAt,j as setAltitudeOfTransformation,h as setExtent,P as vectorCoordinates};
2
+ import{dot as e,copy as t,normalize as n,cross as r}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../SpatialReference.js";import{getSphericalPCPF as o}from"../spatialReferenceEllipsoidUtils.js";class s{}function c(t,n,r,i,a){return a[0]=e(t,n),a[1]=e(t,r),a[2]=e(t,i),a}function l(e,i,a,o,s){t(a,e),t(d,i),n(d,d),r(o,d,a),r(s,o,a)}function u(e,t){return e?o(t):t.isGeographic?a.PlateCarree:t}const d=i();export{s as CoordinateSystem,l as coordinateSystemFromOneAxisAndNormalVector,u as renderSRFromViewSR,c as vectorCoordinates};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Error.js";const t=`Mesh must be loaded before applying operations`,n=`Provided component is not part of the list of components`,r=`Expected polygon to be a Polygon instance`,i=`Expected location to be a Point instance`;class a extends e{constructor(){super(`invalid-input:location`,i)}}export{a as InvalidLocationError,n as componentNotFoundMessage,i as invalidLocationMessage,r as invalidPolygonMessage,t as meshNotLoadedMessage};
2
+ const e=`Mesh must be loaded before applying operations`,t=`Provided component is not part of the list of components`;export{t as componentNotFoundMessage,e as meshNotLoadedMessage};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{clamp as e}from"../../core/mathUtils.js";import{exactEquals as t,subtract as n,normalize as r,dot as i,lerp as a,copy as o,add as s,scale as c,cross as l,set as u,scaleAndAdd as d}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{equals as p,exactEquals as m}from"../../core/libs/gl-matrix-2/math/vec4.js";import{projectPointSignedLength as h}from"./vector.js";import{sv3d as g,sv4d as _}from"./vectorStacks.js";import{tangentFrame as ee}from"../../views/3d/support/mathUtils.js";function v(e=Z){return[e[0],e[1],e[2],e[3]]}const te=m,ne=p;function re(e=Z[0],t=Z[1],n=Z[2],r=Z[3]){return x(e,t,n,r,_.get())}function y(e,t){return x(t[0],t[1],t[2],t[3],e)}function b(e){return e}function x(e,t,n,r,i=v()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function S(e,t,n){return o(n,e),n[3]=t,n}function C(e,t,n){let r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function w(e,t,n,r=v()){let i=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=e[0]-t[0],c=e[1]-t[1],l=e[2]-t[2],u=a*l-o*c,d=o*s-i*l,f=i*c-a*s,p=u*u+d*d+f*f,m=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return r[0]=u*m,r[1]=d*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function T(e,a,o,s=0,c=Math.floor(1/3*o),l=Math.floor(2/3*o)){if(o<3)return!1;a(D,s);let u=c,d=!1;for(;u<o-1&&!d;)a(O,u),u++,d=!t(D,O);if(!d)return!1;for(u=Math.max(u,l),d=!1;u<o&&!d;)a(k,u),u++,n(A,D,O),r(A,A),n(j,O,k),r(j,j),d=!t(D,k)&&!t(O,k)&&Math.abs(i(A,j))<ie;return d?(w(D,O,k,e),!0):s===0&&c===1&&l===2?!1:T(e,a,o,0,1,2)}function E(e,t,n=!0){let r=t.length/3;return T(e,(e,n)=>u(e,t[n*3+0],t[n*3+1],t[n*3+2]),n?r-1:r)}const ie=.99619469809,D=f(),O=f(),k=f(),A=f(),j=f();function ae(e,t,n){return t!==e&&y(e,t),e[3]=-i(b(e),n),e}function oe(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function se(e,t,n,r){return l(k,t,e),C(n,k,r)}function M(e,t,r,i){return Y(X(e,t,n(g.get(),r,t),ue,i))}function N(e,t,n){return t!=null&&Y(X(e,t.origin,t.direction,de,n))}function P(e,t,n){return Y(X(e,t.origin,t.vector,0,n))}function F(e,t,n){return Y(X(e,t.origin,t.vector,1,n))}function I(e,t){return q(e,t)<=0}function L(e,t){return q(e,t)>=0}function R(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!0,1e-6)}function z(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!1,1e-6)}function B(e,t){return t.c0<=t.c1&&V(e,t.ray.origin,t.ray.direction,t,!1,!0,!1,0)}function V(e,t,n,r,a,o,s,c){let l=i(b(e),n),u=q(e,t);if(l>=-c&&l<=c)return H(u,a,o);let d=-u/l,f=H(l,a,!1);return s&&!f&&!H(u,a,o)?!1:(f?d>r.c0&&(r.c0=d):d<r.c1&&(r.c1=d),r.c0<=r.c1)}function H(e,t,n){return n?t?e>=0:e<=0:t?e>0:e<0}function U(e,t,n,r=!1){let i=t.at(-1),s=q(e,i),c=r?s>0:s<=0;for(let l=0;l<t.length;l++){let u=t.at(l),d=q(e,u),f=r?d>0:d<=0;c!==f&&a(n(),i,u,s/(s-d)),f&&o(n(),u),i=u,s=d,c=f}}function W(e,t,r,i,a,o=!1){return n(Q,r,t),$.c0=0,$.c1=1,V(e,t,Q,$,o,!o,!1,1e-6)?(d(i,t,Q,$.c0),d(a,t,Q,$.c1),!0):!1}function G(e,t,r){let i=c(g.get(),b(e),-e[3]),a=K(e,n(g.get(),t,i),g.get());return s(r,a,i),r}function ce(e,t,r,i){let a=b(e),o=g.get(),s=g.get();ee(a,o,s);let c=n(g.get(),r,t),l=h(o,c),d=h(s,c),f=h(a,c);return u(i,l,d,f)}function K(e,t,r){let a=c(g.get(),b(e),i(b(e),t));return n(r,t,a),r}function le(e,t){return Math.abs(q(e,t))}function q(e,t){return i(b(e),t)+e[3]}function J(e,t,n){for(let r=0;r<n;++r)if(I(e,t[r]))return!1;return!0}function Y(e){return e===0||e===1}function X(t,n,r,a,o){let l=i(b(t),r),u=q(t,n);if(l===0)return u>=0?2:3;let d=-u/l;return a&1&&(d=e(d,0,1)),!(a&4)&&d<0||!(a&8)&&d>1?u>=0?2:3:(s(o,n,c(o,r,d)),u>=0?0:1)}const Z=[0,0,1,0],ue=12,de=8,Q=f(),$={c0:0,c1:1};export{J as areAllPointsOutside,R as clip,B as clipClosedNegativeHalfspace,z as clipInfinite,W as clipLineSegment,U as clipPolygon,y as copy,v as create,le as distance,ne as equals,te as exactEquals,E as fromArray,T as fromManyPoints,S as fromNormalAndOffset,w as fromPoints,C as fromPositionAndNormal,x as fromValues,se as fromVectorsAndPoint,b as getNormal,M as intersectLine,X as intersectLineOrRay,P as intersectLineSegment,F as intersectLineSegmentClamp,N as intersectRay,L as isPointInClosedPositiveHalfspace,I as isPointInside,oe as negate,G as projectPoint,ce as projectPointLocal,K as projectVector,ae as setOffsetFromPoint,q as signedDistance,Z as up,re as wrap};
2
+ import{clamp as e}from"../../core/mathUtils.js";import{lerp as t,copy as n,dot as r,add as i,scale as a,subtract as o,cross as s,exactEquals as c,normalize as l,set as u,scaleAndAdd as d}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{equals as p,exactEquals as m}from"../../core/libs/gl-matrix-2/math/vec4.js";import{projectPointSignedLength as h}from"./vector.js";import{sv3d as g,sv4d as _}from"./vectorStacks.js";import{tangentFrame as ee}from"../../views/3d/support/mathUtils.js";function v(e=Z){return[e[0],e[1],e[2],e[3]]}const te=m,ne=p;function re(e=Z[0],t=Z[1],n=Z[2],r=Z[3]){return x(e,t,n,r,_.get())}function y(e,t){return x(t[0],t[1],t[2],t[3],e)}function b(e){return e}function x(e,t,n,r,i=v()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function S(e,t,r){return n(r,e),r[3]=t,r}function C(e,t,n){let r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function w(e,t,n,r=v()){let i=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=e[0]-t[0],c=e[1]-t[1],l=e[2]-t[2],u=a*l-o*c,d=o*s-i*l,f=i*c-a*s,p=u*u+d*d+f*f,m=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return r[0]=u*m,r[1]=d*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function T(e,t,n,i=0,a=Math.floor(1/3*n),s=Math.floor(2/3*n)){if(n<3)return!1;t(D,i);let u=a,d=!1;for(;u<n-1&&!d;)t(O,u),u++,d=!c(D,O);if(!d)return!1;for(u=Math.max(u,s),d=!1;u<n&&!d;)t(k,u),u++,o(A,D,O),l(A,A),o(j,O,k),l(j,j),d=!c(D,k)&&!c(O,k)&&Math.abs(r(A,j))<ie;return d?(w(D,O,k,e),!0):i===0&&a===1&&s===2?!1:T(e,t,n,0,1,2)}function E(e,t,n=!0){let r=t.length/3;return T(e,(e,n)=>u(e,t[n*3+0],t[n*3+1],t[n*3+2]),n?r-1:r)}const ie=.99619469809,D=f(),O=f(),k=f(),A=f(),j=f();function ae(e,t,n){return t!==e&&y(e,t),e[3]=-r(b(e),n),e}function oe(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function se(e,t,n,r){return s(k,t,e),C(n,k,r)}function M(e,t,n,r){return Y(X(e,t,o(g.get(),n,t),ue,r))}function N(e,t,n){return t!=null&&Y(X(e,t.origin,t.direction,de,n))}function P(e,t,n){return Y(X(e,t.origin,t.vector,0,n))}function F(e,t,n){return Y(X(e,t.origin,t.vector,1,n))}function I(e,t){return q(e,t)<=0}function L(e,t){return q(e,t)>=0}function R(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!0,1e-6)}function z(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!1,1e-6)}function B(e,t){return t.c0<=t.c1&&V(e,t.ray.origin,t.ray.direction,t,!1,!0,!1,0)}function V(e,t,n,i,a,o,s,c){let l=r(b(e),n),u=q(e,t);if(l>=-c&&l<=c)return H(u,a,o);let d=-u/l,f=H(l,a,!1);return s&&!f&&!H(u,a,o)?!1:(f?d>i.c0&&(i.c0=d):d<i.c1&&(i.c1=d),i.c0<=i.c1)}function H(e,t,n){return n?t?e>=0:e<=0:t?e>0:e<0}function U(e,r,i,a=!1){let o=r.at(-1),s=q(e,o),c=a?s>0:s<=0;for(let l=0;l<r.length;l++){let u=r.at(l),d=q(e,u),f=a?d>0:d<=0;c!==f&&t(i(),o,u,s/(s-d)),f&&n(i(),u),o=u,s=d,c=f}}function W(e,t,n,r,i,a=!1){return o(Q,n,t),$.c0=0,$.c1=1,V(e,t,Q,$,a,!a,!1,1e-6)?(d(r,t,Q,$.c0),d(i,t,Q,$.c1),!0):!1}function G(e,t,n){let r=a(g.get(),b(e),-e[3]),s=K(e,o(g.get(),t,r),g.get());return i(n,s,r),n}function ce(e,t,n,r){let i=b(e),a=g.get(),s=g.get();ee(i,a,s);let c=o(g.get(),n,t),l=h(a,c),d=h(s,c),f=h(i,c);return u(r,l,d,f)}function K(e,t,n){let i=a(g.get(),b(e),r(b(e),t));return o(n,t,i),n}function le(e,t){return Math.abs(q(e,t))}function q(e,t){return r(b(e),t)+e[3]}function J(e,t,n){for(let r=0;r<n;++r)if(I(e,t[r]))return!1;return!0}function Y(e){return e===0||e===1}function X(t,n,o,s,c){let l=r(b(t),o),u=q(t,n);if(l===0)return u>=0?2:3;let d=-u/l;return s&1&&(d=e(d,0,1)),!(s&4)&&d<0||!(s&8)&&d>1?u>=0?2:3:(i(c,n,a(c,o,d)),u>=0?0:1)}const Z=[0,0,1,0],ue=12,de=8,Q=f(),$={c0:0,c1:1};export{J as areAllPointsOutside,R as clip,B as clipClosedNegativeHalfspace,z as clipInfinite,W as clipLineSegment,U as clipPolygon,y as copy,v as create,le as distance,ne as equals,te as exactEquals,E as fromArray,T as fromManyPoints,S as fromNormalAndOffset,w as fromPoints,C as fromPositionAndNormal,x as fromValues,se as fromVectorsAndPoint,b as getNormal,M as intersectLine,X as intersectLineOrRay,P as intersectLineSegment,F as intersectLineSegmentClamp,N as intersectRay,L as isPointInClosedPositiveHalfspace,I as isPointInside,oe as negate,G as projectPoint,ce as projectPointLocal,K as projectVector,ae as setOffsetFromPoint,q as signedDistance,Z as up,re as wrap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{deg2rad as e}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as t,getMetersPerVerticalUnitForSR as n}from"../../core/units.js";import{set as r}from"../../core/libs/gl-matrix-2/math/vec3.js";import{getNormal as i,fromManyPoints as a,create as o}from"./plane.js";function s(t,n,r){let a=c(l,t,n,r)?i(l):[0,0,1];return Math.abs(a[2])>Math.cos(e(80))?2:+(Math.abs(a[1])>Math.abs(a[0]))}function c(e,i,o,s){let c=(e=>!Array.isArray(e[0]))(i)?(e,t)=>i[e*3+t]:(e,t)=>i[e][t],l=t(s)/n(s);return a(e,(e,t)=>r(e,c(t,0)*l,c(t,1)*l,c(t,2)),o)}const l=o();export{c as fitPlane,s as leastSignificantAxis};
2
+ import{deg2rad as e}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as t,getMetersPerVerticalUnitForSR as n}from"../../core/units.js";import{set as r}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as i,getNormal as a,fromManyPoints as o}from"./plane.js";function s(t,n,r){let i=c(l,t,n,r)?a(l):[0,0,1];return Math.abs(i[2])>Math.cos(e(80))?2:+(Math.abs(i[1])>Math.abs(i[0]))}function c(e,i,a,s){let c=(e=>!Array.isArray(e[0]))(i)?(e,t)=>i[e*3+t]:(e,t)=>i[e][t],l=t(s)/n(s);return o(e,(e,t)=>r(e,c(t,0)*l,c(t,1)*l,c(t,2)),a)}const l=i();export{c as fitPlane,s as leastSignificantAxis};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{ObjectStack as e}from"../../core/ObjectStack.js";import{set as t,invert as n}from"../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as i,subtract as a,exactEquals as o,dot as s,normalize as c,cross as l,sub as u,set as d,add as f,scale as p}from"../../core/libs/gl-matrix-2/math/vec3.js";import{clone as m,create as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as g}from"./vectorStacks.js";function _(e){return e?v(m(e.origin),m(e.direction)):v(h(),h())}function v(e,t){return{origin:e,direction:t}}function y(e,t){return o(e.origin,t.origin)&&o(e.direction,t.direction)}function b(e,t){let n=D.get();return n.origin=e,n.direction=t,n}function x(e,t=_()){return C(e.origin,e.direction,t)}function S(e,t,n=_()){return i(n.origin,e),a(n.direction,t,e),n}function C(e,t,n=_()){return i(n.origin,e),i(n.direction,t),n}function w(e,t){let n=l(g.get(),c(g.get(),e.direction),a(g.get(),t,e.origin));return s(n,n)}function T(e,t,n){let r=s(e.direction,a(n,t,e.origin));return f(n,e.origin,p(n,e.direction,r)),n}function E(e,r,i,a){let o=e.origin,m=r.origin,h=e.direction,g=r.direction,_=s(c(k,h),c(A,g));if(Math.abs(_)>=1)return null;let v=l(k,h,g),y=u(O,m,o),b=t(j,h[0],h[1],h[2],-g[0],-g[1],-g[2],v[0],v[1],v[2]),x=n(j,b);if(x==null)return[i,a];let S=s(d(k,x[0],x[3],x[6]),y),C=s(d(A,x[1],x[4],x[7]),y);return f(i,o,p(O,h,S)),f(a,m,p(O,g,C)),[i,a]}const D=new e(()=>_()),O=h(),k=h(),A=h(),j=r();export{T as closestPoint,E as closestPoints,x as copy,_ as create,w as distance2,y as equals,S as fromPoints,C as fromValues,b as wrap};
2
+ import{ObjectStack as e}from"../../core/ObjectStack.js";import{set as t,invert as n}from"../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as i,subtract as a,cross as o,normalize as s,dot as c,exactEquals as l,sub as u,set as d,add as f,scale as p}from"../../core/libs/gl-matrix-2/math/vec3.js";import{clone as m,create as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as g}from"./vectorStacks.js";function _(e){return e?v(m(e.origin),m(e.direction)):v(h(),h())}function v(e,t){return{origin:e,direction:t}}function y(e,t){return l(e.origin,t.origin)&&l(e.direction,t.direction)}function b(e,t){let n=E.get();return n.origin=e,n.direction=t,n}function x(e,t=_()){return C(e.origin,e.direction,t)}function S(e,t,n=_()){return i(n.origin,e),a(n.direction,t,e),n}function C(e,t,n=_()){return i(n.origin,e),i(n.direction,t),n}function w(e,t){let n=o(g.get(),s(g.get(),e.direction),a(g.get(),t,e.origin));return c(n,n)}function T(e,r,i,a){let l=e.origin,m=r.origin,h=e.direction,g=r.direction,_=c(s(O,h),s(k,g));if(Math.abs(_)>=1)return null;let v=o(O,h,g),y=u(D,m,l),b=t(A,h[0],h[1],h[2],-g[0],-g[1],-g[2],v[0],v[1],v[2]),x=n(A,b);if(x==null)return[i,a];let S=c(d(O,x[0],x[3],x[6]),y),C=c(d(k,x[1],x[4],x[7]),y);return f(i,l,p(D,h,S)),f(a,m,p(D,g,C)),[i,a]}const E=new e(()=>_()),D=h(),O=h(),k=h(),A=r();export{T as closestPoints,x as copy,_ as create,w as distance2,y as equals,S as fromPoints,C as fromValues,b as wrap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/has.js";import"../../core/Logger.js";import{acosClamped as e}from"../../core/mathUtils.js";import{getEpsilon as t}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r,equals as i,squaredDistance as a,subtract as o,scale as s,length as c,add as l,cross as u,transformMat4 as d,distance as f,lerp as p,scaleAndAdd as m,squaredLength as h,normalize as g,set as _}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as v,fromArray as y,clone as b,create as x}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as S}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isVec3 as C}from"../../core/libs/gl-matrix-2/types/vec3.js";import{isVec4 as w}from"../../core/libs/gl-matrix-2/types/vec4.js";import{fromPoints as T,closestPoint as E}from"./ray.js";import{cartesianToSpherical as D}from"./sphereUtils.js";import{angle as O}from"./vector.js";import{sv3d as k,sm4d as A}from"./vectorStacks.js";class j{constructor(e=0,t=0,n=0,r=0){this.radius=r,typeof e==`number`?this._center=v(e,t,n):C(e)||w(e)?(this._center=y(e),this.radius=e.length===4?e[3]:t):(this._center=b(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){r(this.center,e)}exactEquals(e){return i(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&(r(this._center,e.center),this.radius=e.radius),this}clone(){return new j(this.center,this.radius)}toVec4(){return S(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return a(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return a(this.center,e.center)<=t*t}intersectRay(e,t){if(e==null||!this._intersect(e,P))return!1;let{t0:n,t1:r}=P;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(t){let{origin:r,direction:i}=e;t[0]=r[0]+i[0]*n,t[1]=r[1]+i[1]*n,t[2]=r[2]+i[2]*n}return!0}intersectLine(e,n){let r=T(e,n);if(!this._intersect(r,P))return[];let{origin:i,direction:a}=r,{t0:o,t1:s}=P,c=e=>{let t=x();return m(t,i,a,e),this.projectPoint(t,t)};return Math.abs(o-s)<t()?[c(o)]:[c(o),c(s)]}_intersect(e,t){let{origin:n,direction:r}=e,i=F;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(a===0)return!1;let o=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2,c=o*o-4*a*s;if(c<0)return!1;let l=Math.sqrt(c);return t.t0=(-o-l)/(2*a),t.t1=(-o+l)/(2*a),!0}projectPoint(e,t){let n=o(k.get(),e,this.center),r=s(k.get(),n,this.radius/c(n));return l(t,r,this.center)}closestPointOnSilhouette(e,t){let r=k.get(),i=A.get();u(r,e.origin,e.direction),u(t,r,e.origin),s(t,t,1/c(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=O(e.origin,t);return n(i,o+a,r),d(t,t,i),t}frustumCoverage(e,t,n){let r=this.radius,i=r*r,a=e+.5*Math.PI,o=t*t+i-Math.cos(a)*2*t*r,s=Math.sqrt(o),c=o-i;if(c<=0)return .5;let l=Math.acos(Math.sqrt(c)/s)-Math.asin(r/(s/Math.sin(a)));return Math.min(1,(l+.5*n)/n)}_angleToSilhouette(t){let n=o(k.get(),t,this.center),r=c(n),i=this.radius,a=i+Math.abs(i-r);return e(i/a)}union(e){let t=f(this._center,e.center),n=this.radius,r=e.radius;return t+r<n?this:t+n<r?(this.copyFrom(e),this):(p(this._center,this._center,e.center,(t+r-n)/(2*t)),this.radius=(t+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:n}=this,r=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}const M={create:e=>new j(e),copy:(e,t)=>t.copyFrom(e),setExtent(e,t,n){return n.copyFrom(e)},getExtent(e,t){return t},elevate:(e,t,n)=>(n.copyFrom(e),n.radius+=t,n),axisAt(e,t,n,r){let i=o(I,t,e.center);switch(n){case 0:{let e=D(i,I)[2];return _(r,-Math.sin(e),Math.cos(e),0)}case 1:{let e=D(i,I),t=e[1],n=e[2],a=Math.sin(t);return _(r,-a*Math.cos(n),-a*Math.sin(n),Math.cos(t))}case 2:return g(r,i);default:return}},altitudeAt(e,t){let n=o(L,t,e.center);return c(n)-e.radius},setAltitudeAt(e,t,n,r){let i=M.altitudeAt(e,t),a=M.axisAt(e,t,2,L),o=s(L,a,n-i);return l(r,t,o)},intersectRay:(e,t,n)=>e.intersectRay(t,n),closestPoint(e,t,n){return e.intersectRay(t,n)?n:(E(t,e.center,n),e.projectPoint(n,n))},intersectRayClosestSilhouette(e,t,n){if(e.intersectRay(t,n))return n;let r=e.closestPointOnSilhouette(t,k.get());return l(n,t.origin,s(k.get(),t.direction,f(t.origin,r)/c(t.direction))),n},closestPointOnSilhouette:(e,t,n)=>e.closestPointOnSilhouette(t,n),distanceToSilhouette(e,t){let n=o(k.get(),t,e.center),r=h(n),i=e.radius**2;return Math.sqrt(Math.abs(r-i))}},N=new j,P={t0:0,t1:0},F=x(),I=x(),L=x();export{N as NullSphere,j as Sphere,M as sphereCSO};
2
+ import{acosClamped as e}from"../../core/mathUtils.js";import{getEpsilon as t}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r,equals as i,squaredDistance as a,subtract as o,scale as s,length as c,add as l,cross as u,transformMat4 as d,squaredLength as f,distance as p,lerp as m,scaleAndAdd as h}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as g,fromArray as _,clone as v,create as y}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as b}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isVec3 as x}from"../../core/libs/gl-matrix-2/types/vec3.js";import{isVec4 as S}from"../../core/libs/gl-matrix-2/types/vec4.js";import{fromPoints as C}from"./ray.js";import{angle as w}from"./vector.js";import{sv3d as T,sm4d as E}from"./vectorStacks.js";class D{constructor(e=0,t=0,n=0,r=0){this.radius=r,typeof e==`number`?this._center=g(e,t,n):x(e)||S(e)?(this._center=_(e),this.radius=e.length===4?e[3]:t):(this._center=v(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){r(this.center,e)}exactEquals(e){return i(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&(r(this._center,e.center),this.radius=e.radius),this}clone(){return new D(this.center,this.radius)}toVec4(){return b(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return a(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return a(this.center,e.center)<=t*t}intersectRay(e,t){if(e==null||!this._intersect(e,k))return!1;let{t0:n,t1:r}=k;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(t){let{origin:r,direction:i}=e;t[0]=r[0]+i[0]*n,t[1]=r[1]+i[1]*n,t[2]=r[2]+i[2]*n}return!0}intersectLine(e,n){let r=C(e,n);if(!this._intersect(r,k))return[];let{origin:i,direction:a}=r,{t0:o,t1:s}=k,c=e=>{let t=y();return h(t,i,a,e),this.projectPoint(t,t)};return Math.abs(o-s)<t()?[c(o)]:[c(o),c(s)]}_intersect(e,t){let{origin:n,direction:r}=e,i=A;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(a===0)return!1;let o=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2,c=o*o-4*a*s;if(c<0)return!1;let l=Math.sqrt(c);return t.t0=(-o-l)/(2*a),t.t1=(-o+l)/(2*a),!0}projectPoint(e,t){let n=o(T.get(),e,this.center),r=s(T.get(),n,this.radius/c(n));return l(t,r,this.center)}closestPointOnSilhouette(e,t){let r=T.get(),i=E.get();u(r,e.origin,e.direction),u(t,r,e.origin),s(t,t,1/c(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=w(e.origin,t);return n(i,o+a,r),d(t,t,i),t}distanceToSilhouette(e){let t=o(T.get(),e,this.center),n=f(t),r=this.radius**2;return Math.sqrt(Math.abs(n-r))}frustumCoverage(e,t,n){let r=this.radius,i=r*r,a=e+.5*Math.PI,o=t*t+i-Math.cos(a)*2*t*r,s=Math.sqrt(o),c=o-i;if(c<=0)return .5;let l=Math.acos(Math.sqrt(c)/s)-Math.asin(r/(s/Math.sin(a)));return Math.min(1,(l+.5*n)/n)}_angleToSilhouette(t){let n=o(T.get(),t,this.center),r=c(n),i=this.radius,a=i+Math.abs(i-r);return e(i/a)}union(e){let t=p(this._center,e.center),n=this.radius,r=e.radius;return t+r<n?this:t+n<r?(this.copyFrom(e),this):(m(this._center,this._center,e.center,(t+r-n)/(2*t)),this.radius=(t+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:n}=this,r=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}const O=new D,k={t0:0,t1:0},A=y();export{O as NullSphere,D as Sphere};
package/interfaces.d.ts CHANGED
@@ -2297,9 +2297,6 @@ declare namespace __esri {
2297
2297
  export type Mesh = import("./geometry/Mesh.js").default;
2298
2298
  export const Mesh: typeof import("./geometry/Mesh.js").default;
2299
2299
 
2300
- /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2301
- export type MeshCreateFromPolygonParameters = import("./geometry/Mesh.js").CreateFromPolygonParameters;
2302
-
2303
2300
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2304
2301
  export type MultipointProperties = import("./geometry/Multipoint.js").MultipointProperties;
2305
2302
 
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.30`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
2
+ import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.32`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return typeof e==`object`&&e||(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return typeof e==`object`&&e||(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e),this.associatedLayer&&(this.associatedLayer.timeInfo=e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load(),this._isOverridden(`timeInfo`)&&(this.associatedLayer.timeInfo=this.timeInfo)}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};