@arcgis/core 4.25.0-next.20220718 → 4.25.0-next.20220721

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 (284) hide show
  1. package/Camera.js +1 -1
  2. package/analysis/DimensioningAnalysis.js +1 -1
  3. package/analysis/LineOfSightAnalysis.js +1 -1
  4. package/analysis/SliceAnalysis.js +1 -1
  5. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  6. package/arcade/functions/featuresetgeom.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/1751de504354d98ac3fd.js +1 -0
  9. package/assets/esri/core/workers/chunks/1f4f1896880bfa6801c5.js +1 -0
  10. package/assets/esri/core/workers/chunks/290cd411d0d18b1d0efd.js +1 -0
  11. package/assets/esri/core/workers/chunks/{ab3bd5fecdb97f2d690e.js → 3b5be512567d9c1c6fe6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c3236a7058e64ea3b939.js → 3c9da9b88777700879aa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f96e8724ae3458f5e262.js → 4a7aa1b9de61eb013647.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4cb64ccb5fba126f9a66.js +1 -0
  15. package/assets/esri/core/workers/chunks/{68f19e58aae01791944e.js → 579ba109718bc2554008.js} +1 -1
  16. package/assets/esri/core/workers/chunks/59845b02b07a8ed7ce81.js +1 -0
  17. package/assets/esri/core/workers/chunks/{c705f907ce60a646d9aa.js → 652d36523efbe5c9ebb2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/888d8e4471c9a2cd5009.js +1 -0
  19. package/assets/esri/core/workers/chunks/9493a8e5d6001b6bf275.js +1 -0
  20. package/assets/esri/core/workers/chunks/9d824cdfbcdf3cb3246f.js +1 -0
  21. package/assets/esri/core/workers/chunks/bf348f6f52701fa6016e.js +987 -0
  22. package/assets/esri/core/workers/chunks/d02881954c0cc0d39dfb.js +1 -0
  23. package/assets/esri/core/workers/chunks/{1ecbf642debc2207b762.js → da54483123f377e9b3e1.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{61b71b8e028eda10ccab.js → e4ad2cf5d6bded02e392.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3bfab05ae07ac18a75fe.js → f298a70f3b6f27675d53.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{d499cce61c1c5c367380.js → f40290cfad3fe6fb4ef9.js} +1 -1
  27. package/assets/esri/layers/support/rasterFormats/lerc-wasm.wasm +0 -0
  28. package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
  29. package/assets/esri/themes/dark/main.css +1 -1
  30. package/assets/esri/themes/light/main.css +1 -1
  31. package/assets/esri/themes/light/view.css +1 -1
  32. package/chunks/ComponentShader.glsl.js +39 -33
  33. package/chunks/Laserlines.glsl.js +4 -4
  34. package/chunks/Precipitation.glsl.js +2 -2
  35. package/chunks/RibbonLine.glsl.js +46 -44
  36. package/chunks/Stars.glsl.js +2 -2
  37. package/chunks/Terrain.glsl.js +25 -17
  38. package/chunks/boundedPlane.js +1 -1
  39. package/chunks/lerc-wasm.js +1 -1
  40. package/chunks/mat2d.js +1 -1
  41. package/chunks/quatf32.js +1 -1
  42. package/core/BidiEngine.js +1 -1
  43. package/core/accessorSupport/watch.js +1 -1
  44. package/core/libs/gl-matrix-2/factories/quatf32.js +1 -1
  45. package/core/libs/gl-matrix-2/math/mat2d.js +1 -1
  46. package/core/perspectiveUtils.js +1 -1
  47. package/core/promiseUtils.js +1 -1
  48. package/core/reactiveUtils.js +1 -1
  49. package/core/unitUtils.js +1 -1
  50. package/geometry/projection.js +1 -1
  51. package/geometry/projectionEllipsoid.js +1 -1
  52. package/geometry/support/MeshTexture.js +1 -1
  53. package/geometry/support/axisAngleDegrees.js +1 -1
  54. package/geometry/support/coordinateSystem.js +1 -1
  55. package/geometry/support/geodesicUtils.js +1 -1
  56. package/geometry/support/meshUtils/exporters/gltf/index.js +1 -1
  57. package/geometry/support/meshUtils/loadExternal.js +1 -1
  58. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  59. package/geometry/support/scaleUtils.js +1 -1
  60. package/geometry/support/spatialReferenceUtils.js +1 -1
  61. package/identity/IdentityManagerBase.js +1 -1
  62. package/identity/IdentityModal.js +1 -1
  63. package/interfaces.d.ts +3 -33
  64. package/layers/FeatureLayer.js +1 -1
  65. package/layers/effects/parser.js +1 -1
  66. package/layers/graphics/hydratedFeatures.js +1 -1
  67. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  68. package/layers/mixins/ArcGISImageService.js +1 -1
  69. package/layers/ogc/wfsUtils.js +1 -1
  70. package/layers/support/ContingentValue.js +1 -1
  71. package/layers/support/ElevationQuery.js +1 -1
  72. package/layers/support/PixelBlock.js +1 -1
  73. package/layers/support/kmlUtils.js +1 -1
  74. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  75. package/layers/support/rasterDatasets/EphemeralBlockCache.js +1 -1
  76. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  77. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  78. package/layers/support/rasterFormats/ImageCanvasDecoder.js +1 -1
  79. package/layers/support/rasterFormats/JpgPlus.js +1 -1
  80. package/layers/support/rasterFormats/Lerc.js +1 -1
  81. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  82. package/layers/support/rasterFormats/Raw.js +1 -1
  83. package/layers/support/rasterFormats/TiffTags.js +1 -1
  84. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  85. package/layers/support/vectorTileLayerLoader.js +1 -1
  86. package/layers/support/wmtsUtils.js +1 -1
  87. package/package.json +1 -1
  88. package/renderers/RasterShadedReliefRenderer.js +1 -1
  89. package/renderers/RasterStretchRenderer.js +1 -1
  90. package/renderers/UniqueValueRenderer.js +1 -1
  91. package/renderers/support/AuthoringInfo.js +1 -1
  92. package/renderers/support/RasterSymbolizer.js +1 -1
  93. package/rest/query/operations/query.js +1 -1
  94. package/rest/query/operations/queryTopFeatures.js +1 -1
  95. package/rest/support/DirectionsFeatureSet.js +1 -1
  96. package/rest/support/ImageHistogramParameters.js +1 -1
  97. package/rest/support/ImageSampleParameters.js +1 -1
  98. package/smartMapping/labels/clusters.js +1 -1
  99. package/smartMapping/renderers/relationship.js +1 -1
  100. package/smartMapping/support/adapters/support/utils.js +1 -1
  101. package/support/basemapUtils.js +1 -1
  102. package/support/revision.js +1 -1
  103. package/symbols/LabelSymbol3D.js +1 -1
  104. package/symbols/PointSymbol3D.js +1 -1
  105. package/symbols/cim/CIMCursor.js +1 -1
  106. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  107. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  108. package/symbols/support/previewSymbol3D.js +1 -1
  109. package/symbols/support/webStyleSymbolUtils.js +1 -1
  110. package/views/2d/ViewState.js +1 -1
  111. package/views/2d/engine/vectorTiles/Feature.js +1 -1
  112. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  113. package/views/2d/engine/webgl/SDFConverter.js +1 -1
  114. package/views/2d/engine/webgl/TurboLine.js +1 -1
  115. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  116. package/views/2d/engine/webgl/brushes/BrushOverlay.js +1 -1
  117. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
  118. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
  119. package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
  120. package/views/2d/engine/webgl/collisions/MetricReader.js +1 -1
  121. package/views/2d/engine/webgl/cpuMapped/DisplayRecordReader.js +1 -1
  122. package/views/2d/engine/webgl/cpuMapped/FreeList.js +1 -1
  123. package/views/2d/engine/webgl/mesh/heuristics.js +1 -1
  124. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  125. package/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate.js +1 -1
  126. package/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate.js +1 -1
  127. package/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate.js +1 -1
  128. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  129. package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
  130. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  131. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/input/MapViewInputManager.js +1 -1
  134. package/views/2d/layers/features/createSymbolSchema.js +1 -1
  135. package/views/2d/viewpointUtils.js +1 -1
  136. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  137. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  138. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  139. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  140. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  141. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  142. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  143. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  144. package/views/3d/camera/constraintUtils/distance.js +1 -1
  145. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
  146. package/views/3d/environment/CloudsComposition.js +1 -1
  147. package/views/3d/environment/FogTechnique.js +1 -1
  148. package/views/3d/glTF/internal/Resource.js +1 -1
  149. package/views/3d/input/SceneInputManager.js +1 -1
  150. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  151. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  152. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  153. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  154. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  155. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  156. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  157. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  158. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  160. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  161. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/lineUtils.js +1 -1
  168. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  169. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  170. package/views/3d/layers/i3s/IDBCache.js +1 -1
  171. package/views/3d/layers/i3s/IDBMockCache.js +1 -1
  172. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  173. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  174. package/views/3d/state/ViewState.js +1 -1
  175. package/views/3d/support/cameraUtils.js +1 -1
  176. package/views/3d/support/orientedBoundingBox.js +1 -1
  177. package/views/3d/support/viewpointUtils.js +1 -1
  178. package/views/3d/terrain/Overlay.js +1 -1
  179. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  180. package/views/3d/terrain/OverlayRenderer.js +1 -1
  181. package/views/3d/terrain/TerrainRenderer.js +1 -1
  182. package/views/3d/terrain/TerrainSurface.js +1 -1
  183. package/views/3d/terrain/TilingSchemeLogic.js +1 -1
  184. package/views/3d/terrain/interfaces.js +1 -1
  185. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  186. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  187. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  189. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  190. package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
  191. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  192. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  193. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  194. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  195. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
  196. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +9 -0
  197. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +18 -17
  198. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  199. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  200. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  201. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +5 -0
  202. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  203. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  204. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  205. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  206. package/views/3d/webgl-engine/lib/TextureTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  208. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  209. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  210. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  211. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  212. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  213. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  214. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  215. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  216. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  217. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  218. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  219. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  220. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  221. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  222. package/views/3d/webgl-engine/shaders/LaserlinePathTechniqueConfiguration.js +1 -1
  223. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  224. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  225. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  226. package/views/DOMContainer.js +1 -1
  227. package/views/MapView.js +1 -1
  228. package/views/SceneView.js +1 -1
  229. package/views/View.js +1 -1
  230. package/views/analysis/analysisViewUtils.js +1 -1
  231. package/views/animation/pointToPoint/apex/planning.js +1 -1
  232. package/views/draw/PolygonDrawAction.js +1 -1
  233. package/views/draw/PolylineDrawAction.js +1 -1
  234. package/views/draw/support/createUtils.js +1 -1
  235. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  236. package/views/input/InputManager.js +1 -1
  237. package/views/input/handlers/LatestPointer.js +1 -1
  238. package/views/input/handlers/MultiTouch.js +5 -0
  239. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  240. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  241. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
  242. package/views/interactive/tooltip/Tooltip.js +1 -1
  243. package/views/interactive/tooltip/support/measurements.js +1 -1
  244. package/views/layers/GroupLayerView.js +1 -1
  245. package/views/navigation/FilteredFiniteDifference.js +1 -1
  246. package/views/navigation/MomentumEstimator.js +1 -1
  247. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  248. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  249. package/views/navigation/RotationMomentumEstimator.js +1 -1
  250. package/views/support/GroundViewElevationSampler.js +1 -1
  251. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  252. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  253. package/views/support/screenshotUtils.js +1 -1
  254. package/views/webgl/BufferObject.js +1 -1
  255. package/views/webgl/FramebufferObject.js +1 -1
  256. package/views/webgl/Texture.js +1 -1
  257. package/views/webgl/capabilities/Capabilities.js +1 -1
  258. package/views/webgl/capabilities.js +1 -1
  259. package/views/webgl/renderState.js +1 -1
  260. package/webscene/spec-certification/api.js +1 -1
  261. package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
  262. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  263. package/widgets/ElevationProfile/ElevationProfileLineInput.js +1 -1
  264. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  265. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  266. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  267. package/widgets/Expand.js +1 -1
  268. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  269. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  270. package/widgets/Popup/PopupViewModel.js +1 -1
  271. package/widgets/Popup/actionUtils.js +1 -1
  272. package/widgets/ScaleRangeSlider.js +1 -1
  273. package/widgets/Slider/SliderViewModel.js +1 -1
  274. package/widgets/Widget.js +1 -1
  275. package/assets/esri/core/workers/chunks/04ea469cb081e181ca82.js +0 -1
  276. package/assets/esri/core/workers/chunks/16c2626ca47132700519.js +0 -1
  277. package/assets/esri/core/workers/chunks/1e4e5d147263e98536bc.js +0 -1
  278. package/assets/esri/core/workers/chunks/35083def3c658d1ae9ff.js +0 -1
  279. package/assets/esri/core/workers/chunks/40032d2bf404a46b8f80.js +0 -1
  280. package/assets/esri/core/workers/chunks/613e82a3e13442685ac4.js +0 -1
  281. package/assets/esri/core/workers/chunks/64b4f1dbf61439cde801.js +0 -1
  282. package/assets/esri/core/workers/chunks/abd68b7ba3be4696611c.js +0 -1
  283. package/assets/esri/core/workers/chunks/b8a062c0c9c626acf61e.js +0 -982
  284. package/assets/esri/core/workers/chunks/e08686088be0aaca1a99.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../../core/maybe.js";import{WGLGeometryType as e}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{TextMaterialKey as r}from"../materialKey/MaterialKey.js";import{DataType as n,PrimitiveType as i}from"../../../../webgl/enums.js";const s=t=>o(t.data,{geometry:[{location:0,name:"a_pos",count:2,type:n.SHORT},{location:1,name:"a_id",count:4,type:n.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:n.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texFontSize",count:4,type:n.UNSIGNED_BYTE},{location:5,name:"a_aux",count:4,type:n.BYTE},{location:6,name:"a_zoomRange",count:2,type:n.UNSIGNED_SHORT},{location:7,name:"a_vertexOffset",count:2,type:n.SHORT},{location:8,name:"a_texCoords",count:2,type:n.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return e.TEXT}supportsSymbology(t){return!0}drawGeometry(e,o,a,m){const{context:l,painter:p,rendererInfo:u,state:y,passOptions:d,requestRender:_}=e,c=r.load(a.materialKey),f=t(d)&&"hittest"===d.type,{bufferLayouts:E,attributes:N}=s(c),S=p.materialManager.getMaterialProgram(e,c,"materials/text",N,m);if(t(_)&&!f&&!S.isCompiled)return void _();l.useProgram(S);let T=i.TRIANGLES;f&&(T=i.POINTS),this._setSharedUniforms(S,e,o),p.textureManager.bindTextures(l,S,c),S.setUniformMatrix3fv("u_displayMat3",y.displayMat3),S.setUniformMatrix3fv("u_displayViewMat3",y.displayViewMat3),this._setSizeVVUniforms(c,S,u,o),this._setColorAndOpacityVVUniforms(c,S,u),this._setRotationVVUniforms(c,S,u),S.setUniform1f("u_isHalo",1);const U=a.target.getVAO(l,E,N),x=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;l.bindVAO(U),l.drawElements(i.TRIANGLES,a.indexCount,n.UNSIGNED_INT,x),S.setUniform1f("u_isHalo",0),l.drawElements(T,a.indexCount,n.UNSIGNED_INT,x)}}export{m as default};
5
+ import{isSome as t}from"../../../../../core/maybe.js";import{WGLGeometryType as e}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import a from"./WGLGeometryBrush.js";import{TextMaterialKey as r}from"../materialKey/MaterialKey.js";import{PrimitiveType as n,DataType as i}from"../../../../webgl/enums.js";const s=t=>o(t.data,{geometry:[{location:0,name:"a_pos",count:2,type:i.SHORT},{location:1,name:"a_id",count:4,type:i.UNSIGNED_BYTE},{location:2,name:"a_color",count:4,type:i.UNSIGNED_BYTE,normalized:!0},{location:3,name:"a_haloColor",count:4,type:i.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_texFontSize",count:4,type:i.UNSIGNED_BYTE},{location:5,name:"a_aux",count:4,type:i.BYTE},{location:6,name:"a_zoomRange",count:2,type:i.UNSIGNED_SHORT},{location:7,name:"a_vertexOffset",count:2,type:i.SHORT},{location:8,name:"a_texCoords",count:2,type:i.UNSIGNED_SHORT}]});class m extends a{dispose(){}getGeometryType(){return e.TEXT}supportsSymbology(t){return!0}drawGeometry(e,o,a,m){const{context:l,painter:p,rendererInfo:u,state:y,passOptions:d,requestRender:_}=e,c=r.load(a.materialKey),f=t(d)&&"hittest"===d.type,{bufferLayouts:E,attributes:N}=s(c),S=p.materialManager.getMaterialProgram(e,c,"materials/text",N,m);if(t(_)&&!f&&!S.isCompiled)return void _();l.useProgram(S);let T=n.TRIANGLES;f&&(T=n.POINTS),this._setSharedUniforms(S,e,o),p.textureManager.bindTextures(l,S,c),S.setUniformMatrix3fv("u_displayMat3",y.displayMat3),S.setUniformMatrix3fv("u_displayViewMat3",y.displayViewMat3),this._setSizeVVUniforms(c,S,u,o),this._setColorAndOpacityVVUniforms(c,S,u),this._setRotationVVUniforms(c,S,u),S.setUniform1f("u_isHalo",1);const U=a.target.getVAO(l,E,N),x=a.indexFrom*Uint32Array.BYTES_PER_ELEMENT;l.bindVAO(U),l.drawElements(n.TRIANGLES,a.indexCount,i.UNSIGNED_INT,x),S.setUniform1f("u_isHalo",0),l.drawElements(T,a.indexCount,i.UNSIGNED_INT,x)}}export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t,isNone as s}from"../../../../../core/maybe.js";const e=6,r=4294967296;class o{constructor(t){this._head=t,this._cursor=t}static from(t){const s=i.from(new Float32Array(t));return new o(s)}get id(){return this._cursor.id}get baseZoom(){return this._cursor.baseZoom}get anchorX(){return this._cursor.anchorX}get anchorY(){return this._cursor.anchorY}get directionX(){return this._cursor.directionX}get directionY(){return this._cursor.directionY}get size(){return this._cursor.size}get materialKey(){return this._cursor.materialKey}get boundsCount(){return this._cursor.boundsCount}computedMinZoom(){return this._cursor.computedMinZoom()}setComputedMinZoom(t){return this._cursor.setComputedMinZoom(t)}boundsComputedAnchorX(t){return this._cursor.boundsComputedAnchorX(t)}boundsComputedAnchorY(t){return this._cursor.boundsComputedAnchorY(t)}setBoundsComputedAnchorX(t,s){return this._cursor.setBoundsComputedAnchorX(t,s)}setBoundsComputedAnchorY(t,s){return this._cursor.setBoundsComputedAnchorY(t,s)}boundsX(t){return this._cursor.boundsX(t)}boundsY(t){return this._cursor.boundsY(t)}boundsWidth(t){return this._cursor.boundsWidth(t)}boundsHeight(t){return this._cursor.boundsHeight(t)}link(s){if(t(s._head))return this._cursor.link(s._head)}getCursor(){return this.copy()}copy(){const t=new o(this._head?.copy());if(!t._head)return t;let s=t._head,e=t._head._link;for(;e;)s._link=e.copy(),s=e,e=s._link;return t}peekId(){return this._cursor.peekId()??this._cursor._link.peekId()}nextId(){const t=this.id;for(;t===this.id;)if(!this.next())return!1;return!0}save(){this._savedCursor=this._cursor,this._savedOffset=this._cursor._offset}restore(){this._cursor=this._savedCursor,this._cursor._offset=this._savedOffset}next(){if(!this._cursor)return!1;if(!this._cursor.next()){if(!this._cursor._link)return!1;this._cursor=this._cursor._link,this._cursor._offset=0}return!0}lookup(t){for(this._cursor=this._head;this._cursor&&!this._cursor.lookup(t);){if(!this._cursor._link)return!1;this._cursor=this._cursor._link}return!!this._cursor}delete(s){let e=this._head,r=null;for(;e;){if(e.delete(s))return e.isEmpty()&&t(r)&&(r._link=e._link),!0;r=e,e=e._link}return!1}}class i{constructor(t){this._offset=-1,this._link=null,this._count=0,this._deletedCount=0,this._offsets={instance:null},this._buffer=t}static from(t){return new i(new Float32Array(t))}isEmpty(){return this._deletedCount===this.count}get count(){return this._count||(this._count=this._computeCount()),this._count}get id(){return this._buffer[this._offset+0]}set id(t){this._buffer[this._offset+0]=t}get baseZoom(){return this._buffer[this._offset+1]}get anchorX(){return this._buffer[this._offset+2]}get anchorY(){return this._buffer[this._offset+3]}get directionX(){return this._buffer[this._offset+4]}get directionY(){return this._buffer[this._offset+5]}get size(){return this._buffer[this._offset+6]}get materialKey(){return this._buffer[this._offset+7]}computedMinZoom(){return this._buffer[this._offset+8]}setComputedMinZoom(t){this._buffer[this._offset+8]=t}get boundsCount(){return this._buffer[this._offset+9]}boundsComputedAnchorX(t){return this._buffer[this._offset+10+t*e+0]}boundsComputedAnchorY(t){return this._buffer[this._offset+10+t*e+1]}setBoundsComputedAnchorX(t,s){this._buffer[this._offset+10+t*e+0]=s}setBoundsComputedAnchorY(t,s){this._buffer[this._offset+10+t*e+1]=s}boundsX(t){return this._buffer[this._offset+10+t*e+2]}boundsY(t){return this._buffer[this._offset+10+t*e+3]}boundsWidth(t){return this._buffer[this._offset+10+t*e+4]}boundsHeight(t){return this._buffer[this._offset+10+t*e+5]}link(t){let s=this;for(;s._link;)s=s._link;s._link=t}getCursor(){return this.copy()}copy(){const t=new i(this._buffer);return t._link=this._link,t._offset=this._offset,t._deletedCount=this._deletedCount,t._offsets=this._offsets,t._count=this._count,t}peekId(){const t=this._offset+10+this.boundsCount*e+0;return t>=this._buffer.length?0:this._buffer[t]}next(){let t=0;for(;this._offset<this._buffer.length&&t++<100&&(-1===this._offset?this._offset=0:this._offset+=10+this.boundsCount*e,this.id===r););return this.id!==r&&this._offset<this._buffer.length}delete(t){const s=this._offset,e=this.lookup(t);if(e)for(this.id=4294967295,++this._deletedCount;this.next()&&this.id===t;)this.id=4294967295,++this._deletedCount;return this._offset=s,e}lookup(t){const e=this._offset;if(s(this._offsets.instance)){this._offsets.instance=new Map;const t=this.copy();t._offset=-1;let s=0;for(;t.next();)t.id!==s&&(this._offsets.instance.set(t.id,t._offset),s=t.id)}return!!this._offsets.instance.has(t)&&(this._offset=this._offsets.instance.get(t),this.id!==r||(this._offset=e,!1))}_computeCount(){const t=this._offset;let s=0;for(this._offset=-1;this.next();)s++;return this._offset=t,s}}export{o as MetricReader,i as MetricReaderNode};
5
+ import{isSome as t,isNone as s}from"../../../../../core/maybe.js";const e=6,r=4294967296;class o{constructor(t){this._savedCursor=null,this._savedOffset=null,this._head=t,this._cursor=t}static from(t){const s=i.from(new Float32Array(t));return new o(s)}get id(){return this._cursor.id}get baseZoom(){return this._cursor.baseZoom}get anchorX(){return this._cursor.anchorX}get anchorY(){return this._cursor.anchorY}get directionX(){return this._cursor.directionX}get directionY(){return this._cursor.directionY}get size(){return this._cursor.size}get materialKey(){return this._cursor.materialKey}get boundsCount(){return this._cursor.boundsCount}computedMinZoom(){return this._cursor.computedMinZoom()}setComputedMinZoom(t){return this._cursor.setComputedMinZoom(t)}boundsComputedAnchorX(t){return this._cursor.boundsComputedAnchorX(t)}boundsComputedAnchorY(t){return this._cursor.boundsComputedAnchorY(t)}setBoundsComputedAnchorX(t,s){return this._cursor.setBoundsComputedAnchorX(t,s)}setBoundsComputedAnchorY(t,s){return this._cursor.setBoundsComputedAnchorY(t,s)}boundsX(t){return this._cursor.boundsX(t)}boundsY(t){return this._cursor.boundsY(t)}boundsWidth(t){return this._cursor.boundsWidth(t)}boundsHeight(t){return this._cursor.boundsHeight(t)}link(s){if(t(s._head))return this._cursor.link(s._head)}getCursor(){return this.copy()}copy(){const t=new o(this._head?.copy());if(!t._head)return t;let s=t._head,e=t._head._link;for(;e;)s._link=e.copy(),s=e,e=s._link;return t}peekId(){return this._cursor.peekId()??this._cursor._link.peekId()}nextId(){const t=this.id;for(;t===this.id;)if(!this.next())return!1;return!0}save(){this._savedCursor=this._cursor,this._savedOffset=this._cursor._offset}restore(){this._savedCursor&&(this._cursor=this._savedCursor),null!=this._savedOffset&&(this._cursor._offset=this._savedOffset)}next(){if(!this._cursor)return!1;if(!this._cursor.next()){if(!this._cursor._link)return!1;this._cursor=this._cursor._link,this._cursor._offset=0}return!0}lookup(t){for(this._cursor=this._head;this._cursor&&!this._cursor.lookup(t);){if(!this._cursor._link)return!1;this._cursor=this._cursor._link}return!!this._cursor}delete(s){let e=this._head,r=null;for(;e;){if(e.delete(s))return e.isEmpty()&&t(r)&&(r._link=e._link),!0;r=e,e=e._link}return!1}}class i{constructor(t){this._offset=-1,this._link=null,this._count=0,this._deletedCount=0,this._offsets={instance:null},this._buffer=t}static from(t){return new i(new Float32Array(t))}isEmpty(){return this._deletedCount===this.count}get count(){return this._count||(this._count=this._computeCount()),this._count}get id(){return this._buffer[this._offset+0]}set id(t){this._buffer[this._offset+0]=t}get baseZoom(){return this._buffer[this._offset+1]}get anchorX(){return this._buffer[this._offset+2]}get anchorY(){return this._buffer[this._offset+3]}get directionX(){return this._buffer[this._offset+4]}get directionY(){return this._buffer[this._offset+5]}get size(){return this._buffer[this._offset+6]}get materialKey(){return this._buffer[this._offset+7]}computedMinZoom(){return this._buffer[this._offset+8]}setComputedMinZoom(t){this._buffer[this._offset+8]=t}get boundsCount(){return this._buffer[this._offset+9]}boundsComputedAnchorX(t){return this._buffer[this._offset+10+t*e+0]}boundsComputedAnchorY(t){return this._buffer[this._offset+10+t*e+1]}setBoundsComputedAnchorX(t,s){this._buffer[this._offset+10+t*e+0]=s}setBoundsComputedAnchorY(t,s){this._buffer[this._offset+10+t*e+1]=s}boundsX(t){return this._buffer[this._offset+10+t*e+2]}boundsY(t){return this._buffer[this._offset+10+t*e+3]}boundsWidth(t){return this._buffer[this._offset+10+t*e+4]}boundsHeight(t){return this._buffer[this._offset+10+t*e+5]}link(t){let s=this;for(;s._link;)s=s._link;s._link=t}getCursor(){return this.copy()}copy(){const t=new i(this._buffer);return t._link=this._link,t._offset=this._offset,t._deletedCount=this._deletedCount,t._offsets=this._offsets,t._count=this._count,t}peekId(){const t=this._offset+10+this.boundsCount*e+0;return t>=this._buffer.length?0:this._buffer[t]}next(){let t=0;for(;this._offset<this._buffer.length&&t++<100&&(-1===this._offset?this._offset=0:this._offset+=10+this.boundsCount*e,this.id===r););return this.id!==r&&this._offset<this._buffer.length}delete(t){const s=this._offset,e=this.lookup(t);if(e)for(this.id=4294967295,++this._deletedCount;this.next()&&this.id===t;)this.id=4294967295,++this._deletedCount;return this._offset=s,e}lookup(t){const e=this._offset;if(s(this._offsets.instance)){this._offsets.instance=new Map;const t=this.copy();t._offset=-1;let s=0;for(;t.next();)t.id!==s&&(this._offsets.instance.set(t.id,t._offset),s=t.id)}return!!this._offsets.instance.has(t)&&(this._offset=this._offsets.instance.get(t),this.id!==r||(this._offset=e,!1))}_computeCount(){const t=this._offset;let s=0;for(this._offset=-1;this.next();)s++;return this._offset=t,s}}export{o as MetricReader,i as MetricReaderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t,isNone as e}from"../../../../../core/maybe.js";import{DISPLAY_RECORD_INT_PER_ELEMENT as s}from"../definitions.js";const r=2147483647;class i{constructor(t){this._head=t,this._cursor=t}static from(t,e=0,s=t.byteLength/_.BYTES_PER_RECORD-e){const r=new _(new Int32Array(t,e*_.BYTES_PER_RECORD,s*_.ELEMENTS_PER_RECORD));return new i(r)}size(){let t=this._cursor,e=0;for(;t;)e+=t.size(),t=t._link;return e}get id(){return this._cursor.id}set id(t){this._cursor.id=t}get materialKey(){return this._cursor.materialKey}set materialKey(t){this._cursor.materialKey=t}get insertAfter(){return this._cursor.insertAfter}get indexFrom(){return this._cursor.indexFrom}set indexFrom(t){this._cursor.indexFrom=t}get indexCount(){return this._cursor.indexCount}set indexCount(t){this._cursor.indexCount=t}get vertexFrom(){return this._cursor.vertexFrom}set vertexFrom(t){this._cursor.vertexFrom=t}get vertexCount(){return this._cursor.vertexCount}set vertexCount(t){this._cursor.vertexCount=t}get sortKey(){return this._cursor.sortKey}set sortKey(t){this._cursor.sortKey=t}get index(){return this._cursor._indexStart+this._cursor._index}seekIndex(t){let e=t;for(this._cursor=this._head;this._cursor;){const t=this._cursor.size();if(e<t)return this._cursor._index=e,!0;e-=t,this._cursor=this._cursor._link}return!1}forEach(t){const e=this.getCursor();for(;e.next();)t(e)}link(t){if(!this._head)return void(this._head=t._head);let e=this._head;for(;e._link;)e=e._link;e._link=t._head,e._link._indexStart=e._indexStart+e.size()}getCursor(){return this.copy()}lookup(t){for(this._cursor=this._head;this._cursor&&!this._cursor.lookup(t);){if(!this._cursor._link)return!1;this._cursor=this._cursor._link}return!!this._cursor}copy(){const t=new i(this._head?.copy());if(!t._head)return t;let e=t._head,s=t._head._link;for(;s;)e._link=s.copy(),e=s,s=e._link;return t}next(){return!!this._cursor&&(!!this._cursor.next()||!!this._cursor._link&&(this._cursor=this._cursor._link,this.next()))}peekId(){return this._cursor.peekId()??this._cursor._link.peekId()}delete(e){let s=this._head,r=null;for(;s;){if(s.delete(e))return s.isEmpty()&&(t(r)&&(r._link=s._link),s===this._head&&(this._head=s._link),s===this._cursor&&(this._cursor=s._link)),!0;r=s,s=s._link}return!1}}i.ELEMENTS_PER_RECORD=s,i.BYTES_PER_RECORD=i.ELEMENTS_PER_RECORD*Int32Array.BYTES_PER_ELEMENT;class _{constructor(t){this._link=null,this._index=-1,this._indexStart=0,this._deletedCount=0,this._offsets={instance:null},this._packedRecords=t}static from(t,e=0,s=t.byteLength/this.BYTES_PER_RECORD-e){return new _(new Int32Array(t,e*this.BYTES_PER_RECORD,s*this.ELEMENTS_PER_RECORD))}delete(t){const e=this._index,s=this.lookup(t);if(s)for(this.id=r,++this._deletedCount;this.next()&&this.id===t;)this.id=r,++this._deletedCount;return this._index=e,s}isEmpty(){return this._deletedCount===this.size()}link(t){this._link?this._link.link(t):this._link=t}lookup(t){if(e(this._offsets.instance)){this._offsets.instance=new Map;const t=this.copy();t._index=-1;let e=0;for(;t.next();)t.id!==e&&(this._offsets.instance.set(t.id,t._index),e=t.id)}if(!this._offsets.instance.has(t))return!1;const s=this._index;return this._index=this._offsets.instance.get(t),this.id!==r||(this._index=s,!1)}get id(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD]}set id(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD]=t}get materialKey(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+1]}set materialKey(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+1]=t}get insertAfter(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+2]}get indexFrom(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+3]}set indexFrom(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+3]=t}get indexCount(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+4]}set indexCount(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+4]=t}get vertexFrom(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+5]}set vertexFrom(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+5]=t}get vertexCount(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+6]}set vertexCount(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+6]=t}get sortKey(){return this._packedRecordsF32||(this._packedRecordsF32=new Float32Array(this._packedRecords.buffer)),this._packedRecordsF32[this._index*_.ELEMENTS_PER_RECORD+7]}set sortKey(t){this._packedRecordsF32||(this._packedRecordsF32=new Float32Array(this._packedRecords.buffer)),this._packedRecordsF32[this._index*_.ELEMENTS_PER_RECORD+7]=t}get index(){return this._index}size(){return this._packedRecords.length/_.ELEMENTS_PER_RECORD}next(){for(;++this._index<this.size()&&this.id===r;);return this._index<this.size()}peekId(){const t=(this._index+1)*_.ELEMENTS_PER_RECORD;return t>=this._packedRecords.length?0:this._packedRecords[t]}getCursor(){return this.copy()}copy(){const t=new _(this._packedRecords);return t._indexStart=this._indexStart,t._link=this._link,t._index=this._index,t._offsets=this._offsets,t._deletedCount=this._deletedCount,t}}_.ELEMENTS_PER_RECORD=s,_.BYTES_PER_RECORD=_.ELEMENTS_PER_RECORD*Int32Array.BYTES_PER_ELEMENT;export{i as DisplayRecordReader};
5
+ import{isSome as t,isNone as e}from"../../../../../core/maybe.js";import{DISPLAY_RECORD_INT_PER_ELEMENT as s}from"../definitions.js";const r=2147483647;class i{constructor(t){this._head=t,this._cursor=t}static from(t,e=0,s=t.byteLength/_.BYTES_PER_RECORD-e){const r=new _(new Int32Array(t,e*_.BYTES_PER_RECORD,s*_.ELEMENTS_PER_RECORD));return new i(r)}size(){let t=this._cursor,e=0;for(;t;)e+=t.size(),t=t._link;return e}get id(){return this._cursor.id}set id(t){this._cursor.id=t}get materialKey(){return this._cursor.materialKey}set materialKey(t){this._cursor.materialKey=t}get insertAfter(){return this._cursor.insertAfter}get indexFrom(){return this._cursor.indexFrom}set indexFrom(t){this._cursor.indexFrom=t}get indexCount(){return this._cursor.indexCount}set indexCount(t){this._cursor.indexCount=t}get vertexFrom(){return this._cursor.vertexFrom}set vertexFrom(t){this._cursor.vertexFrom=t}get vertexCount(){return this._cursor.vertexCount}set vertexCount(t){this._cursor.vertexCount=t}get sortKey(){return this._cursor.sortKey}set sortKey(t){this._cursor.sortKey=t}get index(){return this._cursor._indexStart+this._cursor._index}seekIndex(t){let e=t;for(this._cursor=this._head;this._cursor;){const t=this._cursor.size();if(e<t)return this._cursor._index=e,!0;e-=t,this._cursor=this._cursor._link}return!1}forEach(t){const e=this.getCursor();for(;e.next();)t(e)}link(t){if(!this._head)return void(this._head=t._head);let e=this._head;for(;e._link;)e=e._link;e._link=t._head,e._link._indexStart=e._indexStart+e.size()}getCursor(){return this.copy()}lookup(t){for(this._cursor=this._head;this._cursor&&!this._cursor.lookup(t);){if(!this._cursor._link)return!1;this._cursor=this._cursor._link}return!!this._cursor}copy(){const t=new i(this._head?.copy());if(!t._head)return t;let e=t._head,s=t._head._link;for(;s;)e._link=s.copy(),e=s,s=e._link;return t}next(){return!!this._cursor&&(!!this._cursor.next()||!!this._cursor._link&&(this._cursor=this._cursor._link,this.next()))}peekId(){return this._cursor.peekId()??this._cursor._link.peekId()}delete(e){let s=this._head,r=null;for(;s;){if(s.delete(e))return s.isEmpty()&&(t(r)&&(r._link=s._link),s===this._head&&(this._head=s._link),s===this._cursor&&(this._cursor=s._link)),!0;r=s,s=s._link}return!1}}i.ELEMENTS_PER_RECORD=s,i.BYTES_PER_RECORD=i.ELEMENTS_PER_RECORD*Int32Array.BYTES_PER_ELEMENT;class _{constructor(t){this._link=null,this._index=-1,this._indexStart=0,this._packedRecordsF32=null,this._deletedCount=0,this._offsets={instance:null},this._packedRecords=t}static from(t,e=0,s=t.byteLength/this.BYTES_PER_RECORD-e){return new _(new Int32Array(t,e*this.BYTES_PER_RECORD,s*this.ELEMENTS_PER_RECORD))}delete(t){const e=this._index,s=this.lookup(t);if(s)for(this.id=r,++this._deletedCount;this.next()&&this.id===t;)this.id=r,++this._deletedCount;return this._index=e,s}isEmpty(){return this._deletedCount===this.size()}link(t){this._link?this._link.link(t):this._link=t}lookup(t){if(e(this._offsets.instance)){this._offsets.instance=new Map;const t=this.copy();t._index=-1;let e=0;for(;t.next();)t.id!==e&&(this._offsets.instance.set(t.id,t._index),e=t.id)}if(!this._offsets.instance.has(t))return!1;const s=this._index;return this._index=this._offsets.instance.get(t),this.id!==r||(this._index=s,!1)}get id(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD]}set id(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD]=t}get materialKey(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+1]}set materialKey(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+1]=t}get insertAfter(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+2]}get indexFrom(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+3]}set indexFrom(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+3]=t}get indexCount(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+4]}set indexCount(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+4]=t}get vertexFrom(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+5]}set vertexFrom(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+5]=t}get vertexCount(){return this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+6]}set vertexCount(t){this._packedRecords[this._index*_.ELEMENTS_PER_RECORD+6]=t}get sortKey(){return this._packedRecordsF32||(this._packedRecordsF32=new Float32Array(this._packedRecords.buffer)),this._packedRecordsF32[this._index*_.ELEMENTS_PER_RECORD+7]}set sortKey(t){this._packedRecordsF32||(this._packedRecordsF32=new Float32Array(this._packedRecords.buffer)),this._packedRecordsF32[this._index*_.ELEMENTS_PER_RECORD+7]=t}get index(){return this._index}size(){return this._packedRecords.length/_.ELEMENTS_PER_RECORD}next(){for(;++this._index<this.size()&&this.id===r;);return this._index<this.size()}peekId(){const t=(this._index+1)*_.ELEMENTS_PER_RECORD;return t>=this._packedRecords.length?0:this._packedRecords[t]}getCursor(){return this.copy()}copy(){const t=new _(this._packedRecords);return t._indexStart=this._indexStart,t._link=this._link,t._index=this._index,t._offsets=this._offsets,t._deletedCount=this._deletedCount,t}}_.ELEMENTS_PER_RECORD=s,_.BYTES_PER_RECORD=_.ELEMENTS_PER_RECORD*Int32Array.BYTES_PER_ELEMENT;export{i as DisplayRecordReader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as t}from"../../../../../core/maybe.js";class a{constructor(t){if(!Array.isArray(t))return void(this.data=t);this.data=t[0];let e=this;for(let n=1;n<t.length;n++)e.next=new a([t[n]]),e=e.next}*values(){let t=this;for(;t;)yield t.data,t=t.next}forEach(t){let a=this;for(;a;)t(a.data),a=a.next}find(t){return t(this.data)?this:this.next?.find(t)}max(t,a=this){const e=t(this.data)>t(a.data)?this:a;return this.next?this.next.max(t,e):e}remove(t,a=null){return this===t?a?(a.next=this.next,a):this.next:this.next.remove(t,this)}get last(){return this.next?this.next.last:this}}class e{constructor(e){this._head=null,t(e)||(this._head=new a(e))}get head(){return this._head}maxAvailableSpace(){if(t(this._head))return 0;const a=this._head.max((t=>t.end-t.start));return a.data.end-a.data.start}firstFit(a){if(t(this._head))return null;let e=null,n=this._head;for(;n;){const t=n.data.end-n.data.start;if(t===a)return e?e.next=n.next:this._head=n.next,n.data.start;if(t>a){const t=n.data.start;return n.data.start+=a,t}e=n,n=n.next}return null}free(e,n){const r=e+n;if(t(this._head)){const t=new a({start:e,end:r});return void(this._head=t)}if(r<=this._head.data.start){if(r===this._head.data.start)return void(this._head.data.start-=n);const t=new a({start:e,end:r});return t.next=this._head,void(this._head=t)}let s=this._head,d=s.next;for(;d;){if(d.data.start>=r){if(s.data.end===e){if(s.data.end+=n,s.data.end===d.data.start){const t=d.data.end-d.data.start;return s.data.end+=t,void(s.next=d.next)}return}if(d.data.start===r)return void(d.data.start-=n);const t=new a({start:e,end:r});return t.next=s.next,void(s.next=t)}s=d,d=d.next}if(e===s.data.end)return void(s.data.end+=n);const i=new a({start:e,end:r});s.next=i}}export{e as FreeList,a as List};
5
+ import{isNone as t}from"../../../../../core/maybe.js";class a{constructor(t){if(this.next=null,!Array.isArray(t))return void(this.data=t);this.data=t[0];let e=this;for(let n=1;n<t.length;n++)e.next=new a([t[n]]),e=e.next}*values(){let t=this;for(;t;)yield t.data,t=t.next}forEach(t){let a=this;for(;a;)t(a.data),a=a.next}find(t){return t(this.data)?this:this.next?.find(t)}max(t,a=this){const e=t(this.data)>t(a.data)?this:a;return this.next?this.next.max(t,e):e}remove(t,a=null){return this===t?a?(a.next=this.next,a):this.next:this.next?.remove(t,this)??null}get last(){return this.next?this.next.last:this}}class e{constructor(e){this._head=null,t(e)||(this._head=new a(e))}get head(){return this._head}maxAvailableSpace(){if(t(this._head))return 0;const a=this._head.max((t=>t.end-t.start));return a.data.end-a.data.start}firstFit(a){if(t(this._head))return null;let e=null,n=this._head;for(;n;){const t=n.data.end-n.data.start;if(t===a)return e?e.next=n.next:this._head=n.next,n.data.start;if(t>a){const t=n.data.start;return n.data.start+=a,t}e=n,n=n.next}return null}free(e,n){const r=e+n;if(t(this._head)){const t=new a({start:e,end:r});return void(this._head=t)}if(r<=this._head.data.start){if(r===this._head.data.start)return void(this._head.data.start-=n);const t=new a({start:e,end:r});return t.next=this._head,void(this._head=t)}let s=this._head,d=s.next;for(;d;){if(d.data.start>=r){if(s.data.end===e){if(s.data.end+=n,s.data.end===d.data.start){const t=d.data.end-d.data.start;return s.data.end+=t,void(s.next=d.next)}return}if(d.data.start===r)return void(d.data.start-=n);const t=new a({start:e,end:r});return t.next=s.next,void(s.next=t)}s=d,d=d.next}if(e===s.data.end)return void(s.data.end+=n);const i=new a({start:e,end:r});s.next=i}}export{e as FreeList,a as List};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{DISPLAY_RECORD_INT_PER_ELEMENT as e}from"../definitions.js";import{WGLGeometryType as r}from"../enums.js";const i=new Map;function t(e){return i.get(e)}function c(r,t,c){const{indicesPerRecord:s,multiplier:o,verticesPerRecord:d}=i.get(r);return{recordBytes:c*e*Uint32Array.BYTES_PER_ELEMENT,indexBytes:o*s*c*Uint32Array.BYTES_PER_ELEMENT,vertexBytes:o*d*c*t}}i.set(r.MARKER,{multiplier:1,indicesPerRecord:6,verticesPerRecord:4}),i.set(r.LINE,{multiplier:1,indicesPerRecord:24,verticesPerRecord:8}),i.set(r.FILL,{multiplier:1,indicesPerRecord:10,verticesPerRecord:10}),i.set(r.TEXT,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4}),i.set(r.LABEL,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4});export{t as getMeshHeuristic,c as getMeshSizeHint};
5
+ import{DISPLAY_RECORD_INT_PER_ELEMENT as e}from"../definitions.js";import{WGLGeometryType as r}from"../enums.js";const i=new Map;function t(r,t,c){const{indicesPerRecord:s,multiplier:o,verticesPerRecord:d}=i.get(r);return{recordBytes:c*e*Uint32Array.BYTES_PER_ELEMENT,indexBytes:o*s*c*Uint32Array.BYTES_PER_ELEMENT,vertexBytes:o*d*c*t}}i.set(r.MARKER,{multiplier:1,indicesPerRecord:6,verticesPerRecord:4}),i.set(r.LINE,{multiplier:1,indicesPerRecord:24,verticesPerRecord:8}),i.set(r.FILL,{multiplier:1,indicesPerRecord:10,verticesPerRecord:10}),i.set(r.TEXT,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4}),i.set(r.LABEL,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4});export{t as getMeshSizeHint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBA as s}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as i,BITSET_GENERIC_LOCK_COLOR as o,BITSET_FILL_RANDOM_PATTERN_OFFSET as r,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as a,SPRITE_PADDING as l}from"../../definitions.js";import{radToByte as h}from"../../GeometryUtils.js";import{i1616to32 as n,i8888to32 as c}from"../../number.js";import{FillMaterialKey as f}from"../../materialKey/MaterialKey.js";import{isFunction as m,getMinMaxZoom as p}from"./util.js";import _ from"./WGLBaseFillTemplate.js";import y from"./WGLDynamicMeshTemplate.js";import{ok as d}from"../../util/Result.js";class u extends(_(y)){constructor(l,c,p){if(super(l),this._minMaxZoom=n(Math.round(c*i),Math.round(p*i)),m(l.color)){const t=(t,e,i)=>{const o=l.color(t,e,i);return o&&s(o)||0};this._dynamicPropertyMap.set("fillColor",t)}else{const t=l.color;this.fillColor=t&&s(t)||0}const _="CIMMarkerPlacementInsidePolygon"===l.cim.placement?.type&&l.cim.placement.shiftOddRows?2:1,y=l.height;if(m(y)){const t=(t,e,s)=>y(t,e,s)*_;this._dynamicPropertyMap.set("_height",t)}else this._height=(y||0)*_;const d=l.offsetX;if(m(d)){const t=(t,s,i)=>e(d(t,s,i));this._dynamicPropertyMap.set("_offsetX",t)}else this._offsetX=e(d||0);const u=l.offsetY;if(m(u)){const t=(t,s,i)=>e(-u(t,s,i));this._dynamicPropertyMap.set("_offsetY",t)}else this._offsetY=e(-u||0);const M=l.scaleX;m(M)?this._dynamicPropertyMap.set("_scaleX",M):this._scaleX=M||1;const g=l.angle;if(m(g)){const t=(t,e,s)=>h(g(t,e,s));this._dynamicPropertyMap.set("_angle",t)}else this._angle=h(g)||0;if(t(l.effects)){const t=l.effects;m(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._cimFillLayer=l,this._bitset=(l.colorLocked?o:0)|(l.applyRandomOffset?r:0)|(l.sampleAlphaOnly?a:0),this._fillMaterialKey=f.load(l.materialKey)}static fromCIMFill(t,e){const[s,i]=p(t.scaleInfo,e);return new u(t,s,i)}bindFeature(t,s,i){const o=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(o,s,i)}));const r=this._fillMaterialKey,a=this._materialCache,h=(0,this._cimFillLayer.materialHash)(o,s,i),f=a.get(h);let m=null;if(f&&d(f.spriteMosaicItem)&&(m=f.spriteMosaicItem),m){const{rect:t,width:s,height:i}=m,o=t.x+l,a=t.y+l,h=o+s,f=a+i;let p=Math.round(e(this._height));p<=0&&(p=f-a);let _=Math.round(e(this._height/i*s||0));_<=0&&(_=h-o);const y=this._scaleX,d=1;this.tl=n(o,a),this.br=n(h,f),this.aux21=n(_,p),this.aux22=n(this._offsetX,this._offsetY),this.aux3=c(y,d,this._angle,0),r.sdf=m.sdf,r.pattern=!0,r.textureBinding=m.textureBinding}else this.tl=0,this.br=0,this.aux21=0,this.aux22=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}export{u as default};
5
+ import{isSome as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBA as s}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as i,BITSET_FILL_RANDOM_PATTERN_OFFSET as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as r,SPRITE_PADDING as a,MIN_MAX_ZOOM_PRECISION_FACTOR as l}from"../../definitions.js";import{radToByte as h}from"../../GeometryUtils.js";import{i1616to32 as n,i8888to32 as c}from"../../number.js";import{FillMaterialKey as f}from"../../materialKey/MaterialKey.js";import{isFunction as m,getMinMaxZoom as p}from"./util.js";import _ from"./WGLBaseFillTemplate.js";import y from"./WGLDynamicMeshTemplate.js";import{ok as d}from"../../util/Result.js";class u extends(_(y)){constructor(a,c,p){if(super(a),this._minMaxZoom=n(Math.round(c*l),Math.round(p*l)),m(a.color)){const t=(t,e,i)=>{const o=a.color(t,e,i);return o&&s(o)||0};this._dynamicPropertyMap.set("fillColor",t)}else{const t=a.color;this.fillColor=t&&s(t)||0}const _="CIMMarkerPlacementInsidePolygon"===a.cim.placement?.type&&a.cim.placement.shiftOddRows?2:1,y=a.height;if(m(y)){const t=(t,e,s)=>y(t,e,s)*_;this._dynamicPropertyMap.set("_height",t)}else this._height=(y||0)*_;const d=a.offsetX;if(m(d)){const t=(t,s,i)=>e(d(t,s,i));this._dynamicPropertyMap.set("_offsetX",t)}else this._offsetX=e(d||0);const u=a.offsetY;if(m(u)){const t=(t,s,i)=>e(-u(t,s,i));this._dynamicPropertyMap.set("_offsetY",t)}else this._offsetY=e(-u||0);const M=a.scaleX;m(M)?this._dynamicPropertyMap.set("_scaleX",M):this._scaleX=M||1;const g=a.angle;if(m(g)){const t=(t,e,s)=>h(g(t,e,s));this._dynamicPropertyMap.set("_angle",t)}else this._angle=h(g)||0;if(t(a.effects)){const t=a.effects;m(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._cimFillLayer=a,this._bitset=(a.colorLocked?i:0)|(a.applyRandomOffset?o:0)|(a.sampleAlphaOnly?r:0),this._fillMaterialKey=f.load(a.materialKey)}static fromCIMFill(t,e){const[s,i]=p(t.scaleInfo,e);return new u(t,s,i)}bindFeature(t,s,i){const o=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(o,s,i)}));const r=this._fillMaterialKey,l=this._materialCache,h=(0,this._cimFillLayer.materialHash)(o,s,i),f=l.get(h);let m=null;if(f&&d(f.spriteMosaicItem)&&(m=f.spriteMosaicItem),m){const{rect:t,width:s,height:i}=m,o=t.x+a,l=t.y+a,h=o+s,f=l+i;let p=Math.round(e(this._height));p<=0&&(p=f-l);let _=Math.round(e(this._height/i*s||0));_<=0&&(_=h-o);const y=this._scaleX,d=1;this.tl=n(o,l),this.br=n(h,f),this.aux21=n(_,p),this.aux22=n(this._offsetX,this._offsetY),this.aux3=c(y,d,this._angle,0),r.sdf=m.sdf,r.pattern=!0,r.textureBinding=m.textureBinding}else this.tl=0,this.br=0,this.aux21=0,this.aux22=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBA as i}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as s,BITSET_GENERIC_LOCK_COLOR as r,BITSET_LINE_SCALE_DASH as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as a,SPRITE_PADDING as l}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{LineMaterialKey as n}from"../../materialKey/MaterialKey.js";import{isFunction as c,getLimitCosine as m,getMinMaxZoom as p}from"./util.js";import _ from"./WGLBaseLineTemplate.js";import f from"./WGLDynamicMeshTemplate.js";import{ok as d}from"../../util/Result.js";class y extends(_(f)){constructor(l,n,p){super(l),this._minMaxZoom=h(Math.round(n*s),Math.round(p*s)),this._cimLineLayer=l;let _=0;c(l.width)||(_=.5*e(l.width));const f=(t,i,s)=>c(l.width)?.5*e(l.width(t,i,s)):_;this._dynamicPropertyMap.set("_halfWidth",f),c(l.cap)?this._dynamicPropertyMap.set("_capType",l.cap):this._capType=l.cap,c(l.join)?this._dynamicPropertyMap.set("_joinType",l.join):this._joinType=l.join;const d=l.color;if(c(d)){const t=(t,e,s)=>i(d(t,e,s));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=d&&i(d)||0;const y=l.miterLimit;if(c(y)){const t=(t,e,i)=>m(y(t,e,i));this._dynamicPropertyMap.set("_miterLimitCosine",t)}else this._miterLimitCosine=m(y);if(t(l.effects)){const t=l.effects;c(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._scaleFactor=l.scaleFactor||1,this._isDashed=null!=l.dashTemplate;const P=l.colorLocked?r:0,u=l.scaleDash?o:0,j=l.sampleAlphaOnly?a:0;this.tessellationProperties._bitset=P|u|j,this._materialKey=l.materialKey,this._initializeTessellator(!0)}static fromCIMLine(t,e){const[i,s]=p(t.scaleInfo,e);return new y(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)})),this._halfWidth*=this._scaleFactor;const r=this._materialCache,o=(0,this._cimLineLayer.materialHash)(s,e,i),a=r.get(o);let c=null;if(a&&d(a.spriteMosaicItem)&&(c=a.spriteMosaicItem),c){this._hasPattern=!0;const{rect:t,width:e,height:i}=c,s=t.x+l,r=t.y+l,o=s+e,a=r+i;this.tessellationProperties._tl=h(s,r),this.tessellationProperties._br=h(o,a)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties.offset=0,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;const m=n.load(this._materialKey);c&&(m.sdf=c.sdf,m.pattern=!0,m.textureBinding=c.textureBinding),this._materialKey=m.data}}export{y as default};
5
+ import{isSome as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBA as i}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as s,BITSET_LINE_SCALE_DASH as r,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as o,SPRITE_PADDING as a,MIN_MAX_ZOOM_PRECISION_FACTOR as l}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{LineMaterialKey as n}from"../../materialKey/MaterialKey.js";import{isFunction as c,getLimitCosine as m,getMinMaxZoom as p}from"./util.js";import _ from"./WGLBaseLineTemplate.js";import f from"./WGLDynamicMeshTemplate.js";import{ok as d}from"../../util/Result.js";class y extends(_(f)){constructor(a,n,p){super(a),this._minMaxZoom=h(Math.round(n*l),Math.round(p*l)),this._cimLineLayer=a;let _=0;c(a.width)||(_=.5*e(a.width));const f=(t,i,s)=>c(a.width)?.5*e(a.width(t,i,s)):_;this._dynamicPropertyMap.set("_halfWidth",f),c(a.cap)?this._dynamicPropertyMap.set("_capType",a.cap):this._capType=a.cap,c(a.join)?this._dynamicPropertyMap.set("_joinType",a.join):this._joinType=a.join;const d=a.color;if(c(d)){const t=(t,e,s)=>i(d(t,e,s));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=d&&i(d)||0;const y=a.miterLimit;if(c(y)){const t=(t,e,i)=>m(y(t,e,i));this._dynamicPropertyMap.set("_miterLimitCosine",t)}else this._miterLimitCosine=m(y);if(t(a.effects)){const t=a.effects;c(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._scaleFactor=a.scaleFactor||1,this._isDashed=null!=a.dashTemplate;const P=a.colorLocked?s:0,u=a.scaleDash?r:0,j=a.sampleAlphaOnly?o:0;this.tessellationProperties._bitset=P|u|j,this._materialKey=a.materialKey,this._initializeTessellator(!0)}static fromCIMLine(t,e){const[i,s]=p(t.scaleInfo,e);return new y(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)})),this._halfWidth*=this._scaleFactor;const r=this._materialCache,o=(0,this._cimLineLayer.materialHash)(s,e,i),l=r.get(o);let c=null;if(l&&d(l.spriteMosaicItem)&&(c=l.spriteMosaicItem),c){this._hasPattern=!0;const{rect:t,width:e,height:i}=c,s=t.x+a,r=t.y+a,o=s+e,l=r+i;this.tessellationProperties._tl=h(s,r),this.tessellationProperties._br=h(o,l)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties.offset=0,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;const m=n.load(this._materialKey);c&&(m.sdf=c.sdf,m.pattern=!0,m.textureBinding=c.textureBinding),this._materialKey=m.data}}export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{isSome as i,unwrapOr as s}from"../../../../../../core/maybe.js";import{pt2px as r}from"../../../../../../core/screenUtils.js";import{c as o}from"../../../../../../chunks/mat2df32.js";import{c as a}from"../../../../../../chunks/vec2f32.js";import{Alignment as h}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBA as c}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as n,SPRITE_PADDING as m}from"../../definitions.js";import{i1616to32 as l,i8888to32 as f}from"../../number.js";import{MarkerMaterialKey as _}from"../../materialKey/MaterialKey.js";import{isFunction as p,getMinMaxZoom as y}from"./util.js";import d from"./WGLBaseMarkerTemplate.js";import M from"./WGLDynamicMeshTemplate.js";import{ok as u}from"../../util/Result.js";const g=a(),k=o();class P extends(d(M)){constructor(t,e,o){super(t),this._cimMarkerLayer=t,this._minMaxZoom=l(Math.round(e*n),Math.round(o*n));const a=t.color;if(p(a)){const t=(t,e,i)=>c(a(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=c(a);const m=t.outlineColor;if(p(m)){const t=(t,e,i)=>c(m(t,e,i));this._dynamicPropertyMap.set("_outlineColor",t)}else this._outlineColor=c(m);const f=t.size;if(p(f)){const t=(t,e,i)=>r(f(t,e,i));this._dynamicPropertyMap.set("_size",t)}else this._size=r(f)||0;const _=t.scaleX;p(_)?this._dynamicPropertyMap.set("_scaleX",_):this._scaleX=_||1;const y=t.offsetX;if(p(y)){const t=(t,e,i)=>r(y(t,e,i));this._dynamicPropertyMap.set("xOffset",t)}else this.xOffset=r(y)||0;const d=t.offsetY;if(p(d)){const t=(t,e,i)=>r(d(t,e,i));this._dynamicPropertyMap.set("yOffset",t)}else this.yOffset=r(d)||0;const M=t.outlineWidth;if(p(M)){const t=(t,e,i)=>r(M(t,e,i));this._dynamicPropertyMap.set("_outlineWidth",t)}else this._outlineWidth=r(M)||0;const u=t.rotation;if(p(u)?this._dynamicPropertyMap.set("_angle",u):this._angle=u||0,i(t.effects)){const e=t.effects;p(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(i(t.markerPlacement)){const e=t.markerPlacement;p(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._markerPlacement=e}this._scaleFactor=s(t.scaleFactor,1),this._bitSet=(t.alignment===h.MAP?1:0)|(t.colorLocked?1:0)<<1|(t.scaleSymbolsProportionally?1:0)<<3,this._materialKey=t.materialKey}static fromCIMMarker(t,e){const[i,s]=y(t.scaleInfo,e);return new P(t,i,s)}bindFeature(i,s,o){const a=i.readLegacyFeature(),h=i.getObjectId();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(a,s,o)}));const c=this._cimMarkerLayer.materialHash,n="function"==typeof c?c(a,s,o,h):c,p=this._materialCache.get(n);if(!p||!u(p.spriteMosaicItem)||!p.spriteMosaicItem)return void e.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate").error(new t("mapview-cim","Encountered an error when binding feature"));const y=p.spriteMosaicItem,d=this._cimMarkerLayer.sizeRatio,M=y.width/y.height*this._scaleX,P=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle;let L=this._size,x=L*M;const j=this.xOffset,b=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;const O=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/r(this._cimMarkerLayer.frameHeight):1,w=this._outlineWidth*O,z=r(this._cimMarkerLayer.referenceSize);let W=0,C=0;const F=this._cimMarkerLayer.anchorPoint;F&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(W=r(F.x)/(this._size*M),C=r(F.y)/this._size):(W=F.x,C=F.y)),this._anchorX=W,this._anchorY=C,this._sizeOutlineWidth=f(Math.round(Math.min(Math.sqrt(128*x),255)),Math.round(Math.min(Math.sqrt(128*L),255)),Math.round(Math.min(Math.sqrt(128*w),255)),Math.round(Math.min(Math.sqrt(128*z),255))),this.angle=P;const I=Math.round(64*d);this._bitestAndDistRatio=l(this._bitSet,I);const K=y.rect.x+m,X=y.rect.y+m,B=K+y.width,R=X+y.height;this._texUpperLeft=l(K,X),this._texUpperRight=l(B,X),this._texBottomLeft=l(K,R),this._texBottomRight=l(B,R);const S=_.load(this._materialKey);S.sdf=y.sdf,S.pattern=!0,S.textureBinding=y.textureBinding,this._materialKey=S.data,x*=d,L*=d,x*=this._scaleFactor,L*=this._scaleFactor,x*=y.rect.width/y.width,L*=y.rect.height/y.height,this._computedWidth=x,this._computedHeight=L,this._applyTransformation(k,g),this.xOffset=j,this.yOffset=b}}export{P as default};
5
+ import t from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{isSome as i,unwrapOr as s}from"../../../../../../core/maybe.js";import{pt2px as r}from"../../../../../../core/screenUtils.js";import{c as o}from"../../../../../../chunks/mat2df32.js";import{c as a}from"../../../../../../chunks/vec2f32.js";import{Alignment as h}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBA as c}from"../../color.js";import{SPRITE_PADDING as n,MIN_MAX_ZOOM_PRECISION_FACTOR as m}from"../../definitions.js";import{i1616to32 as l,i8888to32 as f}from"../../number.js";import{MarkerMaterialKey as _}from"../../materialKey/MaterialKey.js";import{isFunction as p,getMinMaxZoom as y}from"./util.js";import d from"./WGLBaseMarkerTemplate.js";import M from"./WGLDynamicMeshTemplate.js";import{ok as u}from"../../util/Result.js";const g=a(),k=o();class P extends(d(M)){constructor(t,e,o){super(t),this._cimMarkerLayer=t,this._minMaxZoom=l(Math.round(e*m),Math.round(o*m));const a=t.color;if(p(a)){const t=(t,e,i)=>c(a(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=c(a);const n=t.outlineColor;if(p(n)){const t=(t,e,i)=>c(n(t,e,i));this._dynamicPropertyMap.set("_outlineColor",t)}else this._outlineColor=c(n);const f=t.size;if(p(f)){const t=(t,e,i)=>r(f(t,e,i));this._dynamicPropertyMap.set("_size",t)}else this._size=r(f)||0;const _=t.scaleX;p(_)?this._dynamicPropertyMap.set("_scaleX",_):this._scaleX=_||1;const y=t.offsetX;if(p(y)){const t=(t,e,i)=>r(y(t,e,i));this._dynamicPropertyMap.set("xOffset",t)}else this.xOffset=r(y)||0;const d=t.offsetY;if(p(d)){const t=(t,e,i)=>r(d(t,e,i));this._dynamicPropertyMap.set("yOffset",t)}else this.yOffset=r(d)||0;const M=t.outlineWidth;if(p(M)){const t=(t,e,i)=>r(M(t,e,i));this._dynamicPropertyMap.set("_outlineWidth",t)}else this._outlineWidth=r(M)||0;const u=t.rotation;if(p(u)?this._dynamicPropertyMap.set("_angle",u):this._angle=u||0,i(t.effects)){const e=t.effects;p(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(i(t.markerPlacement)){const e=t.markerPlacement;p(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._markerPlacement=e}this._scaleFactor=s(t.scaleFactor,1),this._bitSet=(t.alignment===h.MAP?1:0)|(t.colorLocked?1:0)<<1|(t.scaleSymbolsProportionally?1:0)<<3,this._materialKey=t.materialKey}static fromCIMMarker(t,e){const[i,s]=y(t.scaleInfo,e);return new P(t,i,s)}bindFeature(i,s,o){const a=i.readLegacyFeature(),h=i.getObjectId();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(a,s,o)}));const c=this._cimMarkerLayer.materialHash,m="function"==typeof c?c(a,s,o,h):c,p=this._materialCache.get(m);if(!p||!u(p.spriteMosaicItem)||!p.spriteMosaicItem)return void e.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate").error(new t("mapview-cim","Encountered an error when binding feature"));const y=p.spriteMosaicItem,d=this._cimMarkerLayer.sizeRatio,M=y.width/y.height*this._scaleX,P=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle;let L=this._size,x=L*M;const j=this.xOffset,b=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;const O=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/r(this._cimMarkerLayer.frameHeight):1,w=this._outlineWidth*O,z=r(this._cimMarkerLayer.referenceSize);let W=0,C=0;const F=this._cimMarkerLayer.anchorPoint;F&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(W=r(F.x)/(this._size*M),C=r(F.y)/this._size):(W=F.x,C=F.y)),this._anchorX=W,this._anchorY=C,this._sizeOutlineWidth=f(Math.round(Math.min(Math.sqrt(128*x),255)),Math.round(Math.min(Math.sqrt(128*L),255)),Math.round(Math.min(Math.sqrt(128*w),255)),Math.round(Math.min(Math.sqrt(128*z),255))),this.angle=P;const I=Math.round(64*d);this._bitestAndDistRatio=l(this._bitSet,I);const K=y.rect.x+n,X=y.rect.y+n,B=K+y.width,R=X+y.height;this._texUpperLeft=l(K,X),this._texUpperRight=l(B,X),this._texBottomLeft=l(K,R),this._texBottomRight=l(B,R);const S=_.load(this._materialKey);S.sdf=y.sdf,S.pattern=!0,S.textureBinding=y.textureBinding,this._materialKey=S.data,x*=d,L*=d,x*=this._scaleFactor,L*=this._scaleFactor,x*=y.rect.width/y.width,L*=y.rect.height/y.height,this._computedWidth=x,this._computedHeight=L,this._applyTransformation(k,g),this.xOffset=j,this.yOffset=b}}export{P as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t,unwrapOr as e}from"../../../../../../core/maybe.js";import{pt2px as i}from"../../../../../../core/screenUtils.js";import{Alignment as s}from"../../../../../../symbols/cim/enums.js";import{getXAnchorDirection as o,getYAnchorDirection as a}from"../../alignmentUtils.js";import{premultiplyAlphaRGBA as n}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as r,GLYPH_SIZE as l}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{TextMaterialKey as c}from"../../materialKey/MaterialKey.js";import{isFunction as m,getMinMaxZoom as _}from"./util.js";import f from"./WGLBaseTextTemplate.js";import y from"./WGLDynamicMeshTemplate.js";import{codepoints as p}from"../../../../layers/features/textUtils.js";const M=5;function d(t,e,i,s){return"string"==typeof t.text?t.text:"function"==typeof t.text?t.text(e,i,s):""}class g extends(f(y)){constructor(e,o,a){super(e),this._horizontalAlignment="center",this._verticalAlignment="middle",this._textToGlyphs=new Map,this._minMaxZoom=h(Math.round(o*r),Math.round(a*r));const l=e.scaleFactor||1;this._cimTextLayer=e;const _=e.color;if(m(_)){const t=(t,e,i)=>n(_(t,e,i));this._dynamicPropertyMap.set("_color",t)}else this._color=n(_);const f=e.outlineColor;if(m(f)){const t=(t,e,i)=>n(f(t,e,i));this._dynamicPropertyMap.set("_haloColor",t)}else this._haloColor=n(f);let y;m(e.size)||(y=Math.min(Math.round(i(e.size*e.sizeRatio)),127));const p=(t,s,o)=>m(e.size)?Math.min(Math.round(i(e.size(t,s,o)*e.sizeRatio)),127):y;if(this._dynamicPropertyMap.set("_size",p),m(e.outlineSize)){const t=(t,s,o)=>Math.min(Math.floor(M*i(e.outlineSize(t,s,o)*e.sizeRatio)),127);this._dynamicPropertyMap.set("_haloSize",t)}else this._haloSize=Math.min(Math.floor(M*i(e.outlineSize*e.sizeRatio)),127);let d;m(e.offsetX)||(d=Math.round(i(e.offsetX*e.sizeRatio)));const g=(t,s,o)=>m(e.offsetX)?Math.round(i(e.offsetX(t,s,o)*e.sizeRatio)):d;let u;this._dynamicPropertyMap.set("_xOffset",g),m(e.offsetY)||(u=Math.round(i(e.offsetY*e.sizeRatio)));const z=(t,s,o)=>m(e.offsetY)?Math.round(i(e.offsetY(t,s,o)*e.sizeRatio)):u;if(this._dynamicPropertyMap.set("_yOffset",z),m(e.angle)?this._dynamicPropertyMap.set("_angle",e.angle):this._angle=e.angle,m(e.horizontalAlignment)?this._dynamicPropertyMap.set("_horizontalAlignment",e.horizontalAlignment):this._horizontalAlignment=e.horizontalAlignment,m(e.verticalAlignment)?this._dynamicPropertyMap.set("_verticalAlignment",e.verticalAlignment):this._verticalAlignment=e.verticalAlignment,t(e.effects)){const t=e.effects;m(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}if(t(e.markerPlacement)){const t=e.markerPlacement;m(t)?this._dynamicPropertyMap.set("_markerPlacement",t):this._textPlacement=t}m(e.text)?this._dynamicPropertyMap.set("_text",e.text):this._text=e.text,this._scaleFactor=l;const x=Math.min(Math.round(i(e.referenceSize*e.sizeRatio)),127);this._referenceSize=Math.round(Math.sqrt(256*x)),this._materialKey=e.materialKey;const P=c.load(this._materialKey);P.sdf=!0,this._bitset=(e.alignment===s.MAP?1:0)|(e.colorLocked?1:0)<<1,this._materialKey=P.data,this._decoration="none",this._lineHeight=1,this._lineWidth=512,this._isCIM=!0}static fromCIMText(t,e){const[i,s]=_(t.scaleInfo,e);return new g(t,i,s)}async analyze(t,e,i,s){const o=e.readLegacyFeature(),a=d(this._cimTextLayer,o,i,s),n=await super.analyze(t,e,i,s,p(a));return n&&n.glyphMosaicItems&&this._textToGlyphs.set(a,n.glyphMosaicItems),n}bindFeature(t,i,s){const n=t.readLegacyFeature();if(this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(n,i,s)})),!this._text||0===this._text.length)return void(this._shapingInfo=null);this._size*=this._scaleFactor,this._scale=this._size/l,this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=o(e(this._horizontalAlignment,"center")),this._yAlignD=a(e(this._verticalAlignment,"baseline"));const r=this._textToGlyphs.get(this._text);this.bindTextInfo(r,!1)}}export{g as default};
5
+ import{isSome as t,unwrapOr as e}from"../../../../../../core/maybe.js";import{pt2px as i}from"../../../../../../core/screenUtils.js";import{Alignment as s}from"../../../../../../symbols/cim/enums.js";import{getXAnchorDirection as o,getYAnchorDirection as a}from"../../alignmentUtils.js";import{premultiplyAlphaRGBA as n}from"../../color.js";import{GLYPH_SIZE as r,MIN_MAX_ZOOM_PRECISION_FACTOR as l}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{TextMaterialKey as c}from"../../materialKey/MaterialKey.js";import{isFunction as m,getMinMaxZoom as _}from"./util.js";import f from"./WGLBaseTextTemplate.js";import y from"./WGLDynamicMeshTemplate.js";import{codepoints as p}from"../../../../layers/features/textUtils.js";const M=5;function d(t,e,i,s){return"string"==typeof t.text?t.text:"function"==typeof t.text?t.text(e,i,s):""}class g extends(f(y)){constructor(e,o,a){super(e),this._horizontalAlignment="center",this._verticalAlignment="middle",this._textToGlyphs=new Map,this._minMaxZoom=h(Math.round(o*l),Math.round(a*l));const r=e.scaleFactor||1;this._cimTextLayer=e;const _=e.color;if(m(_)){const t=(t,e,i)=>n(_(t,e,i));this._dynamicPropertyMap.set("_color",t)}else this._color=n(_);const f=e.outlineColor;if(m(f)){const t=(t,e,i)=>n(f(t,e,i));this._dynamicPropertyMap.set("_haloColor",t)}else this._haloColor=n(f);let y;m(e.size)||(y=Math.min(Math.round(i(e.size*e.sizeRatio)),127));const p=(t,s,o)=>m(e.size)?Math.min(Math.round(i(e.size(t,s,o)*e.sizeRatio)),127):y;if(this._dynamicPropertyMap.set("_size",p),m(e.outlineSize)){const t=(t,s,o)=>Math.min(Math.floor(M*i(e.outlineSize(t,s,o)*e.sizeRatio)),127);this._dynamicPropertyMap.set("_haloSize",t)}else this._haloSize=Math.min(Math.floor(M*i(e.outlineSize*e.sizeRatio)),127);let d;m(e.offsetX)||(d=Math.round(i(e.offsetX*e.sizeRatio)));const g=(t,s,o)=>m(e.offsetX)?Math.round(i(e.offsetX(t,s,o)*e.sizeRatio)):d;let u;this._dynamicPropertyMap.set("_xOffset",g),m(e.offsetY)||(u=Math.round(i(e.offsetY*e.sizeRatio)));const z=(t,s,o)=>m(e.offsetY)?Math.round(i(e.offsetY(t,s,o)*e.sizeRatio)):u;if(this._dynamicPropertyMap.set("_yOffset",z),m(e.angle)?this._dynamicPropertyMap.set("_angle",e.angle):this._angle=e.angle,m(e.horizontalAlignment)?this._dynamicPropertyMap.set("_horizontalAlignment",e.horizontalAlignment):this._horizontalAlignment=e.horizontalAlignment,m(e.verticalAlignment)?this._dynamicPropertyMap.set("_verticalAlignment",e.verticalAlignment):this._verticalAlignment=e.verticalAlignment,t(e.effects)){const t=e.effects;m(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}if(t(e.markerPlacement)){const t=e.markerPlacement;m(t)?this._dynamicPropertyMap.set("_markerPlacement",t):this._textPlacement=t}m(e.text)?this._dynamicPropertyMap.set("_text",e.text):this._text=e.text,this._scaleFactor=r;const x=Math.min(Math.round(i(e.referenceSize*e.sizeRatio)),127);this._referenceSize=Math.round(Math.sqrt(256*x)),this._materialKey=e.materialKey;const P=c.load(this._materialKey);P.sdf=!0,this._bitset=(e.alignment===s.MAP?1:0)|(e.colorLocked?1:0)<<1,this._materialKey=P.data,this._decoration="none",this._lineHeight=1,this._lineWidth=512,this._isCIM=!0}static fromCIMText(t,e){const[i,s]=_(t.scaleInfo,e);return new g(t,i,s)}async analyze(t,e,i,s){const o=e.readLegacyFeature(),a=d(this._cimTextLayer,o,i,s),n=await super.analyze(t,e,i,s,p(a));return n&&n.glyphMosaicItems&&this._textToGlyphs.set(a,n.glyphMosaicItems),n}bindFeature(t,i,s){const n=t.readLegacyFeature();if(this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(n,i,s)})),!this._text||0===this._text.length)return void(this._shapingInfo=null);this._size*=this._scaleFactor,this._scale=this._size/r,this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=o(e(this._horizontalAlignment,"center")),this._yAlignD=a(e(this._verticalAlignment,"baseline"));const l=this._textToGlyphs.get(this._text);this.bindTextInfo(l,!1)}}export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as t}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBAArray as e,premultiplyAlphaRGBA as r}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as i,BITSET_GENERIC_LOCK_COLOR as o,BITSET_FILL_RANDOM_PATTERN_OFFSET as s,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as l,SPRITE_PADDING as a,PICTURE_FILL_COLOR as n}from"../../definitions.js";import{degToByte as m}from"../../GeometryUtils.js";import{i1616to32 as f,i8888to32 as c}from"../../number.js";import{FillMaterialKey as h}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as u,DEFAULT_MIN_ZOOM as d,DEFAULT_MAX_ZOOM as p}from"./util.js";import y from"./WGLBaseFillTemplate.js";import x from"./WGLMeshTemplate.js";const M=128;class j extends(y(x)){constructor(t,e,r,o,s,l,a,n,m,u,d,p,y,x,M,j){super(),this._effects=x;const w=h.load(t);e&&(w.sdf=e.sdf,w.pattern=!0,w.textureBinding=e.textureBinding),this.fillColor=r,this.tl=o,this.br=s,this.aux21=f(l,a),this.aux22=f(n,m),this.aux3=c(u,d,p,0),this._bitset=y,this._minMaxZoom=f(Math.round(M*i),Math.round(j*i)),this._materialKey=w.data}static fromCIMFill(e,i,n){const c=e.color,h=c&&r(c)||0,d=e.materialKey,[p,y]=u(e.scaleInfo,n),x=(e.colorLocked?o:0)|(e.applyRandomOffset?s:0)|(e.sampleAlphaOnly?l:0);if(!i)return new j(d,null,h,0,0,0,0,0,0,0,0,0,x,e.effects,p,y);const{rect:w,width:g,height:K}=i,_=e.scaleX||1,b=w.x+a,F=w.y+a,L=b+g,T=F+K,A=e.height,B=_*A;let G=Math.round(A);G<=0&&(G=T-F);let S=Math.round(B);S<=0&&(S=L-b);const C=t(e.offsetX||0),I=t(-e.offsetY||0),O=f(b,F),U=f(L,T);return new j(d,i,h,O,U,S,G,C,I,M,M,m(e.angle),x,e.effects,p,y)}static fromSimpleFill(t,r,i=!1){const{color:s}=t,l=s&&"esriSFSNull"!==t.style&&e(s)||0,n=i?o:0,m=t.materialKey;let c;if(r){const{rect:t,width:e,height:i}=r,o=t.x+a,s=t.y+a,h=o+e,u=s+i,y=f(o,s),x=f(h,u);c=new j(m,r,l,y,x,e,i,0,0,M,M,0,n,null,d,p)}else c=new j(m,null,l,0,0,0,0,0,0,0,0,0,n,null,d,p);return c._maybeAddLineTemplate(t),c}static fromPictureFill(e,r,i=!1){const s=n,{rect:l,width:m,height:c}=r,h=l.x+a,u=l.y+a,y=h+m,x=u+c,w=f(h,u),g=f(y,x),K=Math.round(t(e.width)),_=Math.round(t(e.height)),b=t(e.xoffset),F=t(-e.yoffset),L=e.materialKey,T=i?o:0,A=new j(L,r,s,w,g,K,_,b,F,M*e.xscale,M*e.yscale,0,T,null,d,p);return A._maybeAddLineTemplate(e),A}}export{j as default};
5
+ import{pt2px as t}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBAArray as e,premultiplyAlphaRGBA as r}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as i,BITSET_FILL_RANDOM_PATTERN_OFFSET as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as s,SPRITE_PADDING as l,MIN_MAX_ZOOM_PRECISION_FACTOR as a,PICTURE_FILL_COLOR as n}from"../../definitions.js";import{degToByte as m}from"../../GeometryUtils.js";import{i1616to32 as f,i8888to32 as c}from"../../number.js";import{FillMaterialKey as h}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as u,DEFAULT_MIN_ZOOM as d,DEFAULT_MAX_ZOOM as p}from"./util.js";import y from"./WGLBaseFillTemplate.js";import x from"./WGLMeshTemplate.js";const M=128;class j extends(y(x)){constructor(t,e,r,i,o,s,l,n,m,u,d,p,y,x,M,j){super(),this._effects=x;const w=h.load(t);e&&(w.sdf=e.sdf,w.pattern=!0,w.textureBinding=e.textureBinding),this.fillColor=r,this.tl=i,this.br=o,this.aux21=f(s,l),this.aux22=f(n,m),this.aux3=c(u,d,p,0),this._bitset=y,this._minMaxZoom=f(Math.round(M*a),Math.round(j*a)),this._materialKey=w.data}static fromCIMFill(e,a,n){const c=e.color,h=c&&r(c)||0,d=e.materialKey,[p,y]=u(e.scaleInfo,n),x=(e.colorLocked?i:0)|(e.applyRandomOffset?o:0)|(e.sampleAlphaOnly?s:0);if(!a)return new j(d,null,h,0,0,0,0,0,0,0,0,0,x,e.effects,p,y);const{rect:w,width:g,height:K}=a,_=e.scaleX||1,b=w.x+l,F=w.y+l,L=b+g,T=F+K,A=e.height,B=_*A;let G=Math.round(A);G<=0&&(G=T-F);let S=Math.round(B);S<=0&&(S=L-b);const C=t(e.offsetX||0),I=t(-e.offsetY||0),O=f(b,F),U=f(L,T);return new j(d,a,h,O,U,S,G,C,I,M,M,m(e.angle),x,e.effects,p,y)}static fromSimpleFill(t,r,o=!1){const{color:s}=t,a=s&&"esriSFSNull"!==t.style&&e(s)||0,n=o?i:0,m=t.materialKey;let c;if(r){const{rect:t,width:e,height:i}=r,o=t.x+l,s=t.y+l,h=o+e,u=s+i,y=f(o,s),x=f(h,u);c=new j(m,r,a,y,x,e,i,0,0,M,M,0,n,null,d,p)}else c=new j(m,null,a,0,0,0,0,0,0,0,0,0,n,null,d,p);return c._maybeAddLineTemplate(t),c}static fromPictureFill(e,r,o=!1){const s=n,{rect:a,width:m,height:c}=r,h=a.x+l,u=a.y+l,y=h+m,x=u+c,w=f(h,u),g=f(y,x),K=Math.round(t(e.width)),_=Math.round(t(e.height)),b=t(e.xoffset),F=t(-e.yoffset),L=e.materialKey,T=o?i:0,A=new j(L,r,s,w,g,K,_,b,F,M*e.xscale,M*e.yscale,0,T,null,d,p);return A._maybeAddLineTemplate(e),A}}export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../../core/Logger.js";import{pt2px as t}from"../../../../../../core/screenUtils.js";import{CapType as i}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBAArray as r,premultiplyAlphaRGBA as s}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as o,SPRITE_PADDING as l,BITSET_TYPE_FILL_OUTLINE as n,BITSET_GENERIC_LOCK_COLOR as a,BITSET_LINE_SCALE_DASH as m,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as c}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{getCapType as p,getJoinType as f}from"../../Utils.js";import{LineMaterialKey as u,FillMaterialKey as d,hasOutlineFillSymbology as y}from"../../materialKey/MaterialKey.js";import{getLimitCosine as L,getMinMaxZoom as S,DEFAULT_MIN_ZOOM as _,DEFAULT_MAX_ZOOM as j}from"./util.js";import g from"./WGLBaseLineTemplate.js";import w from"./WGLMeshTemplate.js";class K extends(g(w)){constructor(e,t,i,r,s,l,p,f,d,y,S,_,j,g,w,K,P,x,b,O){super();const T=u.load(e);t&&(T.sdf=t.sdf,T.pattern=!0,T.textureBinding=t.textureBinding),this._capType=r,this._joinType=s,this._miterLimitCosine=L(l),this.tessellationProperties._fillColor=p,this.tessellationProperties._tl=f,this.tessellationProperties._br=d,this._hasPattern=y,this._isDashed=S,this._zOrder=P,this._effects=x,this._minMaxZoom=h(Math.round(b*o),Math.round(O*o)),this._materialKey=T.data;const M=(j?a:0)|(g?n:0)|(_?m:0)|(w?c:0);this.tessellationProperties._bitset=M,this.tessellationProperties._halfWidth=.5*i,this.tessellationProperties._halfReferenceWidth=.5*K,this.tessellationProperties.offset=0,this._initializeTessellator(!1)}static fromCIMLine(e,r,o){const n=e.color,a=e.scaleFactor||1,m=!!e.dashTemplate;let c=e.cap;m&&c===i.ROUND&&(c=i.SQUARE);const p=e.join,f=t(e.width)*a,u=t(e.referenceWidth),d=t(e.miterLimit),y=n&&s(n)||0,[L,_]=S(e.scaleInfo,o),j=!1;if(!r)return new K(e.materialKey,r,f,c,p,d,y,0,0,!1,m,e.scaleDash,e.colorLocked,j,e.sampleAlphaOnly,u,e.zOrder,e.effects,L,_);const{rect:g,width:w,height:P}=r,x=g.x+l,b=g.y+l,O=x+w,T=b+P,M=h(x,b),W=h(O,T),z=!1;return new K(e.materialKey,r,f,c,p,d,y,M,W,!0,m,e.scaleDash,e.colorLocked,z,e.sampleAlphaOnly,u,e.zOrder,e.effects,L,_)}static fromFillOutline(e){const t=d.load(e.materialKey);return y(t)&&e.outline&&"esriSLSSolid"===e.outline?.style?K.fromSimpleLine({hash:"",materialKey:e.materialKey,...e.outline},null,!0):null}static fromSimpleLine(e,i,s=!1){const{color:o}=e,n="esriSLSSolid"!==e.style&&"esriSLSNull"!==e.style,a=p(e.cap||"round"),m=f(e.join||"round");let c=o&&"esriSLSNull"!==e.style&&r(o)||0;"esriSLSNull"===e.style&&(c=0);const u=t(e.width),d=e.miterLimit;if(!i)return new K(e.materialKey,i,u,a,m,d,c,0,0,!1,n,!0,!1,s,!1,u,0,null,_,j);const{rect:y,width:L,height:S}=i,g=y.x+l,w=y.y+l,P=g+L,x=w+S,b=h(g,w),O=h(P,x);return new K(e.materialKey,i,u,a,m,d,c,b,O,!0,n,!0,!1,s,!1,u,0,null,_,j)}static fromPictureLineSymbol(t,i,r,s){return e.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate").error("PictureLineSymbol support does not exist!"),null}}export{K as default};
5
+ import e from"../../../../../../core/Logger.js";import{pt2px as t}from"../../../../../../core/screenUtils.js";import{CapType as i}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBAArray as r,premultiplyAlphaRGBA as s}from"../../color.js";import{SPRITE_PADDING as o,MIN_MAX_ZOOM_PRECISION_FACTOR as l,BITSET_TYPE_FILL_OUTLINE as n,BITSET_GENERIC_LOCK_COLOR as a,BITSET_LINE_SCALE_DASH as m,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as c}from"../../definitions.js";import{i1616to32 as h}from"../../number.js";import{getCapType as p,getJoinType as f}from"../../Utils.js";import{LineMaterialKey as u,FillMaterialKey as d,hasOutlineFillSymbology as y}from"../../materialKey/MaterialKey.js";import{getLimitCosine as L,getMinMaxZoom as S,DEFAULT_MIN_ZOOM as _,DEFAULT_MAX_ZOOM as j}from"./util.js";import g from"./WGLBaseLineTemplate.js";import w from"./WGLMeshTemplate.js";class K extends(g(w)){constructor(e,t,i,r,s,o,p,f,d,y,S,_,j,g,w,K,P,x,b,O){super();const T=u.load(e);t&&(T.sdf=t.sdf,T.pattern=!0,T.textureBinding=t.textureBinding),this._capType=r,this._joinType=s,this._miterLimitCosine=L(o),this.tessellationProperties._fillColor=p,this.tessellationProperties._tl=f,this.tessellationProperties._br=d,this._hasPattern=y,this._isDashed=S,this._zOrder=P,this._effects=x,this._minMaxZoom=h(Math.round(b*l),Math.round(O*l)),this._materialKey=T.data;const M=(j?a:0)|(g?n:0)|(_?m:0)|(w?c:0);this.tessellationProperties._bitset=M,this.tessellationProperties._halfWidth=.5*i,this.tessellationProperties._halfReferenceWidth=.5*K,this.tessellationProperties.offset=0,this._initializeTessellator(!1)}static fromCIMLine(e,r,l){const n=e.color,a=e.scaleFactor||1,m=!!e.dashTemplate;let c=e.cap;m&&c===i.ROUND&&(c=i.SQUARE);const p=e.join,f=t(e.width)*a,u=t(e.referenceWidth),d=t(e.miterLimit),y=n&&s(n)||0,[L,_]=S(e.scaleInfo,l),j=!1;if(!r)return new K(e.materialKey,r,f,c,p,d,y,0,0,!1,m,e.scaleDash,e.colorLocked,j,e.sampleAlphaOnly,u,e.zOrder,e.effects,L,_);const{rect:g,width:w,height:P}=r,x=g.x+o,b=g.y+o,O=x+w,T=b+P,M=h(x,b),W=h(O,T),z=!1;return new K(e.materialKey,r,f,c,p,d,y,M,W,!0,m,e.scaleDash,e.colorLocked,z,e.sampleAlphaOnly,u,e.zOrder,e.effects,L,_)}static fromFillOutline(e){const t=d.load(e.materialKey);return y(t)&&e.outline&&"esriSLSSolid"===e.outline?.style?K.fromSimpleLine({hash:"",materialKey:e.materialKey,...e.outline},null,!0):null}static fromSimpleLine(e,i,s=!1){const{color:l}=e,n="esriSLSSolid"!==e.style&&"esriSLSNull"!==e.style,a=p(e.cap||"round"),m=f(e.join||"round");let c=l&&"esriSLSNull"!==e.style&&r(l)||0;"esriSLSNull"===e.style&&(c=0);const u=t(e.width),d=e.miterLimit;if(!i)return new K(e.materialKey,i,u,a,m,d,c,0,0,!1,n,!0,!1,s,!1,u,0,null,_,j);const{rect:y,width:L,height:S}=i,g=y.x+o,w=y.y+o,P=g+L,x=w+S,b=h(g,w),O=h(P,x);return new K(e.materialKey,i,u,a,m,d,c,b,O,!0,n,!0,!1,s,!1,u,0,null,_,j)}static fromPictureLineSymbol(t,i,r,s){return e.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate").error("PictureLineSymbol support does not exist!"),null}}export{K as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{unwrapOr as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{c as o}from"../../../../../../chunks/mat2df32.js";import{c as s}from"../../../../../../chunks/vec2f32.js";import{Alignment as i,ExtremityPlacement as r}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBA as a,premultiplyAlphaRGBAArray as n}from"../../color.js";import{MIN_MAX_ZOOM_PRECISION_FACTOR as h,BITSET_MARKER_ALIGNMENT_MAP as l,BITSET_MARKER_ALIGNMENT_SCREEN as m,BITSET_GENERIC_LOCK_COLOR as f,BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE as c,BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY as u,SPRITE_PADDING as d,PICTURE_FILL_COLOR as p}from"../../definitions.js";import{WGLSymbologyType as x}from"../../enums.js";import{i1616to32 as M,i8888to32 as y}from"../../number.js";import{MarkerMaterialKey as _}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as S,DEFAULT_MIN_ZOOM as g,DEFAULT_MAX_ZOOM as V}from"./util.js";import z from"./WGLBaseMarkerTemplate.js";import B from"./WGLMeshTemplate.js";class b extends(z(B)){constructor(t,e,r,a,n,p,S,g,V,z,B,b,k,L,R,j,w,C,P,E,U,A,T){super(),this.angle=a,this.height=S,this.width=p,this.xOffset=e*P,this.yOffset=r*P,this._markerPlacement=E,this._effects=U,this._anchorX=j,this._anchorY=w,this._minMaxZoom=M(Math.round(A*h),Math.round(T*h));const v=(L===i.MAP?l:m)|(B?f:0)|(k?c:0)|(b?u:0),K=R&&R.sdf,W=_.load(t);W.sdf=K,W.pattern=!0,W.textureBinding=R.textureBinding,this._materialKey=W.data,this._fillColor=n,this._outlineColor=V,this._sizeOutlineWidth=y(Math.round(Math.min(Math.sqrt(128*p),255)),Math.round(Math.min(Math.sqrt(128*S),255)),Math.round(Math.min(Math.sqrt(128*z),255)),Math.round(Math.min(Math.sqrt(128*g),255)));const X=R.rect.x+d,q=R.rect.y+d,Y=X+R.width,H=q+R.height;this._offsets.xUpperLeft=X,this._offsets.yUpperLeft=q,this._offsets.xUpperRight=Y,this._offsets.yUpperRight=q,this._offsets.xBottomLeft=X,this._offsets.yBottomLeft=H,this._offsets.xBottomRight=Y,this._offsets.yBottomRight=H,W.symbologyType===x.PIE_CHART?(this._texUpperLeft=M(0,1),this._texUpperRight=M(1,1),this._texBottomLeft=M(0,0),this._texBottomRight=M(1,0)):(this._texUpperLeft=M(X,q),this._texUpperRight=M(Y,q),this._texBottomLeft=M(X,H),this._texBottomRight=M(Y,H)),p*=C,S*=C,p*=P,S*=P;const I=Math.round(64*C);this._bitestAndDistRatio=M(v,I),this._computedWidth=p,this._computedHeight=S;const N=s(),O=o();this._applyTransformation(O,N)}static fromCIMMarker(o,s,r){const n=s&&s.width||1,h=s&&s.height||1,l=o.size,m=n/h*o.scaleX,f=o.scaleSymbolsProportionally&&o.frameHeight?l/o.frameHeight:1;let c=a(o.color);const u=a(o.outlineColor),d=e(l),p=d*m,x=e(o.offsetX||0),M=e(o.offsetY||0),y=e(o.outlineWidth||0)*f,_=o.alignment||i.SCREEN,g=e(o.referenceSize),[V,z]=S(o.scaleInfo,r);s.sdf||0!==c||(c=-1);let B=o.rotation||0;o.rotateClockwise||(B=-B);let k=0,L=0;const R=o.anchorPoint;R&&(o.isAbsoluteAnchorPoint?l&&(k=R.x/(l*m),L=R.y/l):(k=R.x,L=R.y));const j=new b(o.materialKey,x,M,B,c,p,d,g,u,y,o.colorLocked,o.scaleSymbolsProportionally,!1,_,s,k,L,o.sizeRatio,t(o.scaleFactor,1),o.markerPlacement,o.effects,V,z);return j._vertexBoundsScaleX=o.maxVVSize?o.maxVVSize/p:1,j._vertexBoundsScaleY=o.maxVVSize?o.maxVVSize/d:1,j}static fromPictureMarker(t,o){const s=Math.round(e(t.width)),r=Math.round(e(t.height)),a=p,n=Math.round(e(t.xoffset||0)),h=Math.round(e(t.yoffset||0)),l=new b(t.materialKey,n,h,t.angle,a,s,r,r,0,0,!1,!1,!1,i.SCREEN,o,0,0,1,1,null,null,g,V);return l._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.width:1,l._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.height:1,l}static fromSimpleMarker(t,o){const s=n(t.color),r=Math.round(e(t.size)),a=r,h=Math.round(e(t.xoffset||0)),l=Math.round(e(t.yoffset||0)),m=t.style,f=t.outline,c=0|(f&&f.color&&n(f.color)),u=0|(f&&f.width&&Math.round(e(f.width))),d=new b(t.materialKey,h,l,t.angle,s,r,a,a,c,u,!1,!1,"esriSMSCross"===m||"esriSMSX"===m,i.SCREEN,o,0,0,126/64,1,null,null,g,V);return d.boundsType="esriSMSCircle"===m?"circle":"square",d._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.size:1,d._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.size:1,d}static fromLineSymbolMarker(t,o){const s=n(t.color),a=6,h=Math.round(e(a*t.lineWidth)),l=h,m="cross"===t.style||"x"===t.style;let f;switch(t.placement){case"begin-end":f=r.Both;break;case"begin":f=r.JustBegin;break;case"end":f=r.JustEnd;break;default:f=r.None}const c={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:f,offsetAlongLine:0},u=new b(t.materialKey,0,0,0,s,h,l,l/a,s,m?Math.round(e(t.lineWidth)):0,!1,!1,m,i.MAP,o,0,0,126/64,1,c,null,g,V);return u.boundsType="circle"===t.style?"circle":"square",u}}export{b as default};
5
+ import{unwrapOr as t}from"../../../../../../core/maybe.js";import{pt2px as e}from"../../../../../../core/screenUtils.js";import{c as o}from"../../../../../../chunks/mat2df32.js";import{c as s}from"../../../../../../chunks/vec2f32.js";import{Alignment as i,ExtremityPlacement as r}from"../../../../../../symbols/cim/enums.js";import{premultiplyAlphaRGBA as a,premultiplyAlphaRGBAArray as n}from"../../color.js";import{BITSET_MARKER_ALIGNMENT_MAP as h,BITSET_MARKER_ALIGNMENT_SCREEN as l,BITSET_GENERIC_LOCK_COLOR as m,BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE as f,BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY as c,SPRITE_PADDING as u,MIN_MAX_ZOOM_PRECISION_FACTOR as d,PICTURE_FILL_COLOR as p}from"../../definitions.js";import{WGLSymbologyType as x}from"../../enums.js";import{i1616to32 as M,i8888to32 as y}from"../../number.js";import{MarkerMaterialKey as _}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as S,DEFAULT_MIN_ZOOM as g,DEFAULT_MAX_ZOOM as V}from"./util.js";import z from"./WGLBaseMarkerTemplate.js";import B from"./WGLMeshTemplate.js";class b extends(z(B)){constructor(t,e,r,a,n,p,S,g,V,z,B,b,k,L,R,j,w,C,P,E,U,A,T){super(),this.angle=a,this.height=S,this.width=p,this.xOffset=e*P,this.yOffset=r*P,this._markerPlacement=E,this._effects=U,this._anchorX=j,this._anchorY=w,this._minMaxZoom=M(Math.round(A*d),Math.round(T*d));const v=(L===i.MAP?h:l)|(B?m:0)|(k?f:0)|(b?c:0),K=R&&R.sdf,W=_.load(t);W.sdf=K,W.pattern=!0,W.textureBinding=R.textureBinding,this._materialKey=W.data,this._fillColor=n,this._outlineColor=V,this._sizeOutlineWidth=y(Math.round(Math.min(Math.sqrt(128*p),255)),Math.round(Math.min(Math.sqrt(128*S),255)),Math.round(Math.min(Math.sqrt(128*z),255)),Math.round(Math.min(Math.sqrt(128*g),255)));const X=R.rect.x+u,q=R.rect.y+u,Y=X+R.width,H=q+R.height;this._offsets.xUpperLeft=X,this._offsets.yUpperLeft=q,this._offsets.xUpperRight=Y,this._offsets.yUpperRight=q,this._offsets.xBottomLeft=X,this._offsets.yBottomLeft=H,this._offsets.xBottomRight=Y,this._offsets.yBottomRight=H,W.symbologyType===x.PIE_CHART?(this._texUpperLeft=M(0,1),this._texUpperRight=M(1,1),this._texBottomLeft=M(0,0),this._texBottomRight=M(1,0)):(this._texUpperLeft=M(X,q),this._texUpperRight=M(Y,q),this._texBottomLeft=M(X,H),this._texBottomRight=M(Y,H)),p*=C,S*=C,p*=P,S*=P;const I=Math.round(64*C);this._bitestAndDistRatio=M(v,I),this._computedWidth=p,this._computedHeight=S;const N=s(),O=o();this._applyTransformation(O,N)}static fromCIMMarker(o,s,r){const n=s&&s.width||1,h=s&&s.height||1,l=o.size,m=n/h*o.scaleX,f=o.scaleSymbolsProportionally&&o.frameHeight?l/o.frameHeight:1;let c=a(o.color);const u=a(o.outlineColor),d=e(l),p=d*m,x=e(o.offsetX||0),M=e(o.offsetY||0),y=e(o.outlineWidth||0)*f,_=o.alignment||i.SCREEN,g=e(o.referenceSize),[V,z]=S(o.scaleInfo,r);s.sdf||0!==c||(c=-1);let B=o.rotation||0;o.rotateClockwise||(B=-B);let k=0,L=0;const R=o.anchorPoint;R&&(o.isAbsoluteAnchorPoint?l&&(k=R.x/(l*m),L=R.y/l):(k=R.x,L=R.y));const j=new b(o.materialKey,x,M,B,c,p,d,g,u,y,o.colorLocked,o.scaleSymbolsProportionally,!1,_,s,k,L,o.sizeRatio,t(o.scaleFactor,1),o.markerPlacement,o.effects,V,z);return j._vertexBoundsScaleX=o.maxVVSize?o.maxVVSize/p:1,j._vertexBoundsScaleY=o.maxVVSize?o.maxVVSize/d:1,j}static fromPictureMarker(t,o){const s=Math.round(e(t.width)),r=Math.round(e(t.height)),a=p,n=Math.round(e(t.xoffset||0)),h=Math.round(e(t.yoffset||0)),l=new b(t.materialKey,n,h,t.angle,a,s,r,r,0,0,!1,!1,!1,i.SCREEN,o,0,0,1,1,null,null,g,V);return l._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.width:1,l._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.height:1,l}static fromSimpleMarker(t,o){const s=n(t.color),r=Math.round(e(t.size)),a=r,h=Math.round(e(t.xoffset||0)),l=Math.round(e(t.yoffset||0)),m=t.style,f=t.outline,c=0|(f&&f.color&&n(f.color)),u=0|(f&&f.width&&Math.round(e(f.width))),d=new b(t.materialKey,h,l,t.angle,s,r,a,a,c,u,!1,!1,"esriSMSCross"===m||"esriSMSX"===m,i.SCREEN,o,0,0,126/64,1,null,null,g,V);return d.boundsType="esriSMSCircle"===m?"circle":"square",d._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.size:1,d._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.size:1,d}static fromLineSymbolMarker(t,o){const s=n(t.color),a=6,h=Math.round(e(a*t.lineWidth)),l=h,m="cross"===t.style||"x"===t.style;let f;switch(t.placement){case"begin-end":f=r.Both;break;case"begin":f=r.JustBegin;break;case"end":f=r.JustEnd;break;default:f=r.None}const c={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:f,offsetAlongLine:0},u=new b(t.materialKey,0,0,0,s,h,l,l/a,s,m?Math.round(e(t.lineWidth)):0,!1,!1,m,i.MAP,o,0,0,126/64,1,c,null,g,V);return u.boundsType="circle"===t.style?"circle":"square",u}}export{b as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{c as t,m as s,t as e,r as i}from"../../../../../../chunks/mat2d.js";import{c as n,t as o}from"../../../../../../chunks/mat2df32.js";import{s as h,t as r}from"../../../../../../chunks/vec2.js";import{c as a}from"../../../../../../chunks/vec2f32.js";import{VAlign as c}from"../../alignmentUtils.js";import{i1616to32 as f}from"../../number.js";import d from"../../Rect.js";import m from"../../collisions/BoundingBox.js";const l=26,u=4,g=l+u,_=l-6,p=3,x=8,w=Math.PI/180;class y{constructor(t,s,e,i){this._rotationT=n(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const o=e.rect,h=new Float32Array(8);t*=i,s*=i;const r=e.code?o.width*i:e.metrics.width,a=e.code?o.height*i:e.metrics.height;h[0]=t,h[1]=s,h[2]=t+r,h[3]=s,h[4]=t,h[5]=s+a,h[6]=t+r,h[7]=s+a,this._data=h,this._setTextureCoords(o),this._scale=i,this._mosaic=e,this.x=t,this.y=s,this.maxOffset=Math.max(t+r,s+a)}get width(){return this._mosaic.metrics.width*this._scale}get mosaic(){return this._mosaic}set angle(s){this._angle=s,t(this._rotationT,-s),this._setOffsets(this._data)}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(this._data),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,i=e*this._scale,h=Math.abs(t)*this._scale,r=new Float32Array(8);r[0]=this.x,r[1]=this.y,r[2]=this.x+i,r[3]=this.y,r[4]=this.x,r[5]=this.y+h,r[6]=this.x+i,r[7]=this.y+h;const a=s(n(),this._rotationT,this._transform);o(r,r,a);let c=1/0,f=1/0,d=0,l=0;for(let s=0;s<4;s++){const t=r[2*s],e=r[2*s+1];c=Math.min(c,t),f=Math.min(f,e),d=Math.max(d,t),l=Math.max(l,e)}const u=d-c,g=l-f,_=c+u/2,p=f+g/2;this._bounds=new m(_,p,u,g)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(t){this._offsets||(this._offsets={upperLeft:0,upperRight:0,lowerLeft:0,lowerRight:0});const e=this._offsets,i=new Float32Array(8),h=s(n(),this._rotationT,this._transform);o(i,t,h),e.upperLeft=f(i[0]*x,i[1]*x),e.upperRight=f(i[2]*x,i[3]*x),e.lowerLeft=f(i[4]*x,i[5]*x),e.lowerRight=f(i[6]*x,i[7]*x)}_setTextureCoords({x:t,y:s,width:e,height:i}){this._texcoords={upperLeft:f(t,s),upperRight:f(t+e,s),lowerLeft:f(t,s+i),lowerRight:f(t+e,s+i)}}}const M=(t,s)=>({code:0,page:0,sdf:!0,rect:new d(0,0,11,8),textureBinding:s,metrics:{advance:0,height:4,width:t,left:0,top:0}});class T{constructor(t,s,e){this._rotation=0,this._decorate(t,s,e),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=s.length>1,this._hasRotation=0!==e.angle,this._transform=this._createGlyphTransform(this.bounds,e);for(const i of t)i.setTransform(this._transform)}setRotation(e){if(0===e&&0===this._rotation)return;this._rotation=e;const i=this._transform,o=t(n(),e);s(i,o,i);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,s,e){if(!e.decoration||"none"===e.decoration||!t.length)return;const i=e.scale,n="underline"===e.decoration?g:_,o=t[0].textureBinding;for(const h of s){const s=h.startX*i,e=h.startY*i,r=(h.width+h.glyphWidthEnd)*i;t.push(new y(s,e+n*i,M(r,o),1))}}get boundsT(){const t=this.bounds,s=h(a(),t.x,t.y);if(r(s,s,this._transform),this._hasRotation){const e=Math.max(t.width,t.height);return new m(s[0],s[1],e,e)}return new m(s[0],s[1],t.width,t.height)}_createBounds(t){let s=1/0,e=1/0,i=0,n=0;for(const r of t)s=Math.min(s,r.xTopLeft),e=Math.min(e,r.yTopLeft),i=Math.max(i,r.xTopLeft+r.width),n=Math.max(n,r.yBottomRight);const o=i-s,h=n-e;return new m(s+o/2,e+h/2,o,h)}_createGlyphTransform(t,s){const o=w*s.angle,r=n(),c=a();return e(r,r,h(c,s.xOffset,-s.yOffset)),s.isCIM?i(r,r,o):(e(r,r,h(c,t.x,t.y)),i(r,r,o),e(r,r,h(c,-t.x,-t.y))),r}}class B{constructor(t,s,e,i,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(s,e)),this.end=Math.max(0,Math.max(s,e)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=i,this.yMin=n,this.yMax=o}}const R=t=>10===t,b=t=>32===t;function L(t,s,e){const i=new Array,n=1/e.scale,o=e.maxLineWidth*n,h=s?t.length-1:0,r=s?-1:t.length,a=s?-1:1;let c=h,f=0,d=0,m=c,l=m,u=0,g=1/0,_=0;for(;c!==r;){const{code:s,metrics:e}=t[c],n=Math.abs(e.top);if(R(s)||b(s)||(g=Math.min(g,n),_=Math.max(_,n+e.height)),R(s))c!==h&&(i.push(new B(t,m,c-a,f,g,_)),g=1/0,_=0),f=0,m=c+a,l=c+a,d=0;else if(b(s))l=c+a,d=0,u=e.advance,f+=e.advance;else if(f>o){if(l!==m){const s=l-2*a;f-=u,i.push(new B(t,m,s,f-d,g,_)),g=1/0,_=0,m=l,f=d}else i.push(new B(t,m,c-a,f,g,_)),g=1/0,_=0,m=c,l=c,f=0;f+=e.advance,d+=e.advance}else f+=e.advance,d+=e.advance;c+=a}const p=new B(t,m,c-a,f,g,_);return p.start>=0&&p.end<t.length&&i.push(p),i}function v(t,s){let e=0;for(let o=0;o<t.length;o++){const{width:s}=t[o];e=Math.max(s,e)}const i="underline"===s.decoration?u:0,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+s.lineHeight*(t.length-1)+i-n,width:e}}function j(t,s,e){const i=e.scale,n=new Array,o=L(t,s,e),h=v(o,e),{vAlign:r,hAlign:a}=e,f=r===c.Baseline?1:0,d=f?0:r-1,m=(1-f)*-h.y+d*(h.height/2)+(f?1:0)*-l;for(let c=0;c<o.length;c++){const{start:s,end:h,width:r}=o[c];let f=-1*(a+1)*(r/2)-p;const d=c*e.lineHeight+m-p;o[c].startX=f,o[c].startY=d;for(let e=s;e<=h;e++){const s=t[e];if(R(s.code))continue;const o=new y(f+s.metrics.left,d-s.metrics.top,s,i);f+=s.metrics.advance,n.push(o)}}return new T(n,o,e)}export{y as ShapedGlyph,T as ShapingInfo,j as shapeGlyphs};
5
+ import{b as t,m as s,t as e,r as i}from"../../../../../../chunks/mat2d.js";import{c as n,t as o}from"../../../../../../chunks/mat2df32.js";import{s as h,t as r}from"../../../../../../chunks/vec2.js";import{c as a}from"../../../../../../chunks/vec2f32.js";import{VAlign as c}from"../../alignmentUtils.js";import{i1616to32 as f}from"../../number.js";import d from"../../Rect.js";import m from"../../collisions/BoundingBox.js";const l=26,u=4,g=l+u,_=l-6,p=3,x=8,w=Math.PI/180;class y{constructor(t,s,e,i){this._rotationT=n(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const o=e.rect,h=new Float32Array(8);t*=i,s*=i;const r=e.code?o.width*i:e.metrics.width,a=e.code?o.height*i:e.metrics.height;h[0]=t,h[1]=s,h[2]=t+r,h[3]=s,h[4]=t,h[5]=s+a,h[6]=t+r,h[7]=s+a,this._data=h,this._setTextureCoords(o),this._scale=i,this._mosaic=e,this.x=t,this.y=s,this.maxOffset=Math.max(t+r,s+a)}get width(){return this._mosaic.metrics.width*this._scale}get mosaic(){return this._mosaic}set angle(s){this._angle=s,t(this._rotationT,-s),this._setOffsets(this._data)}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(this._data),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,i=e*this._scale,h=Math.abs(t)*this._scale,r=new Float32Array(8);r[0]=this.x,r[1]=this.y,r[2]=this.x+i,r[3]=this.y,r[4]=this.x,r[5]=this.y+h,r[6]=this.x+i,r[7]=this.y+h;const a=s(n(),this._rotationT,this._transform);o(r,r,a);let c=1/0,f=1/0,d=0,l=0;for(let s=0;s<4;s++){const t=r[2*s],e=r[2*s+1];c=Math.min(c,t),f=Math.min(f,e),d=Math.max(d,t),l=Math.max(l,e)}const u=d-c,g=l-f,_=c+u/2,p=f+g/2;this._bounds=new m(_,p,u,g)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(t){this._offsets||(this._offsets={upperLeft:0,upperRight:0,lowerLeft:0,lowerRight:0});const e=this._offsets,i=new Float32Array(8),h=s(n(),this._rotationT,this._transform);o(i,t,h),e.upperLeft=f(i[0]*x,i[1]*x),e.upperRight=f(i[2]*x,i[3]*x),e.lowerLeft=f(i[4]*x,i[5]*x),e.lowerRight=f(i[6]*x,i[7]*x)}_setTextureCoords({x:t,y:s,width:e,height:i}){this._texcoords={upperLeft:f(t,s),upperRight:f(t+e,s),lowerLeft:f(t,s+i),lowerRight:f(t+e,s+i)}}}const M=(t,s)=>({code:0,page:0,sdf:!0,rect:new d(0,0,11,8),textureBinding:s,metrics:{advance:0,height:4,width:t,left:0,top:0}});class T{constructor(t,s,e){this._rotation=0,this._decorate(t,s,e),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=s.length>1,this._hasRotation=0!==e.angle,this._transform=this._createGlyphTransform(this.bounds,e);for(const i of t)i.setTransform(this._transform)}setRotation(e){if(0===e&&0===this._rotation)return;this._rotation=e;const i=this._transform,o=t(n(),e);s(i,o,i);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,s,e){if(!e.decoration||"none"===e.decoration||!t.length)return;const i=e.scale,n="underline"===e.decoration?g:_,o=t[0].textureBinding;for(const h of s){const s=h.startX*i,e=h.startY*i,r=(h.width+h.glyphWidthEnd)*i;t.push(new y(s,e+n*i,M(r,o),1))}}get boundsT(){const t=this.bounds,s=h(a(),t.x,t.y);if(r(s,s,this._transform),this._hasRotation){const e=Math.max(t.width,t.height);return new m(s[0],s[1],e,e)}return new m(s[0],s[1],t.width,t.height)}_createBounds(t){let s=1/0,e=1/0,i=0,n=0;for(const r of t)s=Math.min(s,r.xTopLeft),e=Math.min(e,r.yTopLeft),i=Math.max(i,r.xTopLeft+r.width),n=Math.max(n,r.yBottomRight);const o=i-s,h=n-e;return new m(s+o/2,e+h/2,o,h)}_createGlyphTransform(t,s){const o=w*s.angle,r=n(),c=a();return e(r,r,h(c,s.xOffset,-s.yOffset)),s.isCIM?i(r,r,o):(e(r,r,h(c,t.x,t.y)),i(r,r,o),e(r,r,h(c,-t.x,-t.y))),r}}class B{constructor(t,s,e,i,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(s,e)),this.end=Math.max(0,Math.max(s,e)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=i,this.yMin=n,this.yMax=o}}const b=t=>10===t,R=t=>32===t;function L(t,s,e){const i=new Array,n=1/e.scale,o=e.maxLineWidth*n,h=s?t.length-1:0,r=s?-1:t.length,a=s?-1:1;let c=h,f=0,d=0,m=c,l=m,u=0,g=1/0,_=0;for(;c!==r;){const{code:s,metrics:e}=t[c],n=Math.abs(e.top);if(b(s)||R(s)||(g=Math.min(g,n),_=Math.max(_,n+e.height)),b(s))c!==h&&(i.push(new B(t,m,c-a,f,g,_)),g=1/0,_=0),f=0,m=c+a,l=c+a,d=0;else if(R(s))l=c+a,d=0,u=e.advance,f+=e.advance;else if(f>o){if(l!==m){const s=l-2*a;f-=u,i.push(new B(t,m,s,f-d,g,_)),g=1/0,_=0,m=l,f=d}else i.push(new B(t,m,c-a,f,g,_)),g=1/0,_=0,m=c,l=c,f=0;f+=e.advance,d+=e.advance}else f+=e.advance,d+=e.advance;c+=a}const p=new B(t,m,c-a,f,g,_);return p.start>=0&&p.end<t.length&&i.push(p),i}function v(t,s){let e=0;for(let o=0;o<t.length;o++){const{width:s}=t[o];e=Math.max(s,e)}const i="underline"===s.decoration?u:0,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+s.lineHeight*(t.length-1)+i-n,width:e}}function j(t,s,e){const i=e.scale,n=new Array,o=L(t,s,e),h=v(o,e),{vAlign:r,hAlign:a}=e,f=r===c.Baseline?1:0,d=f?0:r-1,m=(1-f)*-h.y+d*(h.height/2)+(f?1:0)*-l;for(let c=0;c<o.length;c++){const{start:s,end:h,width:r}=o[c];let f=-1*(a+1)*(r/2)-p;const d=c*e.lineHeight+m-p;o[c].startX=f,o[c].startY=d;for(let e=s;e<=h;e++){const s=t[e];if(b(s.code))continue;const o=new y(f+s.metrics.left,d-s.metrics.top,s,i);f+=s.metrics.advance,n.push(o)}}return new T(n,o,e)}export{y as ShapedGlyph,T as ShapingInfo,j as shapeGlyphs};