@arcgis/core 5.0.0-next.31 → 5.0.0-next.33

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 (241) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
  5. package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
  6. package/assets/esri/core/workers/chunks/22f745539ca54d8cd30d.js +1 -0
  7. package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +1 -0
  8. package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
  9. package/assets/esri/core/workers/chunks/{1dfca37f95f2b968aa54.js → 39d2b540738431adec98.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
  11. package/assets/esri/core/workers/chunks/446f76356fc116204ec3.js +1 -0
  12. package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +1 -0
  13. package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +1 -0
  14. package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +1 -0
  15. package/assets/esri/core/workers/chunks/52ecbaa2d32692d6d8df.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3777b41b4fa2f1418402.js → 55818fe7a7aa1e5c8bbd.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7e6fae3660e7a6a0fa16.js → 5f781ef46ce7c4048c2f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/63933cbcb5c12df09715.js +1 -0
  19. package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e6df4327ac1d9b65b80d.js → 71dd80231ea656a6380c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/725819839434c59102f3.js +1 -0
  22. package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bd58c027408dc858f23c.js → 77b45957cfe42523c1c8.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +1 -0
  26. package/assets/esri/core/workers/chunks/{25fd0884dd14973c89f5.js → 866a608d489bf56bc371.js} +1 -1
  27. package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +1 -0
  28. package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
  30. package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
  34. package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3bacd904cd93c8013f6a.js → ae793d814cf32db9fbde.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e0b70652da4a7f672cfc.js → b21cf62652ca772108c8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +1 -0
  38. package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +1 -0
  39. package/assets/esri/core/workers/chunks/c9c2e00fed979c21e2f0.js +1 -0
  40. package/assets/esri/core/workers/chunks/{94005916d321c879bea1.js → cb500d673ca7ec1ef945.js} +1 -1
  41. package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +1 -0
  42. package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{4ab89c990a82c745c0fd.js → d764b6273974f4bca31b.js} +1 -1
  44. package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +1 -0
  45. package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
  46. package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +1 -0
  47. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
  48. package/assets/esri/core/workers/chunks/df458ad51be27df3d79d.js +1 -0
  49. package/assets/esri/core/workers/chunks/{01b8e680befff83e7d3e.js → e093e745708f722bc1b9.js} +1 -1
  50. package/assets/esri/core/workers/chunks/e32fc0b2c6530d28ce85.js +1 -0
  51. package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +1 -0
  52. package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +1 -0
  53. package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
  54. package/assets/esri/core/workers/chunks/{a74e6d505a55ed27f004.js → f11453f24c0b728669d2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/f2ebd6471e1259a6eac0.js +1 -0
  56. package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
  57. package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +1 -0
  58. package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
  59. package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
  60. package/assets/esri/themes/dark/main.css +1 -1
  61. package/assets/esri/themes/light/main.css +1 -1
  62. package/assets/esri/themes/light/view.css +1 -1
  63. package/chunks/BlendLayers.glsl.js +1 -1
  64. package/chunks/Envelope.js +1 -1
  65. package/chunks/GaussianSplat.glsl.js +2 -2
  66. package/chunks/Geometry.js +1 -1
  67. package/chunks/GlowComposition.glsl.js +5 -5
  68. package/chunks/MultiPathImpl.js +1 -1
  69. package/chunks/Point2D.js +1 -1
  70. package/chunks/UnitFactory.js +1 -1
  71. package/config.js +1 -1
  72. package/core/deprecate.js +1 -1
  73. package/core/keyboard.js +5 -0
  74. package/geometry/SpatialReference.js +1 -1
  75. package/geometry/operators/support/apiConverter.js +1 -1
  76. package/geometry/operators/support/jsonConverter.js +1 -1
  77. package/geometry/support/spatialReferenceUtils.js +1 -1
  78. package/interfaces.d.ts +552 -3
  79. package/kernel.js +1 -1
  80. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  81. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  82. package/layers/graphics/data/AttributesBuilder.js +1 -1
  83. package/layers/graphics/data/QueryEngineResult.js +1 -1
  84. package/layers/mixins/ArcGISImageService.js +1 -1
  85. package/package.json +1 -1
  86. package/portal/schemas/definitions.js +1 -1
  87. package/rest/query/operations/query.js +1 -1
  88. package/rest/support/LocateSetting.d.ts +4 -0
  89. package/rest/support/LocateSetting.js +5 -0
  90. package/rest/support/LocateSettingBase.d.ts +4 -0
  91. package/rest/support/LocateSettingBase.js +5 -0
  92. package/rest/support/LocateSettingSource.d.ts +4 -0
  93. package/rest/support/LocateSettingSource.js +5 -0
  94. package/rest/support/LocateSettings.d.ts +4 -0
  95. package/rest/support/LocateSettings.js +5 -0
  96. package/rest/support/LocateSettingsOverrides.d.ts +4 -0
  97. package/rest/support/LocateSettingsOverrides.js +5 -0
  98. package/rest/support/RouteParameters.js +1 -1
  99. package/statistics/utils.js +1 -1
  100. package/support/revision.js +1 -1
  101. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  102. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  103. package/views/3d/GroundView3D.js +1 -1
  104. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  105. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  106. package/views/3d/layers/I3SMeshView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  108. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  109. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  110. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  111. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  112. package/views/3d/state/ConstraintsManager.js +1 -1
  113. package/views/3d/state/NearFarHeuristic.js +1 -1
  114. package/views/3d/support/Attribution3D.js +5 -0
  115. package/views/3d/support/CombinedElevationProvider.js +1 -1
  116. package/views/3d/support/ElevationRange.js +1 -1
  117. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  118. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +5 -0
  119. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +5 -0
  120. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  122. package/views/3d/terrain/ElevationBounds.js +1 -1
  123. package/views/3d/terrain/ElevationData.js +1 -1
  124. package/views/3d/terrain/TerrainSurface.js +1 -1
  125. package/views/3d/terrain/Tile.js +1 -1
  126. package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
  127. package/views/3d/terrain/TileCompositor.js +1 -1
  128. package/views/3d/terrain/TileRenderer.js +1 -1
  129. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  130. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  131. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  132. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  134. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +12 -12
  135. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +5 -0
  136. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  137. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  138. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  139. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -13
  140. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -1
  141. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
  142. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
  143. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
  144. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  145. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  146. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  147. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  148. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  149. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  150. package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
  151. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  152. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  153. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  154. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  155. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  156. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  157. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  158. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  159. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  160. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  161. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  162. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  163. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  165. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  166. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  167. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  168. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  169. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  170. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  171. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
  172. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +24 -31
  173. package/views/Attribution.js +5 -0
  174. package/views/DOMContainer.js +1 -1
  175. package/views/SceneView.js +1 -1
  176. package/views/View.js +1 -1
  177. package/views/draw/support/managers/DrawTooltipManager.js +5 -0
  178. package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
  179. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  180. package/views/interactive/tooltip/fields/TooltipField.js +1 -1
  181. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
  182. package/views/layers/LayerView.js +1 -1
  183. package/views/support/AttributionItem.d.ts +4 -0
  184. package/views/support/AttributionItem.js +5 -0
  185. package/views/support/GroundElevationSampler.js +1 -1
  186. package/views/support/LayerViewManager.js +1 -1
  187. package/views/support/attributionUtils.js +5 -0
  188. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  189. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  190. package/views/ui/2d/DefaultUI2D.js +1 -1
  191. package/views/ui/3d/DefaultUI3D.js +1 -1
  192. package/widgets/Attribution/AttributionViewModel.js +1 -1
  193. package/widgets/Attribution.js +1 -1
  194. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  195. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  196. package/widgets/ElevationProfile.js +1 -1
  197. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  198. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  199. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  200. package/widgets/Widget.js +1 -1
  201. package/widgets/support/decorators/accessibleHandler.js +1 -1
  202. package/widgets/support/jsxWidgetSupport.js +1 -1
  203. package/widgets/support/widget.js +1 -1
  204. package/widgets/support/widgetUtils.js +1 -1
  205. package/assets/esri/core/workers/chunks/0a1df5a724fe253b3866.js +0 -1
  206. package/assets/esri/core/workers/chunks/155d74b9c0ef31dc2316.js +0 -1
  207. package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
  208. package/assets/esri/core/workers/chunks/2c8c48433b380da59831.js +0 -1
  209. package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
  210. package/assets/esri/core/workers/chunks/31b5747a254d13acc58e.js +0 -1
  211. package/assets/esri/core/workers/chunks/3ac84e324d212815e252.js +0 -1
  212. package/assets/esri/core/workers/chunks/41a00c77e6f7ce61e476.js +0 -1
  213. package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
  214. package/assets/esri/core/workers/chunks/45729d006db6a569715f.js +0 -1
  215. package/assets/esri/core/workers/chunks/50cf3cbcad2be1c1e210.js +0 -1
  216. package/assets/esri/core/workers/chunks/565358ea8d1bdc4d1ebc.js +0 -1
  217. package/assets/esri/core/workers/chunks/592afe1a41bed3b0cc31.js +0 -1
  218. package/assets/esri/core/workers/chunks/5aeda8a1f2ccabfdf40f.js +0 -1
  219. package/assets/esri/core/workers/chunks/657d9e5145da1306ace8.js +0 -1
  220. package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
  221. package/assets/esri/core/workers/chunks/7f7a81ed8893ab649af7.js +0 -1
  222. package/assets/esri/core/workers/chunks/7ffef8a19166f6b564d8.js +0 -1
  223. package/assets/esri/core/workers/chunks/819781a209608dcdd678.js +0 -1
  224. package/assets/esri/core/workers/chunks/8d57e3a0e5687ce15557.js +0 -1
  225. package/assets/esri/core/workers/chunks/8e9a5d38da40702def80.js +0 -1
  226. package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
  227. package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
  228. package/assets/esri/core/workers/chunks/aac313257a8b1ae75b75.js +0 -1
  229. package/assets/esri/core/workers/chunks/be06c8a58c217a17451b.js +0 -1
  230. package/assets/esri/core/workers/chunks/d56548a994753b08403c.js +0 -1
  231. package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
  232. package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
  233. package/assets/esri/core/workers/chunks/dd95e679618b7b21a7b1.js +0 -1
  234. package/assets/esri/core/workers/chunks/e08a1934d98e7324776d.js +0 -1
  235. package/assets/esri/core/workers/chunks/e5deb72df8b2505fd325.js +0 -1
  236. package/assets/esri/core/workers/chunks/e689a4849f5af3f2f641.js +0 -1
  237. package/assets/esri/core/workers/chunks/f259ad785ce3aa970792.js +0 -1
  238. package/assets/esri/core/workers/chunks/f4919950a9a3703d9da3.js +0 -1
  239. package/assets/esri/core/workers/chunks/f6ce485c082d0d640b01.js +0 -1
  240. package/assets/esri/core/workers/chunks/fd9ef4b8c969962cf72b.js +0 -1
  241. package/layers/support/attributionUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as u}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as s}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function l(t,n,r){return s(t,n,r)}async function y(t,n,r,e,o){const u=n.timeExtent?.isEmpty?{features:[]}:await O(t,n,"json",e,void 0,o);return i(n,r,u),u}async function a(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const s=await f(t,n,e,o);return u(s,r)}function f(t,n,r,e){return O(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):O(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await O(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function d(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await O(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function O(n,r,e,o={},u={},s={}){const i=await E(n,r,e,o,u,s),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function E(t,u,s,i,c={},y={}){const a="string"==typeof t?n(t):t,f=u.geometry?[u.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=u.clone();t.geometry=p.clone(),u=t}const d=o({...a.query,f:s,...j(c,y),...l(u,c,y)});return i={...i,query:{...d,...i.query}},new w(r(a.path,x(u,c)?"query3d":"query"),i)}class w{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{w as RunQueryParameters,y as executeQuery,p as executeQueryForCount,d as executeQueryForExtent,m as executeQueryForIds,a as executeQueryPBF,f as executeQueryPBFBuffer,l as queryToQueryStringParameters,O as runQuery};
5
+ import t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as u}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function a(t,n,r){return u(t,n,r)}async function y(t,n,r,e,o){const s=n.timeExtent?.isEmpty?{features:[]}:await d(t,n,"json",e,void 0,o);return i(n,r,s),s}async function l(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const u=await f(t,n,e,o);return s(u,r)}function f(t,n,r,e){return d(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):d(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await d(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function O(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await d(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;const o="string"==typeof t?t:t.path;if(/\/imageserver\/?$/i.test(o)&&e.hasOwnProperty("count")){const o=await d(t,n,"json",r,{returnExtentOnly:!0});return{count:e.count,extent:o.extent}}if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function d(n,r,e,o={},s={},u={}){const i=await w(n,r,e,o,s,u),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function w(t,s,u,i,c={},y={}){const l="string"==typeof t?n(t):t,f=s.geometry?[s.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=s.clone();t.geometry=p.clone(),s=t}const O=o({...l.query,f:u,...j(c,y),...a(s,c,y)});return i={...i,query:{...O,...i.query}},new E(r(l.path,x(s,c)?"query3d":"query"),i)}class E{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{E as RunQueryParameters,y as executeQuery,p as executeQueryForCount,O as executeQueryForExtent,m as executeQueryForIds,l as executeQueryPBF,f as executeQueryPBFBuffer,a as queryToQueryStringParameters,d as runQuery};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LocateSetting = __esri.LocateSetting;
4
+ export default LocateSetting;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import{enumeration as r}from"../../core/accessorSupport/decorators/enumeration.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import s from"./LocateSettingBase.js";import{linearUnitJsonMap as c}from"./networkEnums.js";let p=class extends s{constructor(o){super(o),this.tolerance=null,this.toleranceUnits=null}};o([t({type:Number,json:{write:!0}})],p.prototype,"tolerance",void 0),o([r(c)],p.prototype,"toleranceUnits",void 0),p=o([e("esri.rest.support.LocateSetting")],p);const a=p;export{a as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LocateSettingBase = __esri.LocateSettingBase;
4
+ export default LocateSettingBase;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import p from"./LocateSettingSource.js";let c=class extends(t(r)){constructor(o){super(o),this.allowAutoRelocate=null,this.sources=null}};o([e({type:Boolean,json:{write:!0}})],c.prototype,"allowAutoRelocate",void 0),o([e({type:[p],json:{write:!0}})],c.prototype,"sources",void 0),c=o([s("esri.rest.support.LocateSettingBase")],c);const l=c;export{l as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LocateSettingSource = __esri.LocateSettingSource;
4
+ export default LocateSettingSource;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends(r(t)){constructor(o){super(o),this.name=null,this.where=null}};o([e({json:{write:!0}})],p.prototype,"name",void 0),o([e({json:{write:!0}})],p.prototype,"where",void 0),p=o([s("esri.rest.support.LocateSettingSource")],p);const c=p;export{c as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LocateSettings = __esri.LocateSettings;
4
+ export default LocateSettings;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import p from"./LocateSetting.js";import i from"./LocateSettingsOverrides.js";let c=class extends(r(t)){constructor(o){super(o),this.default=null,this.overrides=null}};o([e({type:p,json:{write:!0}})],c.prototype,"default",void 0),o([e({type:i,json:{write:!0}})],c.prototype,"overrides",void 0),c=o([s("esri.rest.support.LocateSettings")],c);const a=c;export{a as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LocateSettingsOverrides = __esri.LocateSettingsOverrides;
4
+ export default LocateSettingsOverrides;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as r}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import p from"./LocateSetting.js";import i from"./LocateSettingBase.js";let n=class extends(o(t)){constructor(r){super(r),this.stops=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null}};r([e({type:p,json:{write:!0}})],n.prototype,"stops",void 0),r([e({type:p,json:{name:"barriers",write:!0}})],n.prototype,"pointBarriers",void 0),r([e({type:i,json:{write:!0}})],n.prototype,"polylineBarriers",void 0),r([e({type:i,json:{write:!0}})],n.prototype,"polygonBarriers",void 0),n=r([s("esri.rest.support.LocateSettingsOverrides")],n);const a=n;export{a 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import r from"../../core/Collection.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../core/accessorSupport/ensureType.js";import p from"../../geometry/SpatialReference.js";import{apiKey as u}from"./commonProperties.js";import l from"./DataLayer.js";import a from"./FeatureSet.js";import{impedanceAttributeNameJsonMap as y,restrictionAttributeNameJsonMap as m,directionsLengthUnitJsonMap as c,directionsOutputTypeJsonMap as d,directionsStyleNameJsonMap as v,durationImpedanceAttributeNameJsonMap as w,lengthUnitJsonMap as h,outputLineJsonMap as j,restrictUTurnJsonMap as S}from"./networkEnums.js";import B from"./NetworkFeatureSet.js";import f from"./NetworkUrl.js";import T from"./TravelMode.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as A}from"../../core/accessorSupport/decorators/enumeration.js";var N;let P=class extends(e(o)){static{N=this}constructor(t){super(t),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(t){return s(N,t)}readAccumulateAttributes(t){return null==t?null:t.map(t=>y.fromJSON(t))}writeAccumulateAttributes(t,e,r){t?.length&&(e[r]=t.map(t=>y.toJSON(t)))}writePointBarriers(t,e,r){k(t,e,r)}writePolygonBarrier(t,e,r){k(t,e,r)}writePolylineBarrier(t,e,r){k(t,e,r)}readRestrictionAttributes(t){return null==t?null:t.map(t=>m.fromJSON(t))}writeRestrictionAttributes(t,e,r){t?.length&&(e[r]=t.map(t=>m.toJSON(t)))}readStartTime(t,e){const{startTime:r}=e;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(t,e){null!=t&&(e.startTime="now"===t?"now":t.getTime())}readStops(t,e){return R(e.stops)}writeStops(t,e,r){k(t,e,r)}};function O(t){return t&&"type"in t}function J(t){return t&&"features"in t&&"doNotLocateOnRestrictedElements"in t}function U(t){return t&&"url"in t}function L(t){return t&&"features"in t}function R(t){return O(t)?l.fromJSON(t):U(t)?f.fromJSON(t):J(t)?B.fromJSON(t):L(t)?a.fromJSON(t):null}function k(t,e,o){null!=t&&(e[o]=r.isCollection(t)?{features:t.toArray().map(t=>t.toJSON())}:t.toJSON())}t([i({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],P.prototype,"accumulateAttributes",void 0),t([b("accumulateAttributes")],P.prototype,"readAccumulateAttributes",null),t([g("accumulateAttributes")],P.prototype,"writeAccumulateAttributes",null),t([i(u)],P.prototype,"apiKey",void 0),t([i({json:{write:!0}})],P.prototype,"attributeParameterValues",void 0),t([i({type:String,json:{write:!0}})],P.prototype,"checksum",void 0),t([i({type:String,json:{write:!0}})],P.prototype,"directionsLanguage",void 0),t([A(c)],P.prototype,"directionsLengthUnits",void 0),t([A(d)],P.prototype,"directionsOutputType",void 0),t([A(v)],P.prototype,"directionsStyleName",void 0),t([A(w,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],P.prototype,"directionsTimeAttribute",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"findBestSequence",void 0),t([i({type:Number,json:{write:!0}})],P.prototype,"geometryPrecision",void 0),t([i({type:Number,json:{write:!0}})],P.prototype,"geometryPrecisionM",void 0),t([i({type:Number,json:{write:!0}})],P.prototype,"geometryPrecisionZ",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"ignoreInvalidLocations",void 0),t([A(y,{name:"impedanceAttributeName",ignoreUnknown:!1})],P.prototype,"impedanceAttribute",void 0),t([i({type:Number,json:{write:!0}})],P.prototype,"outputGeometryPrecision",void 0),t([A(h)],P.prototype,"outputGeometryPrecisionUnits",void 0),t([A(j)],P.prototype,"outputLines",void 0),t([i({type:p,json:{name:"outSR",write:!0}})],P.prototype,"outSpatialReference",void 0),t([i({json:{write:!0}})],P.prototype,"overrides",void 0),t([i({json:{name:"barriers",write:!0}})],P.prototype,"pointBarriers",void 0),t([g("pointBarriers")],P.prototype,"writePointBarriers",null),t([i({json:{write:!0}})],P.prototype,"polygonBarriers",void 0),t([g("polygonBarriers")],P.prototype,"writePolygonBarrier",null),t([i({json:{write:!0}})],P.prototype,"polylineBarriers",void 0),t([g("polylineBarriers")],P.prototype,"writePolylineBarrier",null),t([i({type:Boolean,json:{write:!0}})],P.prototype,"preserveFirstStop",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"preserveLastStop",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"preserveObjectID",void 0),t([i({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],P.prototype,"restrictionAttributes",void 0),t([b("restrictionAttributes")],P.prototype,"readRestrictionAttributes",null),t([g("restrictionAttributes")],P.prototype,"writeRestrictionAttributes",null),t([A(S)],P.prototype,"restrictUTurns",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnDirections",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnPolygonBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnPolylineBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnRoutes",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnStops",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnTraversedEdges",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnTraversedJunctions",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnTraversedTurns",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"returnZ",void 0),t([i({json:{write:!0}})],P.prototype,"startTime",void 0),t([b("startTime")],P.prototype,"readStartTime",null),t([g("startTime")],P.prototype,"writeStartTime",null),t([i({type:Boolean,json:{write:!0}})],P.prototype,"startTimeIsUTC",void 0),t([i({json:{write:!0}})],P.prototype,"stops",void 0),t([b("stops")],P.prototype,"readStops",null),t([g("stops")],P.prototype,"writeStops",null),t([i({type:Boolean,json:{write:!0}})],P.prototype,"timeWindowsAreUTC",void 0),t([i({type:T,json:{write:!0}})],P.prototype,"travelMode",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"useHierarchy",void 0),t([i({type:Boolean,json:{write:!0}})],P.prototype,"useTimeWindows",void 0),P=N=t([n("esri.rest.support.RouteParameters")],P);export{P as default};
5
+ import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import r from"../../core/Collection.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../core/accessorSupport/ensureType.js";import p from"../../geometry/SpatialReference.js";import{apiKey as u}from"./commonProperties.js";import l from"./DataLayer.js";import a from"./FeatureSet.js";import y from"./LocateSettings.js";import{impedanceAttributeNameJsonMap as m,restrictionAttributeNameJsonMap as c,directionsLengthUnitJsonMap as d,directionsOutputTypeJsonMap as v,directionsStyleNameJsonMap as w,durationImpedanceAttributeNameJsonMap as h,lengthUnitJsonMap as j,outputLineJsonMap as S,restrictUTurnJsonMap as B}from"./networkEnums.js";import f from"./NetworkFeatureSet.js";import g from"./NetworkUrl.js";import T from"./TravelMode.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{writer as A}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as N}from"../../core/accessorSupport/decorators/enumeration.js";var P;let O=class extends(e(o)){static{P=this}constructor(t){super(t),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.locateSettings=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnEmptyResults=null,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(t){return s(P,t)}readAccumulateAttributes(t){return null==t?null:t.map(t=>m.fromJSON(t))}writeAccumulateAttributes(t,e,r){t?.length&&(e[r]=t.map(t=>m.toJSON(t)))}writePointBarriers(t,e,r){C(t,e,r)}writePolygonBarrier(t,e,r){C(t,e,r)}writePolylineBarrier(t,e,r){C(t,e,r)}readRestrictionAttributes(t){return null==t?null:t.map(t=>c.fromJSON(t))}writeRestrictionAttributes(t,e,r){t?.length&&(e[r]=t.map(t=>c.toJSON(t)))}readStartTime(t,e){const{startTime:r}=e;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(t,e){null!=t&&(e.startTime="now"===t?"now":t.getTime())}readStops(t,e){return k(e.stops)}writeStops(t,e,r){C(t,e,r)}};function R(t){return t&&"type"in t}function J(t){return t&&"features"in t&&"doNotLocateOnRestrictedElements"in t}function L(t){return t&&"url"in t}function U(t){return t&&"features"in t}function k(t){return R(t)?l.fromJSON(t):L(t)?g.fromJSON(t):J(t)?f.fromJSON(t):U(t)?a.fromJSON(t):null}function C(t,e,o){null!=t&&(e[o]=r.isCollection(t)?{features:t.toArray().map(t=>t.toJSON())}:t.toJSON())}t([i({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],O.prototype,"accumulateAttributes",void 0),t([b("accumulateAttributes")],O.prototype,"readAccumulateAttributes",null),t([A("accumulateAttributes")],O.prototype,"writeAccumulateAttributes",null),t([i(u)],O.prototype,"apiKey",void 0),t([i({json:{write:!0}})],O.prototype,"attributeParameterValues",void 0),t([i({type:String,json:{write:!0}})],O.prototype,"checksum",void 0),t([i({type:String,json:{write:!0}})],O.prototype,"directionsLanguage",void 0),t([N(d)],O.prototype,"directionsLengthUnits",void 0),t([N(v)],O.prototype,"directionsOutputType",void 0),t([N(w)],O.prototype,"directionsStyleName",void 0),t([N(h,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],O.prototype,"directionsTimeAttribute",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"findBestSequence",void 0),t([i({type:Number,json:{write:!0}})],O.prototype,"geometryPrecision",void 0),t([i({type:Number,json:{write:!0}})],O.prototype,"geometryPrecisionM",void 0),t([i({type:Number,json:{write:!0}})],O.prototype,"geometryPrecisionZ",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"ignoreInvalidLocations",void 0),t([N(m,{name:"impedanceAttributeName",ignoreUnknown:!1})],O.prototype,"impedanceAttribute",void 0),t([i({type:y,json:{write:!0}})],O.prototype,"locateSettings",void 0),t([i({type:Number,json:{write:!0}})],O.prototype,"outputGeometryPrecision",void 0),t([N(j)],O.prototype,"outputGeometryPrecisionUnits",void 0),t([N(S)],O.prototype,"outputLines",void 0),t([i({type:p,json:{name:"outSR",write:!0}})],O.prototype,"outSpatialReference",void 0),t([i({json:{write:!0}})],O.prototype,"overrides",void 0),t([i({json:{name:"barriers",write:!0}})],O.prototype,"pointBarriers",void 0),t([A("pointBarriers")],O.prototype,"writePointBarriers",null),t([i({json:{write:!0}})],O.prototype,"polygonBarriers",void 0),t([A("polygonBarriers")],O.prototype,"writePolygonBarrier",null),t([i({json:{write:!0}})],O.prototype,"polylineBarriers",void 0),t([A("polylineBarriers")],O.prototype,"writePolylineBarrier",null),t([i({type:Boolean,json:{write:!0}})],O.prototype,"preserveFirstStop",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"preserveLastStop",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"preserveObjectID",void 0),t([i({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],O.prototype,"restrictionAttributes",void 0),t([b("restrictionAttributes")],O.prototype,"readRestrictionAttributes",null),t([A("restrictionAttributes")],O.prototype,"writeRestrictionAttributes",null),t([N(B)],O.prototype,"restrictUTurns",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnDirections",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnEmptyResults",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnPolygonBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnPolylineBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnRoutes",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnStops",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnTraversedEdges",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnTraversedJunctions",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnTraversedTurns",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"returnZ",void 0),t([i({json:{write:!0}})],O.prototype,"startTime",void 0),t([b("startTime")],O.prototype,"readStartTime",null),t([A("startTime")],O.prototype,"writeStartTime",null),t([i({type:Boolean,json:{write:!0}})],O.prototype,"startTimeIsUTC",void 0),t([i({json:{write:!0}})],O.prototype,"stops",void 0),t([b("stops")],O.prototype,"readStops",null),t([A("stops")],O.prototype,"writeStops",null),t([i({type:Boolean,json:{write:!0}})],O.prototype,"timeWindowsAreUTC",void 0),t([i({type:T,json:{write:!0}})],O.prototype,"travelMode",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"useHierarchy",void 0),t([i({type:Boolean,json:{write:!0}})],O.prototype,"useTimeWindows",void 0),O=P=t([n("esri.rest.support.RouteParameters")],O);export{O 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../rest/support/ClassBreaksDefinition.js";import{createGenerateRendererClassBreaks as n}from"../rest/support/generateRendererUtils.js";const t="<Null>",l="equal-interval",i=1,a=5,o=10,u=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,r=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),s=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),c=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?t:e}function d(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,l=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!l}function f(e){const{outStatisticTypes:n}=e,t=e.returnDistinct?[...new Set(e.values)]:e.values,l=t.filter(e=>null!=e).sort(),i=l.length,a={count:i,min:l[0],max:l[i-1]};return e.supportsNullCount&&(a.nullcount=t.length-i),!e.percentileParams||n?.include?.length&&!n.include.includes("median")||n?.exclude?.length&&n.exclude.includes("median")||(a.median=v(t,e.percentileParams)),a}function p(e){const{values:n,useSampleStdDev:t,supportsNullCount:l,outStatisticTypes:i}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,u=null,r=null,s=null,c=null,m=0;const d=null==e.minValue?-1/0:e.minValue,f=null==e.maxValue?1/0:e.maxValue;for(const v of n)Number.isFinite(v)?v>=d&&v<=f&&(u=null===u?v:u+v,a=Math.min(a,v),o=Math.max(o,v),m++):"string"==typeof v&&m++;if(m&&null!=u){r=u/m;let e=0;for(const t of n)Number.isFinite(t)&&t>=d&&t<=f&&(e+=(t-r)**2);c=t?m>1?e/(m-1):0:m>0?e/m:0,s=Math.sqrt(c)}else a=null,o=null;const p={avg:r,count:m,max:o,min:a,stddev:s,sum:u,variance:c};return l&&(p.nullcount=n.length-m),!e.percentileParams||i?.include?.length&&!i.include.includes("median")||i?.exclude?.length&&i.exclude.includes("median")||(p.median=v(n,e.percentileParams)),p}function v(e,n){const{fieldType:t,value:l,orderBy:i,isDiscrete:a}=n,o=g(t,"desc"===i);if(0===(e=[...e].filter(e=>null!=e).sort((e,n)=>o(e,n))).length)return null;if(l<=0)return e[0];if(l>=1)return e[e.length-1];const u=(e.length-1)*l,r=Math.floor(u),s=r+1,c=u%1,m=e[r],d=e[s];return s>=e.length||a||"string"==typeof m||"string"==typeof d?m:m*(1-c)+d*c}function g(e,n){if(e){if(r.has(e))return N(n);if(s.has(e))return D(n,!1);if("esriFieldTypeTimestampOffset"===e)return F(n);const t=D(n,!0);if("esriFieldTypeString"===e)return t;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,n)=>t(M(e),M(n))}const t=n?1:-1,l=N(n),i=D(n,!0),a=x(n);return(e,n)=>"number"==typeof e&&"number"==typeof n?l(e,n):"string"==typeof e&&"string"==typeof n?i(e,n):a(e,n)??t}const h=(e,n)=>null==e?null==n?0:1:null==n?-1:null,T=(e,n)=>null==e?null==n?0:-1:null==n?1:null;function x(e){return e?h:T}const y=(e,n)=>T(e,n)??(e===n?0:new Date(e).getTime()-new Date(n).getTime()),V=(e,n)=>h(e,n)??(e===n?0:new Date(n).getTime()-new Date(e).getTime());function F(e){return e?V:y}const I=(e,n)=>T(e,n)??(e===n?0:e<n?-1:1),b=(e,n)=>h(e,n)??(e===n?0:e<n?1:-1);function D(e,n){if(!n)return e?b:I;const t=x(e);return e?(e,n)=>{const l=t(e,n);return null!=l?l:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const l=t(e,n);return null!=l?l:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}const z=(e,n)=>h(e,n)??n-e,S=(e,n)=>T(e,n)??e-n;function N(e){return e?z:S}function M(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function C(e,n,t){let l;for(l in e)n?.include?.length&&!n.include.includes(l)||n?.exclude?.length&&n.exclude.includes(l)?delete e[l]:c.includes(l)&&(Number.isFinite(e[l])||(e[l]=null));return t?(["avg","stddev","variance"].forEach(n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))}),e):e}function k(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function w(e){return"coded-value"!==e?.type?[]:e.codedValues.map(e=>e.code)}function $(e,n,t,l){const i=e.count,a=[];if(t&&n){const e=[],t=w(n[0]);for(const i of t)if(n[1]){const t=w(n[1]);for(const a of t)if(n[2]){const t=w(n[2]);for(const n of t)e.push(`${m(i)}${l}${m(a)}${l}${m(n)}`)}else e.push(`${m(i)}${l}${m(a)}`)}else e.push(i);for(const n of e)i.hasOwnProperty(n)||(i[n]={data:n,count:0})}for(const o in i){const e=i[o];a.push({value:e.data,count:e.count,label:e.label})}return{uniqueValueInfos:a}}function B(e,n,t,l){let i=null;switch(n){case"log":0!==e&&(i=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(l)&&0!==l&&(i=e/l*100);break;case"field":Number.isFinite(t)&&0!==t&&(i=e/t);break;case"natural-log":e>0&&(i=Math.log(e));break;case"square-root":e>0&&(i=e**.5)}return i}function E(e,t,l){const i=q({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||a});return e=O(e,t.minValue,t.maxValue),n({definition:i,values:e,normalizationTotal:t.normalizationTotal},l)}function O(e,n,t){const l=n??-1/0,i=t??1/0;return e.filter(e=>Number.isFinite(e)&&e>=l&&e<=i)}function q(n){const{breakCount:t,field:a,normalizationField:o,normalizationType:u}=n,r=n.classificationMethod||l,s="standard-deviation"===r?n.standardDeviationInterval||i:void 0,c="defined-interval"===r?n.definedInterval:void 0;return new e({breakCount:t,classificationField:a,classificationMethod:r,normalizationField:"field"===u?o:void 0,normalizationType:u,standardDeviationInterval:s,definedInterval:c})}function P(e,n){let t=e.classBreaks;const l=t.length,i=t[0]?.minValue,a=t[l-1]?.maxValue,o="standard-deviation"===n,r=u;return t=t.map(e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(o&&n){const e=n.match(r),l=e?.map(e=>+e.trim())??[];2===l.length?(t.minStdDev=l[0],t.maxStdDev=l[1],l[0]<0&&l[1]>0&&(t.hasAvg=!0)):1===l.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=l[0]):n.includes(">")&&(t.minStdDev=l[0],t.maxStdDev=null))}return t}),{minValue:i,maxValue:a,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function U(e,n){const t=G(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const l=t.intervals,i=t.min??0,a=t.max??0,o=l.map((e,n)=>({minValue:l[n][0],maxValue:l[n][1],count:0}));for(const u of e)if(null!=u&&u>=i&&u<=a){const e=L(l,u);e>-1&&o[e].count++}return{bins:o,minValue:i,maxValue:a,normalizationTotal:n.normalizationTotal}}function G(e,n,t=!1){const{field:l,classificationMethod:i,standardDeviationInterval:a,definedInterval:u,normalizationType:r,normalizationField:s,normalizationTotal:c,minValue:m,maxValue:f}=n,v=n.numBins||o;let g=null,h=null,T=null;if((!i||"equal-interval"===i)&&!r){if(null!=m&&null!=f)g=m,h=f;else{const n=p({values:e,minValue:m,maxValue:f,useSampleStdDev:!r,supportsNullCount:d({normalizationType:r,normalizationField:s,minValue:m,maxValue:f})});g=n.min??null,h=n.max??null}T=j(g??0,h??0,v)}else{const{classBreaks:n}=E(e,{field:l,normalizationType:r,normalizationField:s,normalizationTotal:c,classificationMethod:i,standardDeviationInterval:a,definedInterval:u,minValue:m,maxValue:f,numClasses:v},null!=m&&null!=f?[m,f]:void 0);g=n[0]?.minValue,h=n[n.length-1]?.maxValue,T=n.map(e=>[e.minValue,e.maxValue])}if(t&&T.length){const e=T.at(-1)[1];T.push([e,e])}return{min:g,max:h,intervals:T}}function L(e,n){let t=-1;for(let l=e.length-1;l>=0;l--){if(n>=e[l][0]){t=l;break}}return t}function j(e,n,t){const l=(n-e)/t,i=[];let a,o=e;for(let u=1;u<=t;u++)a=o+l,a=Number(a.toFixed(16)),i.push([o,u===t?n:a]),o=a;return i}export{L as binIndex,E as calculateClassBreaks,U as calculateHistogram,v as calculatePercentile,p as calculateStatistics,f as calculateStringStatistics,k as calculateUniqueValuesCount,q as createClassBreaksDefinition,$ as createUVResult,g as getAttributeComparator,G as getBinParams,j as getEqualIntervalBins,B as getNormalizedValue,d as isNullCountSupported,m as processNullValue,C as processSummaryStatisticsResult,P as resolveCBResult,c as statisticTypes};
5
+ import e from"../rest/support/ClassBreaksDefinition.js";import{createGenerateRendererClassBreaks as n}from"../rest/support/generateRendererUtils.js";const t="<Null>",l="equal-interval",i=1,a=5,o=10,u=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,r=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),s=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),c=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?t:e}function d(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,l=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!l}function f(e){const{outStatisticTypes:n}=e,t=e.returnDistinct?[...new Set(e.values)]:e.values,l=t.filter(e=>null!=e).sort(),i=l.length,a={count:i,min:l[0],max:l[i-1]};return e.supportsNullCount&&(a.nullcount=t.length-i),!e.percentileParams||n?.include?.length&&!n.include.includes("median")||n?.exclude?.length&&n.exclude.includes("median")||(a.median=v(t,e.percentileParams)),a}function p(e){const{values:n,useSampleStdDev:t,supportsNullCount:l,outStatisticTypes:i}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,u=null,r=null,s=null,c=null,m=0;const d=null==e.minValue?-1/0:e.minValue,f=null==e.maxValue?1/0:e.maxValue;for(const v of n)Number.isFinite(v)?v>=d&&v<=f&&(u=null===u?v:u+v,a=Math.min(a,v),o=Math.max(o,v),m++):"string"==typeof v&&m++;if(m&&null!=u){r=u/m;let e=0;for(const t of n)Number.isFinite(t)&&t>=d&&t<=f&&(e+=(t-r)**2);c=t?m>1?e/(m-1):0:m>0?e/m:0,s=Math.sqrt(c)}else a=null,o=null;const p={avg:r,count:m,max:o,min:a,stddev:s,sum:u,variance:c};return l&&(p.nullcount=n.length-m),!e.percentileParams||i?.include?.length&&!i.include.includes("median")||i?.exclude?.length&&i.exclude.includes("median")||(p.median=v(n,e.percentileParams)),p}function v(e,n){const{fieldType:t,value:l,orderBy:i,isDiscrete:a}=n,o=g(t,"desc"===i,"case-insensitive");if(0===(e=[...e].filter(e=>null!=e).sort((e,n)=>o(e,n))).length)return null;if(l<=0)return e[0];if(l>=1)return e[e.length-1];const u=(e.length-1)*l,r=Math.floor(u),s=r+1,c=u%1,m=e[r],d=e[s];return s>=e.length||a||"string"==typeof m||"string"==typeof d?m:m*(1-c)+d*c}function g(e,n,t="case-sensitive"){if(e){if(r.has(e))return N(n);if(s.has(e))return D(n,!0);if("esriFieldTypeTimestampOffset"===e)return F(n);const l=D(n,"case-sensitive"===t);if("esriFieldTypeString"===e)return l;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,n)=>l(M(e),M(n))}const l=n?1:-1,i=N(n),a=D(n,"case-sensitive"===t),o=x(n);return(e,n)=>"number"==typeof e&&"number"==typeof n?i(e,n):"string"==typeof e&&"string"==typeof n?a(e,n):o(e,n)??l}const h=(e,n)=>null==e?null==n?0:1:null==n?-1:null,T=(e,n)=>null==e?null==n?0:-1:null==n?1:null;function x(e){return e?h:T}const y=(e,n)=>T(e,n)??(e===n?0:new Date(e).getTime()-new Date(n).getTime()),V=(e,n)=>h(e,n)??(e===n?0:new Date(n).getTime()-new Date(e).getTime());function F(e){return e?V:y}const I=(e,n)=>T(e,n)??(e===n?0:e<n?-1:1),b=(e,n)=>h(e,n)??(e===n?0:e<n?1:-1);function D(e,n){if(n)return e?b:I;const t=x(e);return e?(e,n)=>{const l=t(e,n);return null!=l?l:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const l=t(e,n);return null!=l?l:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}const z=(e,n)=>h(e,n)??n-e,S=(e,n)=>T(e,n)??e-n;function N(e){return e?z:S}function M(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function C(e,n,t){let l;for(l in e)n?.include?.length&&!n.include.includes(l)||n?.exclude?.length&&n.exclude.includes(l)?delete e[l]:c.includes(l)&&(Number.isFinite(e[l])||(e[l]=null));return t?(["avg","stddev","variance"].forEach(n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))}),e):e}function k(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function w(e){return"coded-value"!==e?.type?[]:e.codedValues.map(e=>e.code)}function $(e,n,t,l){const i=e.count,a=[];if(t&&n){const e=[],t=w(n[0]);for(const i of t)if(n[1]){const t=w(n[1]);for(const a of t)if(n[2]){const t=w(n[2]);for(const n of t)e.push(`${m(i)}${l}${m(a)}${l}${m(n)}`)}else e.push(`${m(i)}${l}${m(a)}`)}else e.push(i);for(const n of e)i.hasOwnProperty(n)||(i[n]={data:n,count:0})}for(const o in i){const e=i[o];a.push({value:e.data,count:e.count,label:e.label})}return{uniqueValueInfos:a}}function B(e,n,t,l){let i=null;switch(n){case"log":0!==e&&(i=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(l)&&0!==l&&(i=e/l*100);break;case"field":Number.isFinite(t)&&0!==t&&(i=e/t);break;case"natural-log":e>0&&(i=Math.log(e));break;case"square-root":e>0&&(i=e**.5)}return i}function E(e,t,l){const i=q({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||a});return e=O(e,t.minValue,t.maxValue),n({definition:i,values:e,normalizationTotal:t.normalizationTotal},l)}function O(e,n,t){const l=n??-1/0,i=t??1/0;return e.filter(e=>Number.isFinite(e)&&e>=l&&e<=i)}function q(n){const{breakCount:t,field:a,normalizationField:o,normalizationType:u}=n,r=n.classificationMethod||l,s="standard-deviation"===r?n.standardDeviationInterval||i:void 0,c="defined-interval"===r?n.definedInterval:void 0;return new e({breakCount:t,classificationField:a,classificationMethod:r,normalizationField:"field"===u?o:void 0,normalizationType:u,standardDeviationInterval:s,definedInterval:c})}function P(e,n){let t=e.classBreaks;const l=t.length,i=t[0]?.minValue,a=t[l-1]?.maxValue,o="standard-deviation"===n,r=u;return t=t.map(e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(o&&n){const e=n.match(r),l=e?.map(e=>+e.trim())??[];2===l.length?(t.minStdDev=l[0],t.maxStdDev=l[1],l[0]<0&&l[1]>0&&(t.hasAvg=!0)):1===l.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=l[0]):n.includes(">")&&(t.minStdDev=l[0],t.maxStdDev=null))}return t}),{minValue:i,maxValue:a,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function U(e,n){const t=G(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const l=t.intervals,i=t.min??0,a=t.max??0,o=l.map((e,n)=>({minValue:l[n][0],maxValue:l[n][1],count:0}));for(const u of e)if(null!=u&&u>=i&&u<=a){const e=L(l,u);e>-1&&o[e].count++}return{bins:o,minValue:i,maxValue:a,normalizationTotal:n.normalizationTotal}}function G(e,n,t=!1){const{field:l,classificationMethod:i,standardDeviationInterval:a,definedInterval:u,normalizationType:r,normalizationField:s,normalizationTotal:c,minValue:m,maxValue:f}=n,v=n.numBins||o;let g=null,h=null,T=null;if((!i||"equal-interval"===i)&&!r){if(null!=m&&null!=f)g=m,h=f;else{const n=p({values:e,minValue:m,maxValue:f,useSampleStdDev:!r,supportsNullCount:d({normalizationType:r,normalizationField:s,minValue:m,maxValue:f})});g=n.min??null,h=n.max??null}T=j(g??0,h??0,v)}else{const{classBreaks:n}=E(e,{field:l,normalizationType:r,normalizationField:s,normalizationTotal:c,classificationMethod:i,standardDeviationInterval:a,definedInterval:u,minValue:m,maxValue:f,numClasses:v},null!=m&&null!=f?[m,f]:void 0);g=n[0]?.minValue,h=n[n.length-1]?.maxValue,T=n.map(e=>[e.minValue,e.maxValue])}if(t&&T.length){const e=T.at(-1)[1];T.push([e,e])}return{min:g,max:h,intervals:T}}function L(e,n){let t=-1;for(let l=e.length-1;l>=0;l--){if(n>=e[l][0]){t=l;break}}return t}function j(e,n,t){const l=(n-e)/t,i=[];let a,o=e;for(let u=1;u<=t;u++)a=o+l,a=Number(a.toFixed(16)),i.push([o,u===t?n:a]),o=a;return i}export{L as binIndex,E as calculateClassBreaks,U as calculateHistogram,v as calculatePercentile,p as calculateStatistics,f as calculateStringStatistics,k as calculateUniqueValuesCount,q as createClassBreaksDefinition,$ as createUVResult,g as getAttributeComparator,G as getBinParams,j as getEqualIntervalBins,B as getNormalizedValue,d as isNullCountSupported,m as processNullValue,C as processSummaryStatisticsResult,P as resolveCBResult,c as statisticTypes};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const e="20251030",f="f91536cf17797de6f9dd58d0a402a161f5eaecef";export{e as buildDate,f as commitHash};
5
+ const b="20251101",c="fd6f886bb460988067ebbe80c9c9744d241945f7";export{b as buildDate,c as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{UniqueSymbol as e}from"./core.js";import{isSearchCircleOverlapingSymbol as t,tileCoordChangeX as s,tileCoordChangeY as i,GridIndex as l}from"./util.js";class o{static fromSymbols(e,t){let s=e.length;if(s>=n){let i=t;do{i/=2,s/=4}while(s>r&&i>y);const n=new l(t,t,i);for(const t of e)n.getCell(t.xTile,t.yTile).push(t);return new o(t,e,n)}return new o(t,e,null)}constructor(e,t,s){this.tileCoordRange=e,this._symbols=t,this._index=s}addSymbols(e){for(const t of e)this._symbols.push(t);if(this._index)for(const t of e)this._index.getCell(t.xTile,t.yTile).push(t)}removeSymbols(e){const t=new Set(e);if(this._symbols=this._symbols.filter(e=>!t.has(e)),this._index)for(const s of this._index.cells)for(let e=0;e<s.length;e++)s[e]=s[e].filter(e=>!t.has(e))}getSymbols(){return this._symbols}getCandidate(e,t,s,i){if(!this._index){for(const l of this._symbols)if(s===l.hash&&Math.abs(e-l.xTile)<=i&&Math.abs(t-l.yTile)<=i)return l;return null}const l=this._index.getCellSpan(e-i,t-i,e+i,t+i),[o,n,r,y]=l;for(let a=n;a<=y;a++)for(let l=o;l<=r;l++){const o=this._index.cells[a][l];for(const l of o)if(s===l.hash&&Math.abs(e-l.xTile)<=i&&Math.abs(t-l.yTile)<=i)return l}return null}}const n=32,r=8,y=64,a=20;class u{constructor(e,t){this.tileCoordRange=e,this._visibleTiles=t,this._indexMapByTile=new Map,this._uniqueSymbolsByStyleLayerId=new Map}get uniqueSymbols(){return null==this._uniqueSymbolLayerArray&&(this._uniqueSymbolLayerArray=this._createUniqueSymbolLayerArray()),this._uniqueSymbolLayerArray}registerVectorTile(e,t){const s=this._ensureIndexMap(e),i=t?.values()??s.keys();for(const l of i){const e=s.get(l);e&&(this._removeSymbols(l,e.getSymbols()),s.delete(l))}this._addSymbols(e.key,s,e.symbols),this._invalidate()}unregisterVectorTile(e){this._removeTile(e),this._invalidate()}registerFeatureTile(e){this._ensureIndexMap(e),this._invalidate()}unregisterFeatureTile(e){this._removeTile(e),this._invalidate()}insertFeatureTileMetrics(e,t){const s=this._indexMapByTile.get(e);if(!s)throw new Error(`tile ${e.id} not registered!`);this._addSymbols(e.key,s,h(t)),this._invalidate()}removeFeatureTileMetrics(e,t){const s=this._indexMapByTile.get(e);if(!s)return;const i=h(t);for(const[l,o]of s.entries()){const e=i.get(l);e&&(o.removeSymbols(e),this._removeSymbols(l,e))}this._invalidate()}deleteStyleLayers(e){for(const t of this._indexMapByTile.values())for(const s of e){const e=t.get(s);e&&(this._removeSymbols(s,e.getSymbols()),t.delete(s))}this._invalidate()}querySymbols(e,s,i,l){const o=[];for(const[n,r]of this._uniqueSymbolsByStyleLayerId.entries())for(const l of r){const r=l.tileSymbols.find(e=>e.selectedForRendering);r&&t(r,e,s*(window.devicePixelRatio||1),i)&&o.push({vtlSymbol:r,styleLayerUID:n,tileKey:r.tile.key})}return o}_ensureIndexMap(e){let t=this._indexMapByTile.get(e);return t||(t=new Map,this._indexMapByTile.set(e,t)),t}_invalidate(){this._uniqueSymbolLayerArray=null}_addSymbols(e,t,s){for(const[i,l]of s){let e=t.get(i);e?e.addSymbols(l):(e=o.fromSymbols(l,this.tileCoordRange),t.set(i,e))}this._updateUniqueSymbols(e,s)}_removeTile(e){const t=this._indexMapByTile.get(e);if(t){for(const[e,s]of t.entries())this._removeSymbols(e,s.getSymbols());this._indexMapByTile.delete(e),this._invalidate()}}_removeSymbols(e,t){for(const s of t){const t=s.uniqueSymbol;if(t){if(t.tileSymbols=t.tileSymbols.filter(e=>e!==s),0===t.tileSymbols.length){const s=this._uniqueSymbolsByStyleLayerId.get(e);s.delete(t),0===s.size&&this._uniqueSymbolsByStyleLayerId.delete(e)}s.uniqueSymbol=null}}}_updateUniqueSymbols(t,s){if(0!==s.size){for(const e of this._visibleTiles)e.parentTile||e.key.world!==t.world||e.key.level===t.level&&!e.key.equals(t)||this._matchSymbols(e,t,s);for(const[t,i]of s)for(const s of i)if(!s.uniqueSymbol){s.uniqueSymbol=new e(s);let i=this._uniqueSymbolsByStyleLayerId.get(t);i||(i=new Set,this._uniqueSymbolsByStyleLayerId.set(t,i)),i.add(s.uniqueSymbol)}}}_matchSymbols(e,t,l){if(e.key.level>t.level){const s=e.key.level-t.level;if(e.key.row>>s!==t.row||e.key.col>>s!==t.col)return}if(t.level>e.key.level){const s=t.level-e.key.level;if(t.row>>s!==e.key.row||t.col>>s!==e.key.col)return}const o=new Map;for(const[n,r]of l){const l=[],y=(e.key.level<t.level?1:1<<e.key.level-t.level)+a,u=this._indexMapByTile.get(e),h=u?.get(n);if(h)for(const o of r){if(o.uniqueSymbol)continue;const n=s(this.tileCoordRange,o.xTile,t,e.key),r=i(this.tileCoordRange,o.yTile,t,e.key),u=-a,c=this.tileCoordRange+a;if(!(n>=u&&n<c&&r>=u&&r<c)){l.push(o);continue}const f=h.getCandidate(n,r,o.hash,y),m=f?.uniqueSymbol;m?(o.uniqueSymbol=m,m.tileSymbols.push(o)):l.push(o)}l.length>0&&o.set(n,l)}for(const s of e.childrenTiles||[])this._matchSymbols(s,t,o)}_createUniqueSymbolLayerArray(){const e=this._uniqueSymbolsByStyleLayerId,t=new Array(e.size);let s,i=0;for(const[l,o]of e){const e=new Array(o.size);s=0;for(const t of o)e[s++]=t;t[i]={styleLayerUID:l,uniqueSymbols:e},i++}return t}}function h(e){const t=new Map;for(const s of e){const e=s.labelClassId;let i=t.get(e);i||(i=[],t.set(e,i)),i.push(s)}return t}export{u as SymbolRepository};
5
+ import{UniqueSymbol as e}from"./core.js";import{isSearchCircleOverlapingSymbol as t,tileCoordChangeX as s,tileCoordChangeY as i,GridIndex as l}from"./util.js";class o{static fromSymbols(e,t){let s=e.length;if(s>=n){let i=t;do{i/=2,s/=4}while(s>r&&i>y);const n=new l(t,t,i);for(const t of e)n.getCell(t.xTile,t.yTile).push(t);return new o(t,e,n)}return new o(t,e,null)}constructor(e,t,s){this.tileCoordRange=e,this._symbols=t,this._index=s}addSymbols(e){for(const t of e)this._symbols.push(t);if(this._index)for(const t of e)this._index.getCell(t.xTile,t.yTile).push(t)}removeSymbols(e){const t=new Set(e);if(this._symbols=this._symbols.filter(e=>!t.has(e)),this._index)for(const s of this._index.cells)for(let e=0;e<s.length;e++)s[e]=s[e].filter(e=>!t.has(e))}getSymbols(){return this._symbols}getCandidate(e,t,s,i){if(!this._index){for(const l of this._symbols)if(s===l.hash&&Math.abs(e-l.xTile)<=i&&Math.abs(t-l.yTile)<=i)return l;return null}const l=this._index.getCellSpan(e-i,t-i,e+i,t+i),[o,n,r,y]=l;for(let a=n;a<=y;a++)for(let l=o;l<=r;l++){const o=this._index.cells[a][l];for(const l of o)if(s===l.hash&&Math.abs(e-l.xTile)<=i&&Math.abs(t-l.yTile)<=i)return l}return null}}const n=32,r=8,y=64,a=20;class u{constructor(e,t){this.tileCoordRange=e,this._visibleTiles=t,this._indexMapByTile=new Map,this._uniqueSymbolsByStyleLayerId=new Map}get uniqueSymbols(){return null==this._uniqueSymbolLayerArray&&(this._uniqueSymbolLayerArray=this._createUniqueSymbolLayerArray()),this._uniqueSymbolLayerArray}registerVectorTile(e,t){const s=this._ensureIndexMap(e),i=t?.values()??s.keys();for(const l of i){const e=s.get(l);e&&(this._removeSymbols(l,e.getSymbols()),s.delete(l))}this._addSymbols(e.key,s,e.symbols),this._invalidate()}unregisterVectorTile(e){this._removeTile(e),this._invalidate()}registerFeatureTile(e){this._ensureIndexMap(e),this._invalidate()}unregisterFeatureTile(e){this._removeTile(e),this._invalidate()}insertFeatureTileMetrics(e,t){const s=this._indexMapByTile.get(e);if(!s)throw new Error(`tile ${e.id} not registered!`);this._addSymbols(e.key,s,h(t)),this._invalidate()}removeFeatureTileMetrics(e,t){const s=this._indexMapByTile.get(e);if(!s)return;const i=h(t);for(const[l,o]of s.entries()){const e=i.get(l);e&&(o.removeSymbols(e),this._removeSymbols(l,e))}this._invalidate()}deleteStyleLayers(e){for(const t of this._indexMapByTile.values())for(const s of e){const e=t.get(s);e&&(this._removeSymbols(s,e.getSymbols()),t.delete(s))}this._invalidate()}querySymbols(e,s,i,l){const o=[];for(const[n,r]of this._uniqueSymbolsByStyleLayerId.entries())for(const l of r){const r=l.tileSymbols.find(e=>e.selectedForRendering);r&&t(r,e,s*(window.devicePixelRatio||1),i)&&o.push({vtlSymbol:r,styleLayerUID:n,tileKey:r.tile.key})}return o}_ensureIndexMap(e){let t=this._indexMapByTile.get(e);return t||(t=new Map,this._indexMapByTile.set(e,t)),t}_invalidate(){this._uniqueSymbolLayerArray=null}_addSymbols(e,t,s){for(const[i,l]of s){let e=t.get(i);e?e.addSymbols(l):(e=o.fromSymbols(l,this.tileCoordRange),t.set(i,e))}this._updateUniqueSymbols(e,s)}_removeTile(e){const t=this._indexMapByTile.get(e);if(t){for(const[e,s]of t.entries())this._removeSymbols(e,s.getSymbols());this._indexMapByTile.delete(e),this._invalidate()}}_removeSymbols(e,t){for(const s of t){const t=s.uniqueSymbol;if(t){if(t.tileSymbols=t.tileSymbols.filter(e=>e!==s),0===t.tileSymbols.length){const s=this._uniqueSymbolsByStyleLayerId.get(e);s.delete(t),0===s.size&&this._uniqueSymbolsByStyleLayerId.delete(e)}s.uniqueSymbol=null}}}_updateUniqueSymbols(t,s){if(0!==s.size){for(const e of this._visibleTiles)e.parentTile||e.key.world!==t.world||e.key.level===t.level&&!e.key.equals(t)||this._matchSymbols(e,t,s);for(const[t,i]of s)for(const s of i)if(!s.uniqueSymbol){s.uniqueSymbol=new e(s);let i=this._uniqueSymbolsByStyleLayerId.get(t);i||(i=new Set,this._uniqueSymbolsByStyleLayerId.set(t,i)),i.add(s.uniqueSymbol)}}}_matchSymbols(e,t,l){if(e.key.level>t.level){const s=e.key.level-t.level;if(e.key.row>>s!==t.row||e.key.col>>s!==t.col)return}if(t.level>e.key.level){const s=t.level-e.key.level;if(t.row>>s!==e.key.row||t.col>>s!==e.key.col)return}const o=new Map;for(const[n,r]of l){const l=[],y=e.key.level<t.level?1:1<<Math.abs(e.key.level-t.level),u=this._indexMapByTile.get(e),h=u?.get(n);if(h)for(const o of r){if(o.uniqueSymbol)continue;const n=s(this.tileCoordRange,o.xTile,t,e.key),r=i(this.tileCoordRange,o.yTile,t,e.key),u=-a,c=this.tileCoordRange+a;if(!(n>=u&&n<c&&r>=u&&r<c)){l.push(o);continue}const f=h.getCandidate(n,r,o.hash,y),m=f?.uniqueSymbol;m?(o.uniqueSymbol=m,m.tileSymbols.push(o)):l.push(o)}l.length>0&&o.set(n,l)}for(const s of e.childrenTiles||[])this._matchSymbols(s,t,o)}_createUniqueSymbolLayerArray(){const e=this._uniqueSymbolsByStyleLayerId,t=new Array(e.size);let s,i=0;for(const[l,o]of e){const e=new Array(o.size);s=0;for(const t of o)e[s++]=t;t[i]={styleLayerUID:l,uniqueSymbols:e},i++}return t}}function h(e){const t=new Map;for(const s of e){const e=s.labelClassId;let i=t.get(e);i||(i=[],t.set(e,i)),i.push(s)}return t}export{u as SymbolRepository};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const e={background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n}","background.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n}"},circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nvoid main()\n{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include <util/util.glsl>\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nuniform highp int u_isStencilPass;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump flaot v_halo_width;\n#endif\nconst float alphaCutoff = 1.0 / 255.5;\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\nif (u_isStencilPass == 1 && texColor.a < alphaCutoff) {\ndiscard;\n}\ngl_FragColor = v_opacity * texColor;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\nv_tex = a_tex.xy / u_mosaicSize;\n}"},line:{"line.frag":"precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include <util/encoding.glsl>\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n}","line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n}"},outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\nvoid main()\n{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\nvoid main()\n{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}};export{e as default};
5
+ const e={background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n}","background.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n}"},circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nvoid main()\n{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include <util/util.glsl>\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nuniform highp int u_isStencilPass;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nconst float alphaCutoff = 1.0 / 255.5;\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\nif (u_isStencilPass == 1 && texColor.a < alphaCutoff) {\ndiscard;\n}\ngl_FragColor = v_opacity * texColor;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\nv_tex = a_tex.xy / u_mosaicSize;\n}"},line:{"line.frag":"precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include <util/encoding.glsl>\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n}","line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n}"},outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\nvoid main()\n{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\nvoid main()\n{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}};export{e 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import{when as r}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import a from"../GroundView.js";import{isIntegratedMeshLayerView as s}from"../support/layerViewUtils.js";let o=class extends(t(a)){constructor(){super(...arguments),this._integratedMeshElevationUpdateHandles=new Map}initialize(){super.initialize(),this.addHandles(r(()=>this._terrainSurface,e=>e.on("elevation-change",e=>this._elevationChange(e))));const e=this._integratedMeshElevationUpdateHandles;this.addHandles(this.view.allLayerViews.on("change",t=>{t.added.forEach(t=>{s(t)&&e.set(t,t.elevationProvider.on("elevation-change",e=>this._elevationChange(e)))}),t.removed.forEach(t=>{s(t)&&(e.get(t)?.remove(),e.delete(t))})}))}destroy(){this._integratedMeshElevationUpdateHandles.forEach(e=>e.remove()),this._integratedMeshElevationUpdateHandles.clear()}_elevationChange(e){this.emit("elevation-change",e)}get _integratedMeshGroundLayerView(){const e=this.ground?.integratedMeshGround;if(e)return this.view.basemapView?.groundLayerViews.find(t=>t.layer===e)}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return this._terrainSurface?.enabled??!1}get _usingIntegratedMesh(){return this._integratedMeshGroundLayerView?.visible??!1}get spatialReference(){return this._terrainSurface?.spatialReference}intersect(e,t,r,n){this._usingTerrain&&this._terrainSurface?.intersect(e,t,r,n);for(const i of this._integratedMeshElevationUpdateHandles.keys())i.intersect(e,t,r,n)}get updating(){return!this.suspended&&((this._source?.updating??!1)||this.layerViews.some(({updating:e})=>e))}getElevation(e,t,r,n){return this._elevationProvider?.getElevation(e,t,r,n)}getElevations(e,t,r){const{_elevationProvider:n}=this;if(n?.getElevations)return n.getElevations(e,t,r);for(let i=0;i<t;++i)r(i,null)}getSphereElevationBounds(e,t,r){return this._elevationProvider?.getSphereElevationBounds?.(e,t)}getRootElevationBounds(){return this._elevationProvider?.getRootElevationBounds?.()}get _elevationProvider(){return this._usingIntegratedMesh?this._integratedMeshGroundLayerView?.elevationProvider:this._terrainSurface}get elevationQueryCache(){return this._usingTerrain?this._terrainSurface?.elevationQueryCache:null}get extentAABR(){return this._terrainSurface?.extent}get suspended(){return this._source?.suspended??!1}get ready(){return this._source?.ready??!0}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}get _source(){return this._usingTerrain?this._terrainSurface:this._usingIntegratedMesh?this._integratedMeshGroundLayerView:null}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([n({readOnly:!0})],o.prototype,"_integratedMeshGroundLayerView",null),e([n({readOnly:!0})],o.prototype,"_terrainSurface",null),e([n({readOnly:!0})],o.prototype,"_usingTerrain",null),e([n({readOnly:!0})],o.prototype,"_usingIntegratedMesh",null),e([n({readOnly:!0})],o.prototype,"spatialReference",null),e([n({type:Boolean,readOnly:!0})],o.prototype,"updating",null),e([n({readOnly:!0})],o.prototype,"elevationQueryCache",null),e([n({readOnly:!0})],o.prototype,"extentAABR",null),e([n({readOnly:!0})],o.prototype,"suspended",null),e([n({readOnly:!0})],o.prototype,"ready",null),o=e([i("esri.views.3d.GroundView3D")],o);export{o as GroundView3D};
5
+ import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import{when as r}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import a from"../GroundView.js";import{isIntegratedMeshLayerView as s}from"../support/layerViewUtils.js";let o=class extends(t(a)){constructor(){super(...arguments),this._integratedMeshElevationUpdateHandles=new Map}initialize(){super.initialize(),this.addHandles(r(()=>this._terrainSurface,e=>e.on("elevation-change",e=>this._elevationChange(e))));const e=this._integratedMeshElevationUpdateHandles;this.addHandles(this.view.allLayerViews.on("change",t=>{t.added.forEach(t=>{s(t)&&e.set(t,t.elevationProvider.on("elevation-change",e=>this._elevationChange(e)))}),t.removed.forEach(t=>{s(t)&&(e.get(t)?.remove(),e.delete(t))})}))}destroy(){this._integratedMeshElevationUpdateHandles.forEach(e=>e.remove()),this._integratedMeshElevationUpdateHandles.clear()}_elevationChange(e){this.emit("elevation-change",e)}get _integratedMeshGroundLayerView(){const e=this.ground?.integratedMeshGround;if(e)return this.view.basemapView?.groundLayerViews.find(t=>t.layer===e)}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return this._terrainSurface?.enabled??!1}get _usingIntegratedMesh(){return this._integratedMeshGroundLayerView?.visible??!1}get spatialReference(){return this._terrainSurface?.spatialReference}intersect(e,t,r,n){this._usingTerrain&&this._terrainSurface?.intersect(e,t,r,n);for(const i of this._integratedMeshElevationUpdateHandles.keys())i.intersect(e,t,r,n)}get updating(){return!this.suspended&&((this._source?.updating??!1)||this.layerViews.some(({updating:e})=>e))}getElevation(e,t,r,n){return this._elevationProvider?.getElevation(e,t,r,n)}getElevations(e,t,r){const{_elevationProvider:n}=this;if(n?.getElevations)return n.getElevations(e,t,r);for(let i=0;i<t;++i)r(i,null)}getSphereElevationRange(e,t,r){return this._elevationProvider?.getSphereElevationRange?.(e,t)}getRootElevationRange(){return this._elevationProvider?.getRootElevationRange?.()}get _elevationProvider(){return this._usingIntegratedMesh?this._integratedMeshGroundLayerView?.elevationProvider:this._terrainSurface}get elevationQueryCache(){return this._usingTerrain?this._terrainSurface?.elevationQueryCache:null}get extentAABR(){return this._terrainSurface?.extent}get suspended(){return this._source?.suspended??!1}get ready(){return this._source?.ready??!0}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}get _source(){return this._usingTerrain?this._terrainSurface:this._usingIntegratedMesh?this._integratedMeshGroundLayerView:null}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([n({readOnly:!0})],o.prototype,"_integratedMeshGroundLayerView",null),e([n({readOnly:!0})],o.prototype,"_terrainSurface",null),e([n({readOnly:!0})],o.prototype,"_usingTerrain",null),e([n({readOnly:!0})],o.prototype,"_usingIntegratedMesh",null),e([n({readOnly:!0})],o.prototype,"spatialReference",null),e([n({type:Boolean,readOnly:!0})],o.prototype,"updating",null),e([n({readOnly:!0})],o.prototype,"elevationQueryCache",null),e([n({readOnly:!0})],o.prototype,"extentAABR",null),e([n({readOnly:!0})],o.prototype,"suspended",null),e([n({readOnly:!0})],o.prototype,"ready",null),o=e([i("esri.views.3d.GroundView3D")],o);export{o as GroundView3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{property as n,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{d as o,n as s,j as a,i as c}from"../../../../chunks/vec32.js";import{create as l,clone as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{create as u,copy as d,fromPoints as f}from"../../../../geometry/support/ray.js";import{sv2d as g}from"../../../../geometry/support/vectorStacks.js";import{LineOfSightIntersectionResult as y,lineOfSightIntersectionContextGround as w,LineOfSightIntersectionContextGraphic as h}from"./LineOfSightIntersectionResult.js";import{fromScreen as j}from"../../support/geometryUtils/ray.js";import{isTerrainIntersectorResult as v,isIntegratedMeshIntersectorResult as I}from"../../terrain/Intersector.js";import{Intersector as P}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as b}from"../../webgl-engine/lib/intersectorUtilsConversions.js";let x=class extends t{constructor(e){super(e),this._terrainIntersectionOptionsLayerUids=new Set(["terrain"])}initialize(){this.intersector=new P(this.view.state.viewingMode),this.intersector.options.hud=!1,this.intersector.options.store=0}getScreenPointIntersection(e){const t=r(e,g.get()),n=j(this.view.state.camera,t,L);return this._getRayIntersection(n)}_getRayIntersection(e,t){const{view:r,intersector:n}=this;if(null==e||null==r.sceneIntersectionHelper)return null;n.options.store=0,r.sceneIntersectionHelper.intersectToolIntersectorRay(e,n,t);const i=n.results.min;if(null==i.target)return null;const o=l();if(!i.getIntersectionPoint(o))return null;if(null!=t?.maxDistance&&!i.withinDistance(t.maxDistance))return null;const s=r.renderCoordsHelper.fromRenderCoords(o,new p({spatialReference:r.spatialReference})),a=m(i.normal);if(v(i))return new y({context:w,id:i.target.lij.slice(),mapPoint:s,renderPoint:o,normal:a,ray:d(e)});if(I(r,i))return new y({context:w,id:`${i.target.layerViewUid}`,mapPoint:s,renderPoint:o,normal:a,ray:d(e)});const c=b(i,r);if(null!=c){const{layer:t}=c,r=c.getObjectId()??c.uid;return new y({context:new h(c),id:`${t?.uid}/${r}`,mapPoint:s,renderPoint:o,normal:a,ray:d(e)})}const u="layerViewUid"in i.target?`${i.target.layerViewUid}`:"";return new y({context:null,id:u,mapPoint:s,renderPoint:o,normal:a,ray:d(e)})}updateFromGroundIntersection(e,t,r){const n=R,i=U,l=S,p=O;o(i,e),this.view.renderCoordsHelper.worldUpAtPosition(i,l),s(l,l);const u=this.view.basemapTerrain.visibleElevationBounds,d=(t>=0?1:-1)*((u?Math.abs(u.max-u.min):100)+Math.abs(t));a(p,l,d),c(n,i,p),f(n,i,L);const g=this._getRayIntersection(L,{include:this._terrainIntersectionOptionsLayerUids,maxDistance:d});if(null!=g){const e=O;return a(e,l,t),c(r,g.renderPoint,e),m(g.normal)}return o(r,e),null}};e([n()],x.prototype,"view",void 0),e([n()],x.prototype,"intersector",void 0),x=e([i("esri.views.3d.analysis.LineOfSight.LineOfSightRayIntersector")],x);const R=l(),U=l(),S=l(),O=l(),L=u();export{x as LineOfSightRayIntersector};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{property as n,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{d as o,n as s,j as a,i as c}from"../../../../chunks/vec32.js";import{create as l,clone as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{create as u,copy as d,fromPoints as f}from"../../../../geometry/support/ray.js";import{sv2d as g}from"../../../../geometry/support/vectorStacks.js";import{LineOfSightIntersectionResult as y,lineOfSightIntersectionContextGround as w,LineOfSightIntersectionContextGraphic as h}from"./LineOfSightIntersectionResult.js";import{fromScreen as v}from"../../support/geometryUtils/ray.js";import{isTerrainIntersectorResult as j,isIntegratedMeshIntersectorResult as I}from"../../terrain/Intersector.js";import{Intersector as P}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as b}from"../../webgl-engine/lib/intersectorUtilsConversions.js";let x=class extends t{constructor(e){super(e),this._terrainIntersectionOptionsLayerUids=new Set(["terrain"])}initialize(){this.intersector=new P(this.view.state.viewingMode),this.intersector.options.hud=!1,this.intersector.options.store=0}getScreenPointIntersection(e){const t=r(e,g.get()),n=v(this.view.state.camera,t,L);return this._getRayIntersection(n)}_getRayIntersection(e,t){const{view:r,intersector:n}=this;if(null==e||null==r.sceneIntersectionHelper)return null;n.options.store=0,r.sceneIntersectionHelper.intersectToolIntersectorRay(e,n,t);const i=n.results.min;if(null==i.target)return null;const o=l();if(!i.getIntersectionPoint(o))return null;if(null!=t?.maxDistance&&!i.withinDistance(t.maxDistance))return null;const s=r.renderCoordsHelper.fromRenderCoords(o,new p({spatialReference:r.spatialReference})),a=m(i.normal);if(j(i))return new y({context:w,id:i.target.lij.slice(),mapPoint:s,renderPoint:o,normal:a,ray:d(e)});if(I(r,i))return new y({context:w,id:`${i.target.layerViewUid}`,mapPoint:s,renderPoint:o,normal:a,ray:d(e)});const c=b(i,r);if(null!=c){const{layer:t}=c,r=c.getObjectId()??c.uid;return new y({context:new h(c),id:`${t?.uid}/${r}`,mapPoint:s,renderPoint:o,normal:a,ray:d(e)})}const u="layerViewUid"in i.target?`${i.target.layerViewUid}`:"";return new y({context:null,id:u,mapPoint:s,renderPoint:o,normal:a,ray:d(e)})}updateFromGroundIntersection(e,t,r){const n=R,i=U,l=S,p=O;o(i,e),this.view.renderCoordsHelper.worldUpAtPosition(i,l),s(l,l);const u=this.view.basemapTerrain.visibleElevationRange,d=(t>=0?1:-1)*((u?Math.abs(u.maxElevation-u.minElevation):100)+Math.abs(t));a(p,l,d),c(n,i,p),f(n,i,L);const g=this._getRayIntersection(L,{include:this._terrainIntersectionOptionsLayerUids,maxDistance:d});if(null!=g){const e=O;return a(e,l,t),c(r,g.renderPoint,e),m(g.normal)}return o(r,e),null}};e([n()],x.prototype,"view",void 0),e([n()],x.prototype,"intersector",void 0),x=e([i("esri.views.3d.analysis.LineOfSight.LineOfSightRayIntersector")],x);const R=l(),U=l(),S=l(),O=l(),L=u();export{x as LineOfSightRayIntersector};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Logger.js";import{removeMaybe as s}from"../../../core/maybe.js";import{watch as i,syncAndInitial as r}from"../../../core/reactiveUtils.js";import{convertUnit as a}from"../../../core/units.js";import{property as n,subclass as o}from"../../../core/accessorSupport/decorators.js";import{fromValues as l}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{isCompatible as h}from"../../../geometry/support/heightModelInfoUtils.js";import{isPlateCarree as u,isWebMercator as d,equals as c}from"../../../geometry/support/spatialReferenceUtils.js";import{getHeightModelInfoFromVCS as m}from"../../../layers/support/tiles3DUtils.js";import{getElevationOffsetInMeters as f}from"../../../support/elevationInfoUtils.js";import{getMetersPerUnit as p}from"../../../symbols/support/unitConversionUtils.js";import{GaussianSplatLayerViewPerformanceInfo as y}from"./GaussianSplatLayerViewPerformanceInfo.js";import{LayerView3D as _}from"./LayerView3D.js";import{addLayerViewToWasm as g,getLyr3DWasm as w,removeLayerViewFromWasm as b}from"./Lyr3DWasm.js";import{Obb as v}from"../support/orientedBoundingBox.js";import{splatPageSizeInU32 as M,elementsPerSplatPage as C,packedGaussianSizeInU32 as S,splatPageSizeInU32WithoutHeader as x,gaussiansPerSplatPage as U,splatAtlasTextureWidth as V}from"../support/gaussianSplatting/GaussianSplatAtlasPages.js";import{GaussianTile as j}from"../support/gaussianSplatting/GaussianTile.js";import{GaussianSplatRenderNode as A}from"../webgl-engine/lib/GaussianSplatRenderNode.js";import I from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as L,isInEffectiveScaleRange as R}from"../../support/layerViewUtils.js";const E=()=>t.getLogger("esri.views.3d.layers.GaussianSPlatLayerView3D");let H=class extends(_(I)){constructor(e){super(e),this.type="gaussian-splat-3d",this._gaussianTileHandles=new Map,this._pageBuffer=new Uint32Array(M),this._wasmLayerId=-1,this._metersPerVCSUnit=1,this.ignoresMemoryFactor=!1,this._usedMemory=0,this._cacheMemory=0,this._useEsriCrs=!1,this.fullExtentInLocalViewSpatialReference=null,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer);const{view:t}=e;this._memCache=t.resourceController.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e)),this._renderNode=new A({view:t})}initialize(){if(!this._canProjectWithoutEngine())throw L("layer",this.layer.spatialReference.wkid,this.view.renderSpatialReference?.wkid);const e=g(this).then(e=>{this._wasmLayerId=e,this.addHandles([i(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=i(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),r)});this.addResolvingPromise(e)}get wasmLayerId(){return this._wasmLayerId}get metersPerVCSUnit(){return this._metersPerVCSUnit}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this._renderNode.data.isUpdating())}updatingFlagChanged(){this.notifyChange("updating")}get _wasm(){return w(this.view)}get usedMemory(){return this._usedMemory}get unloadedMemory(){return 0}get cachedMemory(){return this._cacheMemory}get useEsriCrs(){return this._useEsriCrs}async createRenderable(e){const t=e.meshData;if(null==t.data)throw new Error("meshData.data undefined");if(t.desc=JSON.parse(t.desc),null==t.desc)throw new Error("meshData.desc undefined");const s=t.desc.prims[0],i=s.vertexCount,r=s.atrbs[0].view,a=s.atrbs[0].view.byteCount,n=s.atrbs[0].view.byteOffset;let o=null;if("U32"!==r.type)return E().warnOnce("unexpected meshData.data format"),{memUsageBytes:0};o=new Uint32Array(t.data.buffer,n,a/4);const h=this.extractHeader(o),u=Math.ceil(i/U),d=new Uint32Array(i),c=[];for(let l=0;l<u;l++){let e=this._data.textureAtlas.requestPage();if(null===e&&(this._freeInvisibleTiles(),e=this._data.textureAtlas.requestPage()),null===e)return E().warnOnce("ran out of gaussian splat memory"),{memUsageBytes:0};{c.push(e);const t=i-l*U,s=Math.min(t,U),r=l*U;for(let i=0;i<s;i++)d[i+r]=i+C*e;const a=l*x;this._pageBuffer.set(o.subarray(a,a+s*S)),this._pageBuffer.set(h.packedHeader,x);const n=e*C,u=n%V,m=Math.floor(n/V);this._data.textureAtlas.update(u,m,this._pageBuffer)}}const m=new Float64Array(3*i),f=new Float64Array(i),p=2.048,y=h.tileOrigin.x*p,_=h.tileOrigin.y*p,g=h.tileOrigin.z*p,w=h.invPosScale;let b=0,M=0;for(let l=0;l<i;l++){const e=l*S,{rawX:t,rawY:s,rawZ:i}=this._extractGaussianPosition(o,e),r=this._extractGaussianSphericalScale(o,e);m[b]=t*w+y,m[b+1]=s*w+_,m[b+2]=i*w+g,f[l]=r*r,M=Math.max(M,r),b+=3}let A=null;if(t.desc.obb){const e=t.desc.obb.quaternion;A=new v(t.desc.obb.center,t.desc.obb.halfSize,l(...e))}A||(E().warnOnce("encountered tile without a bounding box"),A=new v);const I=new j(e.handle,A,d,c,m,f,M);return this._memCache.put(`${I.handle}`,I),this._gaussianTileHandles.set(e.handle,I),this._cacheMemory+=I.usedMemory,{memUsageBytes:I.usedMemory}}_extractGaussianPosition(e,t){const s=e[t+1];return{rawX:16383&s,rawY:s>>>14&16383,rawZ:s>>>28&15|(1023&e[t+2])<<4}}_extractGaussianSphericalScale(e,t){const s=e[t+2],i=s>>>10&255,r=s>>>18&255,a=s>>>26&63|(3&e[t+3])<<6,n=Math.exp(i/16-10),o=Math.exp(r/16-10),l=Math.exp(a/16-10);return Math.max(n,o,l)}freeRenderable(e){const t=this._gaussianTileHandles.get(e);t&&(t.isVisible?this._usedMemory-=t.usedMemory:this._cacheMemory-=t.usedMemory,t.pageIds.forEach(e=>this._data.textureAtlas.freePage(e)),this.freeObject(t),this._gaussianTileHandles.delete(e)),this._updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}get visibleAtCurrentScale(){return R(this.layer.effectiveScaleRange,this.view.scale)}setRenderableVisibility(e,t,s){for(let i=0;i<s;i++){if(!t[i])continue;const s=e[i],r=this._gaussianTileHandles.get(s);if(r){if(r.isVisible)continue;r.isVisible=!0,this._usedMemory+=r.usedMemory,this._cacheMemory-=r.usedMemory,this._memCache.pop(`${s}`)}}for(let i=0;i<s;i++){if(t[i])continue;const s=e[i],r=this._gaussianTileHandles.get(s);if(r){if(!r.isVisible)continue;r.isVisible=!1,this._usedMemory-=r.usedMemory,this._cacheMemory+=r.usedMemory,this._memCache.put(`${s}`,r)}}this._updateGaussians()}destroy(){b(this),this._suspendedHandle&&(this._suspendedHandle=s(this._suspendedHandle)),this._renderNode.destroy(),this._memCache.destroy()}_canProjectWithoutEngine(){if(1===this.view.state.viewingMode)return!0;if(u(this.view.renderSpatialReference)||d(this.view.renderSpatialReference))return!0;if(this.layer.esriCrsSpatialReference&&c(this.layer.esriCrsSpatialReference,this.view.renderSpatialReference)){const e=m(this.layer.esriCrsSpatialReference),t=this.view.heightModelInfo;return this._useEsriCrs=0===h(e,t,!1),this._useEsriCrs&&e&&(this._metersPerVCSUnit=a(1,"meters",e.heightUnit),this.fullExtentInLocalViewSpatialReference=this.layer.esriCrsFullExtent),this._useEsriCrs}return!1}_elevationInfoChanged(e){if(e?.offset)if(this._useEsriCrs){const t=p(e?.unit)/this._metersPerVCSUnit,s=e?.offset??0;this._wasm?.setLayerOffset(this,s*t)}else this._wasm?.setLayerOffset(this,f(e));else this._wasm?.setLayerOffset(this,0)}_updateGaussians(){const e=new Array;for(const t of this._gaussianTileHandles.values())t.isVisible&&e.push(t);this._data.updateGaussianVisibility(e),this.notifyChange("updating")}_freeInvisibleTiles(){for(const e of this._gaussianTileHandles.values())e.isVisible||this._deleteTile(e)}get _data(){return this._renderNode.data}extractHeader(e){const t=e.length-4,s=this.reinterpretU32AsFloat(e[t]),i=this.reinterpretU32AsFloat(e[t+1]),r=this.reinterpretU32AsFloat(e[t+2]),a=1/(1<<(255&e[t+3]));return{packedHeader:e.subarray(t,t+4),tileOrigin:{x:s,y:i,z:r},invPosScale:a}}_deleteTile(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}get performanceInfo(){let e=0,t=0;return this._gaussianTileHandles.forEach(s=>{s.isVisible?e++:t++}),new y(this.usedMemory,e,t,this.cachedMemory)}};e([n()],H.prototype,"layer",void 0),e([n()],H.prototype,"fullExtentInLocalViewSpatialReference",void 0),e([n({readOnly:!0})],H.prototype,"visibleAtCurrentScale",null),H=e([o("esri.views.3d.layers.GaussianSplatLayerView3D")],H);const P=H;export{P as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Logger.js";import{removeMaybe as s}from"../../../core/maybe.js";import{watch as i,syncAndInitial as r}from"../../../core/reactiveUtils.js";import{convertUnit as a}from"../../../core/units.js";import{property as n,subclass as o}from"../../../core/accessorSupport/decorators.js";import{fromValues as l}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{isCompatible as h}from"../../../geometry/support/heightModelInfoUtils.js";import{isPlateCarree as d,isWebMercator as u,equals as p}from"../../../geometry/support/spatialReferenceUtils.js";import{getHeightModelInfoFromVCS as c}from"../../../layers/support/tiles3DUtils.js";import{getElevationOffsetInMeters as f}from"../../../support/elevationInfoUtils.js";import{getMetersPerUnit as m}from"../../../symbols/support/unitConversionUtils.js";import{GaussianSplatLayerViewPerformanceInfo as y}from"./GaussianSplatLayerViewPerformanceInfo.js";import{LayerView3D as _}from"./LayerView3D.js";import{addLayerViewToWasm as g,getLyr3DWasm as w,removeLayerViewFromWasm as b}from"./Lyr3DWasm.js";import{Obb as v}from"../support/orientedBoundingBox.js";import{splatPageSizeInU32 as C,elementsPerSplatPage as M,packedGaussianSizeInU32 as S,splatPageSizeInU32WithoutHeader as H,gaussiansPerSplatPage as x,splatAtlasTextureWidth as U}from"../support/gaussianSplatting/GaussianSplatAtlasPages.js";import{GaussianSplatFadeHelper as V}from"../support/gaussianSplatting/GaussianSplatFadeHelper.js";import{GaussianTile as j}from"../support/gaussianSplatting/GaussianTile.js";import{GaussianSplatRenderNode as A}from"../webgl-engine/lib/GaussianSplatRenderNode.js";import I from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as L,isInEffectiveScaleRange as R}from"../../support/layerViewUtils.js";const E=()=>t.getLogger("esri.views.3d.layers.GaussianSPlatLayerView3D");let O=class extends(_(I)){constructor(e){super(e),this.type="gaussian-splat-3d",this.ignoresMemoryFactor=!1,this._tileHandles=new Map,this._pageBuffer=new Uint32Array(C),this._wasmLayerId=-1,this._metersPerVCSUnit=1,this._usedMemory=0,this._cacheMemory=0,this._useEsriCrs=!1,this.fullExtentInLocalViewSpatialReference=null,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer);const{view:t}=e;this._memCache=t.resourceController.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e)),this._fadeHelper=new V(this),this._renderNode=new A({view:t,fadeHelper:this._fadeHelper})}initialize(){if(!this._canProjectWithoutEngine())throw L("layer",this.layer.spatialReference.wkid,this.view.renderSpatialReference?.wkid);const e=g(this).then(e=>{this._wasmLayerId=e,this.addHandles([i(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=i(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),r)});this.addHandles([i(()=>this.view.qualitySettings.fadeDuration,e=>{this._fadeHelper.onFadeDurationChanged(e),this.data.fadingTexture.updateTexture(this.data.textureAtlas.pageAllocator.pageCount)})]),this.addResolvingPromise(e)}get wasmLayerId(){return this._wasmLayerId}get metersPerVCSUnit(){return this._metersPerVCSUnit}get tileHandles(){return this._tileHandles}get _wasm(){return w(this.view)}get usedMemory(){return this._usedMemory}get cachedMemory(){return this._cacheMemory}get unloadedMemory(){return 0}get useEsriCrs(){return this._useEsriCrs}get data(){return this._renderNode.data}get visibleAtCurrentScale(){return R(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this._renderNode.data.isUpdating()||this._fadeHelper.isUpdating())}updatingFlagChanged(){this.notifyChange("updating")}async createRenderable(e){const t=e.meshData;if(null==t.data)throw new Error("meshData.data undefined");if(t.desc=JSON.parse(t.desc),null==t.desc)throw new Error("meshData.desc undefined");const s=t.desc.prims[0],i=s.vertexCount,r=s.atrbs[0].view,a=s.atrbs[0].view.byteCount,n=s.atrbs[0].view.byteOffset;let o=null;if("U32"!==r.type)return E().warnOnce("unexpected meshData.data format"),{memUsageBytes:0};o=new Uint32Array(t.data.buffer,n,a/4);const h=this.extractHeader(o),d=Math.ceil(i/x),u=new Uint32Array(i),p=[];for(let l=0;l<d;l++){let e=this.data.textureAtlas.requestPage();if(null===e&&(this._freeInvisibleTiles(),e=this.data.textureAtlas.requestPage()),null===e)return E().warnOnce("ran out of gaussian splat memory"),{memUsageBytes:0};{p.push(e);const t=i-l*x,s=Math.min(t,x),r=l*x;for(let i=0;i<s;i++)u[i+r]=i+M*e;const a=l*H;this._pageBuffer.set(o.subarray(a,a+s*S)),this._pageBuffer.set(h.packedHeader,H);const n=e*M,d=n%U,c=Math.floor(n/U);this.data.textureAtlas.update(d,c,this._pageBuffer)}}const c=new Float64Array(3*i),f=new Float64Array(i),m=2.048,y=h.tileOrigin.x*m,_=h.tileOrigin.y*m,g=h.tileOrigin.z*m,w=h.invPosScale;let b=0,C=0;for(let l=0;l<i;l++){const e=l*S,{rawX:t,rawY:s,rawZ:i}=this._extractGaussianPosition(o,e),r=this._extractGaussianSphericalScale(o,e);c[b]=t*w+y,c[b+1]=s*w+_,c[b+2]=i*w+g,f[l]=r*r,C=Math.max(C,r),b+=3}let V=null;if(t.desc.obb){const e=t.desc.obb.quaternion;V=new v(t.desc.obb.center,t.desc.obb.halfSize,l(...e))}V||(E().warnOnce("encountered tile without a bounding box"),V=new v);const A=new j(e.handle,V,u,p,c,f,C);return this._memCache.put(`${A.handle}`,A),this._tileHandles.set(e.handle,A),this._cacheMemory+=A.usedMemory,{memUsageBytes:A.usedMemory}}_extractGaussianPosition(e,t){const s=e[t+1];return{rawX:16383&s,rawY:s>>>14&16383,rawZ:s>>>28&15|(1023&e[t+2])<<4}}_extractGaussianSphericalScale(e,t){const s=e[t+2],i=s>>>10&255,r=s>>>18&255,a=s>>>26&63|(3&e[t+3])<<6,n=Math.exp(i/16-10),o=Math.exp(r/16-10),l=Math.exp(a/16-10);return Math.max(n,o,l)}freeRenderable(e){const t=this._tileHandles.get(e);t&&(t.isVisible&&!this._fadeHelper.isTileFadingOut(t)?this._usedMemory-=t.usedMemory:this._cacheMemory-=t.usedMemory,t.pageIds.forEach(e=>this.data.textureAtlas.freePage(e)),this.freeObject(t),this._tileHandles.delete(e)),this.updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}setRenderableVisibility(e,t,s){for(let i=0;i<s;i++){if(!t[i])continue;const s=e[i],r=this._tileHandles.get(s);r&&(r.isVisible&&!this._fadeHelper.isTileFadingOut(r)||(r.isVisible=!0,this._fadeHelper.isTileFadingOut(r)||this._popTileFromCache(r),this._fadeHelper.fadeTile(r,0)))}for(let i=0;i<s;i++){if(t[i])continue;const s=e[i],r=this._tileHandles.get(s);r&&r.isVisible&&this._fadeHelper.fadeTile(r,1)}this.updateGaussians()}_popTileFromCache(e){this._usedMemory+=e.usedMemory,this._cacheMemory-=e.usedMemory,this._memCache.pop(`${e.handle}`)}moveTileToCache(e){this._usedMemory-=e.usedMemory,this._cacheMemory+=e.usedMemory,this._memCache.put(`${e.handle}`,e)}destroy(){b(this),this._suspendedHandle&&(this._suspendedHandle=s(this._suspendedHandle)),this._renderNode.destroy(),this._memCache.destroy()}_canProjectWithoutEngine(){if(1===this.view.state.viewingMode)return!0;if(d(this.view.renderSpatialReference)||u(this.view.renderSpatialReference))return!0;if(this.layer.esriCrsSpatialReference&&p(this.layer.esriCrsSpatialReference,this.view.renderSpatialReference)){const e=c(this.layer.esriCrsSpatialReference),t=this.view.heightModelInfo;return this._useEsriCrs=0===h(e,t,!1),this._useEsriCrs&&e&&(this._metersPerVCSUnit=a(1,"meters",e.heightUnit),this.fullExtentInLocalViewSpatialReference=this.layer.esriCrsFullExtent),this._useEsriCrs}return!1}_elevationInfoChanged(e){if(e?.offset)if(this._useEsriCrs){const t=m(e?.unit)/this._metersPerVCSUnit,s=e?.offset??0;this._wasm?.setLayerOffset(this,s*t)}else this._wasm?.setLayerOffset(this,f(e));else this._wasm?.setLayerOffset(this,0)}updateGaussians(){const e=new Array;for(const t of this._tileHandles.values())t.isVisible&&e.push(t);this.data.updateGaussianVisibility(e),this.notifyChange("updating")}_freeInvisibleTiles(){for(const e of this._tileHandles.values())e.isVisible||this._deleteTile(e)}extractHeader(e){const t=e.length-4,s=this.reinterpretU32AsFloat(e[t]),i=this.reinterpretU32AsFloat(e[t+1]),r=this.reinterpretU32AsFloat(e[t+2]),a=1/(1<<(255&e[t+3]));return{packedHeader:e.subarray(t,t+4),tileOrigin:{x:s,y:i,z:r},invPosScale:a}}_deleteTile(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}get performanceInfo(){let e=0,t=0;return this._tileHandles.forEach(s=>{s.isVisible?e++:t++}),new y(this.usedMemory,e,t,this.cachedMemory)}};e([n()],O.prototype,"layer",void 0),e([n({readOnly:!0})],O.prototype,"visibleAtCurrentScale",null),e([n()],O.prototype,"fullExtentInLocalViewSpatialReference",void 0),O=e([o("esri.views.3d.layers.GaussianSplatLayerView3D")],O);const P=O;export{P as default};