@agrotools1/at-components 0.3.4 → 0.3.5

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 (895) hide show
  1. package/dist/AGraphicContainer-b6e32ab3.js +109 -0
  2. package/dist/APIKeyMixin-83218bd5.js +19 -0
  3. package/dist/Analysis-8c5616ab.js +31 -0
  4. package/dist/ArcGISCachedService-8da73861.js +47 -0
  5. package/dist/ArcGISService-1e7483eb.js +25 -0
  6. package/dist/AreaMeasurement2D-ee78c5ab.js +405 -0
  7. package/dist/AreaMeasurement3D-098fd9ea.js +488 -0
  8. package/dist/AttachmentInfo-1b2ece0a.js +34 -0
  9. package/dist/AttachmentQuery-470d5a03.js +18 -0
  10. package/dist/AttributeStore-f80857be.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-a5f201d7.js +63 -0
  12. package/dist/BingMapsLayer-4c95d39c.js +112 -0
  13. package/dist/Bitmap-d7c41f66.js +128 -0
  14. package/dist/BitmapContainer-af419f59.js +23 -0
  15. package/dist/BlendLayer-ced1717f.js +13 -0
  16. package/dist/BoundsStore-030e1112.js +63 -0
  17. package/dist/BufferObject-6f0ccf08.js +100 -0
  18. package/dist/BufferView-83825b1b.js +683 -0
  19. package/dist/BuildingSceneLayer-67d67dd9.js +535 -0
  20. package/dist/Button-b96d4e96.js +36 -0
  21. package/dist/CSVLayer-0d54cccb.js +208 -0
  22. package/dist/CSVSourceWorker-00c7e147.js +367 -0
  23. package/dist/CatalogDynamicGroupLayerView2D-e1b747eb.js +66 -0
  24. package/dist/CatalogFootprintLayerView2D-4d654b8c.js +76 -0
  25. package/dist/CatalogLayer-fdcebf46.js +262 -0
  26. package/dist/CatalogLayerView2D-d872dec4.js +52 -0
  27. package/dist/ClassBreaksDefinition-0f6902fe.js +18 -0
  28. package/dist/ColorMaterial.glsl-0f79d1d3.js +64 -0
  29. package/dist/ColorSet-1f170190.js +45 -0
  30. package/dist/ColorStop-81b2ebbf.js +29 -0
  31. package/dist/Container-5cca9103.js +521 -0
  32. package/dist/CustomParametersMixin-fa9fc8f5.js +12 -0
  33. package/dist/DefaultMaterial.glsl-ea170d90.js +42 -0
  34. package/dist/DefaultMaterial_COLOR_GAMMA-e9199fb6.js +653 -0
  35. package/dist/DefaultTheme-e76e0ce4.js +130 -0
  36. package/dist/DeleteForwardEditsParameters-114413db.js +18 -0
  37. package/dist/DimensionLayer-5caa9d6d.js +129 -0
  38. package/dist/DirectLineMeasurement3D-6d3a316a.js +449 -0
  39. package/dist/DistanceMeasurement2D-7090d647.js +303 -0
  40. package/dist/DoubleArray-40bc6f82.js +25 -0
  41. package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +17 -17
  42. package/dist/Dropdown/Dropdown.core.d.ts +6 -4
  43. package/dist/Dropdown/Dropdown.types.d.ts +1 -1
  44. package/dist/EdgeProcessingWorker-94aed8c4.js +63 -0
  45. package/dist/EditBusLayer-dcf477a3.js +107 -0
  46. package/dist/ElevationInfo-a456026a.js +56 -0
  47. package/dist/ElevationLayer-6061b8f4.js +129 -0
  48. package/dist/ElevationQuery-ec17e2cc.js +598 -0
  49. package/dist/ElevationSamplerWorker-beaaeaeb.js +62 -0
  50. package/dist/ExportImageParameters-56040230.js +66 -0
  51. package/dist/ExportStrategy-7d1b4a0c.js +93 -0
  52. package/dist/ExportWMSImageParameters-0b3d33ed.js +33 -0
  53. package/dist/External-9a57bcf0.js +110 -0
  54. package/dist/FeatureCollectionSnappingSource-b589f9ce.js +130 -0
  55. package/dist/FeatureCommandQueue-d1572e0d.js +1244 -0
  56. package/dist/FeatureEffect-20d94762.js +39 -0
  57. package/dist/FeatureEffectLayer-017997f2.js +13 -0
  58. package/dist/FeatureFilter-73c8c240.js +27 -0
  59. package/dist/FeatureLayer-ecf9f4ea.js +693 -0
  60. package/dist/FeatureLayerBase-1ffc64a0.js +148 -0
  61. package/dist/FeatureLayerSource-0acdac77.js +444 -0
  62. package/dist/FeatureLayerView2D-6f0d2580.js +1967 -0
  63. package/dist/FeaturePipelineWorker-77d06d4f.js +3633 -0
  64. package/dist/FeatureReductionLayer-203415cc.js +225 -0
  65. package/dist/FeatureReductionSelection-4ba3cfda.js +22 -0
  66. package/dist/FeatureServiceSnappingSource-90c5e877.js +481 -0
  67. package/dist/FeatureServiceSnappingSourceWorker-9f33d320.js +747 -0
  68. package/dist/FeatureSet-29d82bc9.js +188 -0
  69. package/dist/FeatureStore-9d48217b.js +131 -0
  70. package/dist/FeatureTemplate-79cf9cb6.js +12 -0
  71. package/dist/FeatureType-30eece24.js +25 -0
  72. package/dist/FieldsIndex-7d8f3589.js +109 -0
  73. package/dist/Filter/components/Filter.types.d.ts +17 -0
  74. package/dist/Filter/index.d.ts +4 -0
  75. package/dist/Filter/tests/mocks.d.ts +6 -0
  76. package/dist/FormTemplate-18b193a8.js +350 -0
  77. package/dist/GeoJSONLayer-d2677013.js +236 -0
  78. package/dist/GeoJSONSourceWorker-4571c9d5.js +247 -0
  79. package/dist/GeoRSSLayer-320f17b2.js +73 -0
  80. package/dist/GeoRSSLayerView2D-4683eb47.js +140 -0
  81. package/dist/GeometryUtils-b855940e.js +403 -0
  82. package/dist/GraphicContainer-9bd07fb2.js +26 -0
  83. package/dist/GraphicManipulator-e96e9aa3.js +1499 -0
  84. package/dist/GraphicsLayer-964ed1f0.js +38 -0
  85. package/dist/GraphicsLayerView2D-83766b4b.js +114 -0
  86. package/dist/GraphicsSnappingSource-0bf5350b.js +273 -0
  87. package/dist/GraphicsView2D-3103ed12.js +620 -0
  88. package/dist/GroupLayer-2c099630.js +147 -0
  89. package/dist/GroupLayerView2D-abb8b6d5.js +98 -0
  90. package/dist/HUDMaterial.glsl-6e206016.js +65 -0
  91. package/dist/HighlightCounter-1d4774e1.js +41 -0
  92. package/dist/HighlightGraphicContainer-de26900b.js +18 -0
  93. package/dist/I3SBinaryReader-63c12e1b.js +310 -0
  94. package/dist/I3SLayerDefinitions-d0aa8265.js +55 -0
  95. package/dist/I3SUtil-277467e8.js +59 -0
  96. package/dist/IdentityManager-a1b54522.js +899 -0
  97. package/dist/ImageHistogramParameters-47cf0f1b.js +905 -0
  98. package/dist/ImageryLayer-89c92097.js +1799 -0
  99. package/dist/ImageryLayerView2D-e0c5549a.js +352 -0
  100. package/dist/ImageryTileLayer-c38364f3.js +2157 -0
  101. package/dist/ImageryTileLayerView2D-f659a87c.js +1110 -0
  102. package/dist/Indices-29975728.js +67 -0
  103. package/dist/Input/Input.core.d.ts +1 -1
  104. package/dist/Input/index.d.ts +1 -1
  105. package/dist/IntegratedMesh3DTilesLayer-8b851e87.js +112 -0
  106. package/dist/IntegratedMeshLayer-9ed738ba.js +141 -0
  107. package/dist/InteractiveAnalysisViewModel-c95e13c5.js +7397 -0
  108. package/dist/InterleavedLayout-f5e6ee23.js +163 -0
  109. package/dist/KMLLayer-3662a890.js +162 -0
  110. package/dist/KMLLayerView2D-3d172b6a.js +253 -0
  111. package/dist/KnowledgeGraphLayerView2D-086160b5.js +43 -0
  112. package/dist/LRUCache-948c7d75.js +32 -0
  113. package/dist/LabelClass-c0694878.js +135 -0
  114. package/dist/LabelMetric-39280634.js +400 -0
  115. package/dist/LaserlinePath.glsl-205f0e8a.js +64 -0
  116. package/dist/Laserlines.glsl-6f09c43e.js +65 -0
  117. package/dist/LayerFloorInfo-308449b6.js +15 -0
  118. package/dist/LayerView-2b3b1a70.js +206 -0
  119. package/dist/LercWorker-b007ee29.js +157 -0
  120. package/dist/LineOfSightLayer-99b48ebf.js +147 -0
  121. package/dist/LinkChartLayer-d69e2e36.js +1027 -0
  122. package/dist/List/components/List.d.ts +74 -0
  123. package/dist/List/components/List.types.d.ts +11 -0
  124. package/dist/List/index.d.ts +4 -0
  125. package/dist/List/tests/mocks.d.ts +7 -0
  126. package/dist/Lyr3DWorker-2fdd578b.js +82 -0
  127. package/dist/MagnifierPrograms-5042ccad.js +806 -0
  128. package/dist/MapImageLayer-f3e35db3.js +169 -0
  129. package/dist/MapImageLayerView2D-98cfaffb.js +146 -0
  130. package/dist/MapNotesLayer-6942570f.js +283 -0
  131. package/dist/MapNotesLayerView2D-b641bba4.js +161 -0
  132. package/dist/MapServiceLayerViewHelper-9111fb4f.js +288 -0
  133. package/dist/MeasurementWidgetContent-a66f382a.js +2642 -0
  134. package/dist/MediaLayer-585e1067.js +523 -0
  135. package/dist/MediaLayerView2D-74d90bf4.js +332 -0
  136. package/dist/MemCache-1532e921.js +227 -0
  137. package/dist/MemorySourceWorker-ba059303.js +222 -0
  138. package/dist/Mesh-43d631db.js +980 -0
  139. package/dist/MeshLocalVertexSpace-f9cc6881.js +19 -0
  140. package/dist/MultiOriginJSONSupport-ec8788e6.js +158 -0
  141. package/dist/OGCFeatureLayer-5e327659.js +211 -0
  142. package/dist/OGCFeatureLayerView2D-d0104fdc.js +82 -0
  143. package/dist/ObjectStack-2d389b76.js +21 -0
  144. package/dist/Octree-1dba17ba.js +495 -0
  145. package/dist/OpenStreetMapLayer-dc083119.js +30 -0
  146. package/dist/OperationalLayer-d43d80b1.js +44 -0
  147. package/dist/OrderByInfo-26301234.js +16 -0
  148. package/dist/OrderedLayer-36fe0e60.js +26 -0
  149. package/dist/OrientedImageryLayer-21689d88.js +216 -0
  150. package/dist/OverlayCompositing.glsl-f80836ca.js +65 -0
  151. package/dist/OverrideHelper-880a7e09.js +242 -0
  152. package/dist/PBFDecoderWorker-b5f6d890.js +213 -0
  153. package/dist/PointCloudLayer-899f6a49.js +197 -0
  154. package/dist/PointCloudUniqueValueRenderer-8a477087.js +115 -0
  155. package/dist/PointCloudWorker-4bea79e8.js +212 -0
  156. package/dist/PooledRBush-df73bc2a.js +272 -0
  157. package/dist/Popup-e01092b4.js +3990 -0
  158. package/dist/PortalLayer-daca6a23.js +126 -0
  159. package/dist/Program-8b1e5f48.js +694 -0
  160. package/dist/ProgramTemplate-e4360f44.js +35 -0
  161. package/dist/QueryEngine-ca1511e3.js +896 -0
  162. package/dist/QueryTask-c9fa71fa.js +119 -0
  163. package/dist/RasterSymbolizer-1644d7a7.js +3024 -0
  164. package/dist/RasterVFDisplayObject-7ec19876.js +581 -0
  165. package/dist/RasterWorker-2d320094.js +78 -0
  166. package/dist/RawBlockCache-86e6c5d3.js +185 -0
  167. package/dist/RealisticTree.glsl-65abf4e9.js +42 -0
  168. package/dist/RefreshableLayer-a0708abb.js +80 -0
  169. package/dist/RefreshableLayerView-2b6aca24.js +16 -0
  170. package/dist/Relationship-ef9ae528.js +64 -0
  171. package/dist/RelationshipQuery-8a39148b.js +22 -0
  172. package/dist/RenderingContext-e718bfed.js +889 -0
  173. package/dist/RibbonLine.glsl-e82fb3bb.js +65 -0
  174. package/dist/RouteLayer-06ecd24a.js +786 -0
  175. package/dist/RouteLayerView2D-26c96396.js +195 -0
  176. package/dist/SDFHelper-70cff23b.js +140 -0
  177. package/dist/SSAO.glsl-54f15911.js +43 -0
  178. package/dist/SSAOBlur.glsl-cbd829bc.js +42 -0
  179. package/dist/ScaleRangeLayer-dc6d9c0e.js +21 -0
  180. package/dist/SceneLayer-255b45af.js +542 -0
  181. package/dist/SceneLayerSnappingSource-8969a32e.js +218 -0
  182. package/dist/SceneLayerSnappingSourceWorker-17673240.js +112 -0
  183. package/dist/SceneLayerWorker-46a764a8.js +164 -0
  184. package/dist/SceneService-bbc3f4e5.js +215 -0
  185. package/dist/Scheduler-e3ad50f2.js +373 -0
  186. package/dist/Search/Search.d.ts +11 -0
  187. package/dist/Select/Multiple/Select.multiple.d.ts +1 -1
  188. package/dist/Select/Select.core.d.ts +1 -1
  189. package/dist/Select/index.d.ts +1 -1
  190. package/dist/ShadedColorMaterial.glsl-8e194f81.js +64 -0
  191. package/dist/SnappingOperation-d12c0cd0.js +48 -0
  192. package/dist/SourceLayerData-054d8bb6.js +116 -0
  193. package/dist/SpatialFilter-ba146c95.js +1701 -0
  194. package/dist/Stop-38c9a9d4.js +281 -0
  195. package/dist/StreamLayer-9d300b87.js +188 -0
  196. package/dist/StreamLayerView2D-d80b90e9.js +164 -0
  197. package/dist/StyleRepository-e8c44bab.js +2212 -0
  198. package/dist/SublayersOwner-469b921a.js +545 -0
  199. package/dist/SubtypeGroupLayer-e467307a.js +514 -0
  200. package/dist/SubtypeGroupLayerView2D-41ed7e6f.js +84 -0
  201. package/dist/TableConfig/TableConfig.d.ts +6 -6
  202. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  203. package/dist/TechniqueInstance-9c0d4dcf.js +233 -0
  204. package/dist/TemporalLayer-011ac13a.js +23 -0
  205. package/dist/Texture-b28260ca.js +501 -0
  206. package/dist/TextureOnly.glsl-87d0e898.js +65 -0
  207. package/dist/Theme-bf54db6d.js +3426 -0
  208. package/dist/Tick-5be5a637.js +723 -0
  209. package/dist/TileContainer-09ca940a.js +31 -0
  210. package/dist/TileInfoTilemapCache-26485a76.js +38 -0
  211. package/dist/TileLayer-b0580f1d.js +194 -0
  212. package/dist/TileLayerView2D-e4561937.js +187 -0
  213. package/dist/TilemapCache-d2163c80.js +189 -0
  214. package/dist/TimeInfo-68d2df8b.js +42 -0
  215. package/dist/TimeOnly-bb600899.js +706 -0
  216. package/dist/Tooltip-927072f3.js +138 -0
  217. package/dist/TopFeaturesQuery-77f00fe7.js +32 -0
  218. package/dist/TurboLine-87dd880a.js +565 -0
  219. package/dist/UniqueValueRenderer-56a91680.js +1039 -0
  220. package/dist/UnknownLayer-6b7b3c5d.js +30 -0
  221. package/dist/UnknownTimeZone-e62caf07.js +15 -0
  222. package/dist/UnsupportedLayer-16a90c0a.js +31 -0
  223. package/dist/UpdateTracking2D-bf4e8a89.js +8566 -0
  224. package/dist/Util-6762e3c9.js +57 -0
  225. package/dist/VectorTileLayer-3c42b01b.js +544 -0
  226. package/dist/VectorTileLayerView2D-3af619aa.js +2108 -0
  227. package/dist/Version-9c75ca2b.js +33 -0
  228. package/dist/VertexArrayObject-e736d4c8.js +73 -0
  229. package/dist/VertexColor.glsl-69e78e7a.js +2683 -0
  230. package/dist/VertexSnappingCandidate-10823eb3.js +13 -0
  231. package/dist/VideoLayerView2D-68e687b0.js +124 -0
  232. package/dist/VoxelLayer-76005caf.js +631 -0
  233. package/dist/WFSLayer-398b281f.js +221 -0
  234. package/dist/WFSSourceWorker-7506acff.js +157 -0
  235. package/dist/WGLContainer-f2c4f5da.js +5426 -0
  236. package/dist/WMSLayer-6fbfc745.js +536 -0
  237. package/dist/WMSLayerView2D-63dda194.js +117 -0
  238. package/dist/WMTSLayer-6492359f.js +531 -0
  239. package/dist/WMTSLayerView2D-5daae3fe.js +142 -0
  240. package/dist/WebTileLayer-5f7595df.js +110 -0
  241. package/dist/WhereClause-a8fc45da.js +2766 -0
  242. package/dist/WorkerHandle-11931750.js +47 -0
  243. package/dist/WorkerTileHandler-b53b5efc.js +1539 -0
  244. package/dist/action-b5c3b319.js +198 -0
  245. package/dist/action-group-01e02696.js +145 -0
  246. package/dist/action-menu-e0ddae4e.js +1759 -0
  247. package/dist/apng-9d467a98.js +392 -0
  248. package/dist/arcade-71dc610e.js +229 -0
  249. package/dist/arcadeAsyncRuntime-146d9fb6.js +943 -0
  250. package/dist/arcadeUtils-f7ed3399.js +8741 -0
  251. package/dist/arcgis-knowledge-client-core-b8fef5b0.js +1218 -0
  252. package/dist/arcgis-knowledge-client-core-simd-d54c7150.js +1218 -0
  253. package/dist/arcgisLayers-8d42568b.js +152 -0
  254. package/dist/associatedFeatureServiceUtils-c50f28e9.js +92 -0
  255. package/dist/axisAngleDegrees-ea89c136.js +49 -0
  256. package/dist/basis_transcoder-39fbc6ae.js +1248 -0
  257. package/dist/calcite-action-264e28ab.js +22 -0
  258. package/dist/calcite-action-bar-6ec66445.js +303 -0
  259. package/dist/calcite-action-group-85d021dc.js +28 -0
  260. package/dist/calcite-button-8a5af2ce.js +228 -0
  261. package/dist/calcite-flow-9b5e43fd.js +128 -0
  262. package/dist/calcite-flow-item-0089f891.js +499 -0
  263. package/dist/calcite-icon-c20a8db7.js +16 -0
  264. package/dist/calcite-input-24e48df5.js +24 -0
  265. package/dist/calcite-label-9e4dcb66.js +79 -0
  266. package/dist/calcite-list-711dcec1.js +2135 -0
  267. package/dist/calcite-list-item-1a29c5f1.js +576 -0
  268. package/dist/calcite-list-item-group-b69dedb8.js +71 -0
  269. package/dist/calcite-loader-e8b209f6.js +14 -0
  270. package/dist/calcite-modal-5e518e4c.js +333 -0
  271. package/dist/calcite-notice-25463d4d.js +181 -0
  272. package/dist/calcite-option-113080c1.js +94 -0
  273. package/dist/calcite-scrim-423337f4.js +18 -0
  274. package/dist/calcite-select-cd1e7e86.js +231 -0
  275. package/dist/capabilities-e7ea2422.js +50 -0
  276. package/dist/chartCommon-beb757c5.js +256 -0
  277. package/dist/chartUtilsAm5-6eaf385e.js +2954 -0
  278. package/dist/clientSideDefaults-366deb67.js +39 -0
  279. package/dist/colorRamps-4ea8b8f7.js +38 -0
  280. package/dist/colorUtils-611a3fa1.js +164 -0
  281. package/dist/commonProperties-3f86f534.js +60 -0
  282. package/dist/computeTranslationToOriginAndRotation-db6fb1b6.js +60 -0
  283. package/dist/conditionalSlot-4bf2837a.js +27 -0
  284. package/dist/createConnection-0754c362.js +299 -0
  285. package/dist/dataUtils-ebb55aab.js +1421 -0
  286. package/dist/deduplicate-af05e046.js +89 -0
  287. package/dist/defaults-f025f8a3.js +31 -0
  288. package/dist/deleteForwardEdits-0b666266.js +13 -0
  289. package/dist/diffUtils-b887dbbc.js +90 -0
  290. package/dist/drapedUtils-82fba1a5.js +75 -0
  291. package/dist/earcut-da8e2a55.js +292 -0
  292. package/dist/edgeProcessing-d7499657.js +252 -0
  293. package/dist/editingSupport-4b7813cf.js +203 -0
  294. package/dist/editsZScale-4a6ee4aa.js +37 -0
  295. package/dist/elevationInfoUtils-c20557cb.js +126 -0
  296. package/dist/executeForIds-6a55aa95.js +14 -0
  297. package/dist/executeForTopCount-7ffc37ac.js +17 -0
  298. package/dist/executeForTopExtents-191307d3.js +17 -0
  299. package/dist/executeForTopIds-f644d448.js +17 -0
  300. package/dist/executeQueryJSON-c5616d7b.js +15 -0
  301. package/dist/executeQueryPBF-807fb886.js +152 -0
  302. package/dist/executeRelationshipQuery-d5a1463b.js +53 -0
  303. package/dist/executeTopFeaturesQuery-6bb737a8.js +18 -0
  304. package/dist/featureConversionUtils-8fd0a407.js +479 -0
  305. package/dist/featureLayerUtils-37c96c26.js +250 -0
  306. package/dist/featureLayerUtils-cd009ccc.js +142 -0
  307. package/dist/featureSetUtils-f54946cf.js +2530 -0
  308. package/dist/featuresetbase-5a262736.js +707 -0
  309. package/dist/featuresetgeom-b772f260.js +99 -0
  310. package/dist/featuresetstats-fecaae94.js +81 -0
  311. package/dist/featuresetstring-8d32b66d.js +95 -0
  312. package/dist/fetchService-41c786e9.js +33 -0
  313. package/dist/fieldProperties-0a31a020.js +33 -0
  314. package/dist/floatRGBA-bcce207e.js +20 -0
  315. package/dist/form-8bc80cb2.js +138 -0
  316. package/dist/geohashUtils-5b115834.js +85 -0
  317. package/dist/geojson-33ba4718.js +208 -0
  318. package/dist/geomasync-9ccbb40e.js +567 -0
  319. package/dist/geometryEngine-5d1edffb.js +192 -0
  320. package/dist/geometryEngineAsync-65f20167.js +217 -0
  321. package/dist/geometryEngineBase-4107554c.js +18463 -0
  322. package/dist/geometryEngineJSON-96ac95b3.js +46 -0
  323. package/dist/geometryEngineJSON-fecd2377.js +171 -0
  324. package/dist/geometryEngineWorker-3cc93f48.js +11 -0
  325. package/dist/geometryServiceUtils-99ffac76.js +28 -0
  326. package/dist/georeference-597e7b2a.js +291 -0
  327. package/dist/gif-24ef6c2c.js +323 -0
  328. package/dist/gltfexport-f5557b01.js +705 -0
  329. package/dist/groupLayerUtils-429ce1be.js +39 -0
  330. package/dist/heatmapUtils-582b52e1.js +45 -0
  331. package/dist/highlightReasons-6f0f9ef6.js +19 -0
  332. package/dist/hydrated-31a838fb.js +40 -0
  333. package/dist/i3s-3437a8f0.js +809 -0
  334. package/dist/icon-6764e79e.js +127 -0
  335. package/dist/imageBitmapUtils-d56cd963.js +23 -0
  336. package/dist/imageUtils-5fc5f2e1.js +69 -0
  337. package/dist/imageUtils-d0a1bdd3.js +89 -0
  338. package/dist/imageryUtils-31c938b0.js +43 -0
  339. package/dist/index-a8d87ec0.js +45604 -0
  340. package/dist/index.d.ts +2 -1
  341. package/dist/index.js +26 -25
  342. package/dist/input-message-067fbc56.js +92 -0
  343. package/dist/input2-d25d1697.js +575 -0
  344. package/dist/interactive-79c8f5d7.js +80 -0
  345. package/dist/jsonContext-b5489a22.js +15 -0
  346. package/dist/jsonUtils-34961e68.js +86 -0
  347. package/dist/jsonUtils-65dc6fdf.js +476 -0
  348. package/dist/jsonUtils-980c608d.js +59 -0
  349. package/dist/kmlUtils-b1b9817a.js +112 -0
  350. package/dist/knowledgeGraphService-53d3ffbb.js +739 -0
  351. package/dist/knowledgegraph-bd84abd0.js +149 -0
  352. package/dist/labelUtils-333abe25.js +61 -0
  353. package/dist/labelingInfo-6d452fa4.js +46 -0
  354. package/dist/layersCreator-2cc797a3.js +151 -0
  355. package/dist/layersLoader-028db48b.js +197 -0
  356. package/dist/lazyLayerLoader-2dd5721b.js +10 -0
  357. package/dist/lclayout-44591238.js +773 -0
  358. package/dist/lengthUtils-7339106c.js +5 -0
  359. package/dist/lerc-wasm-49e10ccb.js +325 -0
  360. package/dist/libtess-asm-ac16428b.js +3673 -0
  361. package/dist/libtess-f4e34dcf.js +269 -0
  362. package/dist/lineSegment-0e4aefd8.js +76 -0
  363. package/dist/loadGLTFMesh-4afc2514.js +181 -0
  364. package/dist/loadable-a2fd544f.js +24 -0
  365. package/dist/loader-fbae5e8f.js +79 -0
  366. package/dist/lyr3DWorker-1fc30357.js +2108 -0
  367. package/dist/mapViewDeps-59a6c6c7.js +3052 -0
  368. package/dist/mediaLayerUtils-642a4077.js +35 -0
  369. package/dist/meshFeatureSet-91312223.js +126 -0
  370. package/dist/meshVertexSpaceUtils-48eddc77.js +58 -0
  371. package/dist/multidimensionalUtils-705f0902.js +290 -0
  372. package/dist/normalizeUtilsSync-71d587bd.js +181 -0
  373. package/dist/number-063f85f4.js +128 -0
  374. package/dist/objectResourceUtils-0e881546.js +1455 -0
  375. package/dist/observers-745d564e.js +30 -0
  376. package/dist/ogcFeatureUtils-80329692.js +206 -0
  377. package/dist/openCloseComponent-1c398ac3.js +37 -0
  378. package/dist/orientedBoundingBox-a29567df.js +447 -0
  379. package/dist/parser-65ddb097.js +488 -0
  380. package/dist/pbf-b0a9807c.js +215 -0
  381. package/dist/pbfQueryUtils-3cd28b30.js +422 -0
  382. package/dist/pe-wasm-fe3a1187.js +887 -0
  383. package/dist/persistable-36a3796e.js +89 -0
  384. package/dist/perspectiveUtils-b75aeded.js +42 -0
  385. package/dist/pieChart-bc276742.js +555 -0
  386. package/dist/plane-79192909.js +160 -0
  387. package/dist/popupUtils-022834aa.js +22 -0
  388. package/dist/popupUtils-4b2bd688.js +50 -0
  389. package/dist/portalItemUtils-052627b4.js +57 -0
  390. package/dist/portalLayers-3be98e63.js +312 -0
  391. package/dist/portalUtils-b665fd61.js +7 -0
  392. package/dist/programUtils-00a4e18d.js +59 -0
  393. package/dist/project-032d84cf.js +21 -0
  394. package/dist/projectPointToVector-3a48d9a2.js +14 -0
  395. package/dist/projectVectorToVector-4c6a3902.js +13 -0
  396. package/dist/quantityUtils-a39f9287.js +33 -0
  397. package/dist/quantizationUtils-4616cce9.js +68 -0
  398. package/dist/quat-5e906b75.js +104 -0
  399. package/dist/query-2ab99d18.js +89 -0
  400. package/dist/queryAttachments-15a42419.js +39 -0
  401. package/dist/queryEngineUtils-ff4789cd.js +21 -0
  402. package/dist/queryTopFeatures-5eb3ccc9.js +50 -0
  403. package/dist/queryZScale-62422052.js +12 -0
  404. package/dist/rasterProjectionHelper-b605f2ee.js +577 -0
  405. package/dist/rasterUtils-f2036a08.js +122 -0
  406. package/dist/rasterizingUtils-0c9cf9ce.js +46 -0
  407. package/dist/request-00229175.js +46 -0
  408. package/dist/requestImageUtils-90da2619.js +8 -0
  409. package/dist/resourceExtension-eadbfa3f.js +17 -0
  410. package/dist/resourceUtils-28b3c1e8.js +42 -0
  411. package/dist/resourceUtils-4e9ccf63.js +69 -0
  412. package/dist/resourceUtils-666fad8a.js +62 -0
  413. package/dist/saveAPIKeyUtils-1a4f92e5.js +8 -0
  414. package/dist/saveUtils-5b62c0b1.js +24 -0
  415. package/dist/scaleUtils-6153583e.js +23 -0
  416. package/dist/scrim-6e0e08c4.js +114 -0
  417. package/dist/serviceCapabilitiesUtils-96f8d393.js +64 -0
  418. package/dist/sourceUtils-5aee3b16.js +71 -0
  419. package/dist/sphere-512478f6.js +199 -0
  420. package/dist/statsWorker-183f2d29.js +37 -0
  421. package/dist/streamLayerUtils-a1e8e58a.js +31 -0
  422. package/dist/style.css +1 -1
  423. package/dist/styleUtils-49a8dabd.js +14 -0
  424. package/dist/styleUtils-52e000d6.js +75 -0
  425. package/dist/sublayerUtils-65a83d58.js +37 -0
  426. package/dist/substitute-0272cab6.js +52 -0
  427. package/dist/symbolColorUtils-261cba60.js +8 -0
  428. package/dist/symbolLayerUtils-e0203fd7.js +31 -0
  429. package/dist/symbologySnappingCandidates-eeda4ddf.js +221 -0
  430. package/dist/t9n-147b4f00.js +349 -0
  431. package/dist/testSVGPremultipliedAlpha-e3c11fd6.js +94 -0
  432. package/dist/timeSupport-3ddd7e4b.js +410 -0
  433. package/dist/triangle-28fd7dff.js +98 -0
  434. package/dist/unitConversionUtils-df3ffd70.js +17 -0
  435. package/dist/unitFormatUtils-d857519e.js +40 -0
  436. package/dist/uploadAssetErrors-18a6fad7.js +70 -0
  437. package/dist/uploadAssets-f2c89175.js +330 -0
  438. package/dist/utils-214b98cc.js +91 -0
  439. package/dist/utils-283fbef1.js +34 -0
  440. package/dist/utils-333b2280.js +2746 -0
  441. package/dist/utils-7202e24d.js +232 -0
  442. package/dist/utils-a7d5b733.js +419 -0
  443. package/dist/utils-cffde1b1.js +433 -0
  444. package/dist/utils-e4309923.js +79 -0
  445. package/dist/utils-e582955c.js +73 -0
  446. package/dist/utils3-d4b9a6af.js +75 -0
  447. package/dist/vec3-d9885b29.js +81 -0
  448. package/dist/vec42-d5675dd5.js +125 -0
  449. package/dist/versionUtils-2a4f90d3.js +161 -0
  450. package/dist/visualVariableUtils-d45d2e59.js +267 -0
  451. package/dist/webStyleSymbolUtils-5d8e6604.js +48 -0
  452. package/dist/webglDeps-c5e1e661.js +23 -0
  453. package/dist/wfsUtils-a004cee1.js +343 -0
  454. package/dist/workerHelper-a0956a07.js +11 -0
  455. package/dist/xyChart-e8a9ed1d.js +3335 -0
  456. package/package.json +1 -1
  457. package/dist/AGraphicContainer-0a4e0426.js +0 -109
  458. package/dist/APIKeyMixin-83e85532.js +0 -19
  459. package/dist/Analysis-c4011253.js +0 -31
  460. package/dist/ArcGISCachedService-1c6af1c1.js +0 -47
  461. package/dist/ArcGISService-1d880889.js +0 -25
  462. package/dist/AreaMeasurement2D-86006a71.js +0 -405
  463. package/dist/AreaMeasurement3D-1825243c.js +0 -488
  464. package/dist/AttachmentInfo-fa04c641.js +0 -34
  465. package/dist/AttachmentQuery-1450c2f7.js +0 -18
  466. package/dist/AttributeStore-02f947ea.js +0 -1707
  467. package/dist/BaseDynamicLayerView2D-eb11c757.js +0 -63
  468. package/dist/BingMapsLayer-7ad7d511.js +0 -112
  469. package/dist/Bitmap-14a020d8.js +0 -128
  470. package/dist/BitmapContainer-cc71fd24.js +0 -23
  471. package/dist/BlendLayer-e2f97659.js +0 -13
  472. package/dist/BoundsStore-8612892f.js +0 -63
  473. package/dist/BufferObject-bd932c2c.js +0 -100
  474. package/dist/BufferView-97ed14c7.js +0 -683
  475. package/dist/BuildingSceneLayer-3f5380c8.js +0 -535
  476. package/dist/Button-15031955.js +0 -36
  477. package/dist/CSVLayer-a76db6f4.js +0 -208
  478. package/dist/CSVSourceWorker-afe160ed.js +0 -367
  479. package/dist/CatalogDynamicGroupLayerView2D-be946494.js +0 -66
  480. package/dist/CatalogFootprintLayerView2D-14763204.js +0 -76
  481. package/dist/CatalogLayer-7d6228dd.js +0 -262
  482. package/dist/CatalogLayerView2D-13e32a42.js +0 -52
  483. package/dist/ClassBreaksDefinition-7040a7fc.js +0 -18
  484. package/dist/ColorMaterial.glsl-e56765f1.js +0 -64
  485. package/dist/ColorSet-4ff0a7b7.js +0 -45
  486. package/dist/ColorStop-1e154045.js +0 -29
  487. package/dist/Container-6e3b610b.js +0 -521
  488. package/dist/CustomParametersMixin-c01280c0.js +0 -12
  489. package/dist/DefaultMaterial.glsl-e7e23b90.js +0 -42
  490. package/dist/DefaultMaterial_COLOR_GAMMA-7fd21704.js +0 -653
  491. package/dist/DefaultTheme-3c5b433f.js +0 -130
  492. package/dist/DeleteForwardEditsParameters-7073c5e5.js +0 -18
  493. package/dist/DimensionLayer-f921dd3d.js +0 -129
  494. package/dist/DirectLineMeasurement3D-61d14af2.js +0 -449
  495. package/dist/DistanceMeasurement2D-b023b35c.js +0 -303
  496. package/dist/DoubleArray-1186b8b8.js +0 -25
  497. package/dist/Dropdown/Filter/Filter.types.d.ts +0 -17
  498. package/dist/Dropdown/Filter/test.mocks.d.ts +0 -6
  499. package/dist/Dropdown/List/Dropdown.List.d.ts +0 -73
  500. package/dist/Dropdown/List/List.types.d.ts +0 -11
  501. package/dist/Dropdown/List/test.mocks.d.ts +0 -7
  502. package/dist/EdgeProcessingWorker-cb6277ad.js +0 -63
  503. package/dist/EditBusLayer-9d740f8f.js +0 -107
  504. package/dist/ElevationInfo-581ff99d.js +0 -56
  505. package/dist/ElevationLayer-42b57d9b.js +0 -129
  506. package/dist/ElevationQuery-f6d0cf9f.js +0 -598
  507. package/dist/ElevationSamplerWorker-50d805bb.js +0 -62
  508. package/dist/ExportImageParameters-5b047f92.js +0 -66
  509. package/dist/ExportStrategy-b6c54d77.js +0 -93
  510. package/dist/ExportWMSImageParameters-ff5a3ac8.js +0 -33
  511. package/dist/External-695a389a.js +0 -110
  512. package/dist/FeatureCollectionSnappingSource-fdaed9e0.js +0 -130
  513. package/dist/FeatureCommandQueue-c2bd1a39.js +0 -1244
  514. package/dist/FeatureEffect-9ea1b3da.js +0 -39
  515. package/dist/FeatureEffectLayer-0fa169c4.js +0 -13
  516. package/dist/FeatureFilter-638c4cae.js +0 -27
  517. package/dist/FeatureLayer-2a419d3e.js +0 -693
  518. package/dist/FeatureLayerBase-7331e738.js +0 -148
  519. package/dist/FeatureLayerSource-733186fb.js +0 -444
  520. package/dist/FeatureLayerView2D-bc4994b6.js +0 -1967
  521. package/dist/FeaturePipelineWorker-5f68488c.js +0 -3633
  522. package/dist/FeatureReductionLayer-0c152478.js +0 -225
  523. package/dist/FeatureReductionSelection-f952512d.js +0 -22
  524. package/dist/FeatureServiceSnappingSource-4c02d5a3.js +0 -481
  525. package/dist/FeatureServiceSnappingSourceWorker-c2a1dc50.js +0 -747
  526. package/dist/FeatureSet-2c6b8e00.js +0 -188
  527. package/dist/FeatureStore-a26846c0.js +0 -131
  528. package/dist/FeatureTemplate-1b6b7e2d.js +0 -12
  529. package/dist/FeatureType-9e1f1a7d.js +0 -25
  530. package/dist/FieldsIndex-91711836.js +0 -109
  531. package/dist/FormTemplate-ae0cfb6e.js +0 -350
  532. package/dist/GeoJSONLayer-b2070c34.js +0 -236
  533. package/dist/GeoJSONSourceWorker-aecb5f9b.js +0 -247
  534. package/dist/GeoRSSLayer-3743b41f.js +0 -73
  535. package/dist/GeoRSSLayerView2D-098c24bc.js +0 -140
  536. package/dist/GeometryUtils-036c7f22.js +0 -403
  537. package/dist/GraphicContainer-ece3945e.js +0 -26
  538. package/dist/GraphicManipulator-bc92899f.js +0 -1499
  539. package/dist/GraphicsLayer-764f0324.js +0 -38
  540. package/dist/GraphicsLayerView2D-36908d0c.js +0 -114
  541. package/dist/GraphicsSnappingSource-2bb681c0.js +0 -273
  542. package/dist/GraphicsView2D-e9cf5cd6.js +0 -620
  543. package/dist/GroupLayer-5ea5b71b.js +0 -147
  544. package/dist/GroupLayerView2D-22ec9eaa.js +0 -98
  545. package/dist/HUDMaterial.glsl-80ab7d22.js +0 -65
  546. package/dist/HighlightCounter-36842e52.js +0 -41
  547. package/dist/HighlightGraphicContainer-10cb9671.js +0 -18
  548. package/dist/I3SBinaryReader-9dbdc661.js +0 -310
  549. package/dist/I3SLayerDefinitions-b56e2c87.js +0 -55
  550. package/dist/I3SUtil-5461dc89.js +0 -59
  551. package/dist/IdentityManager-bb063156.js +0 -899
  552. package/dist/ImageHistogramParameters-1f8e5179.js +0 -905
  553. package/dist/ImageryLayer-a807d3b3.js +0 -1799
  554. package/dist/ImageryLayerView2D-358a3267.js +0 -352
  555. package/dist/ImageryTileLayer-0f67f262.js +0 -2157
  556. package/dist/ImageryTileLayerView2D-2bc2bb67.js +0 -1110
  557. package/dist/Indices-0c5304f2.js +0 -67
  558. package/dist/IntegratedMesh3DTilesLayer-be69dca8.js +0 -112
  559. package/dist/IntegratedMeshLayer-3c070523.js +0 -141
  560. package/dist/InteractiveAnalysisViewModel-3005a4a6.js +0 -7397
  561. package/dist/InterleavedLayout-d37b99a2.js +0 -163
  562. package/dist/KMLLayer-2011c3c6.js +0 -162
  563. package/dist/KMLLayerView2D-5d17145f.js +0 -253
  564. package/dist/KnowledgeGraphLayerView2D-7172b91b.js +0 -43
  565. package/dist/LRUCache-39211cf9.js +0 -32
  566. package/dist/LabelClass-d1080628.js +0 -135
  567. package/dist/LabelMetric-ab56c6b3.js +0 -400
  568. package/dist/LaserlinePath.glsl-df8f92cc.js +0 -64
  569. package/dist/Laserlines.glsl-f7d93e3f.js +0 -65
  570. package/dist/LayerFloorInfo-3edeb9a2.js +0 -15
  571. package/dist/LayerView-1c58c8c6.js +0 -206
  572. package/dist/LercWorker-c7a2aca1.js +0 -157
  573. package/dist/LineOfSightLayer-3028e21f.js +0 -147
  574. package/dist/LinkChartLayer-988ae660.js +0 -1027
  575. package/dist/Lyr3DWorker-4c8c758f.js +0 -82
  576. package/dist/MagnifierPrograms-123961a3.js +0 -806
  577. package/dist/MapImageLayer-9241ad63.js +0 -169
  578. package/dist/MapImageLayerView2D-726e5c66.js +0 -146
  579. package/dist/MapNotesLayer-2d2db99b.js +0 -283
  580. package/dist/MapNotesLayerView2D-41f5790c.js +0 -161
  581. package/dist/MapServiceLayerViewHelper-8f5228ec.js +0 -288
  582. package/dist/MeasurementWidgetContent-504fd868.js +0 -2642
  583. package/dist/MediaLayer-e71ce661.js +0 -523
  584. package/dist/MediaLayerView2D-33c67404.js +0 -332
  585. package/dist/MemCache-413327b3.js +0 -227
  586. package/dist/MemorySourceWorker-b0e70dd0.js +0 -222
  587. package/dist/Mesh-98c4e050.js +0 -980
  588. package/dist/MeshLocalVertexSpace-7a7e4d4e.js +0 -19
  589. package/dist/MultiOriginJSONSupport-2fca3cc5.js +0 -158
  590. package/dist/OGCFeatureLayer-451fbd45.js +0 -211
  591. package/dist/OGCFeatureLayerView2D-d23b08d2.js +0 -82
  592. package/dist/ObjectStack-742b2ff3.js +0 -21
  593. package/dist/Octree-a3c8e90e.js +0 -495
  594. package/dist/OpenStreetMapLayer-9bb91f97.js +0 -30
  595. package/dist/OperationalLayer-fbfada66.js +0 -44
  596. package/dist/OrderByInfo-335eb561.js +0 -16
  597. package/dist/OrderedLayer-29b4ac64.js +0 -26
  598. package/dist/OrientedImageryLayer-aa2498e2.js +0 -216
  599. package/dist/OverlayCompositing.glsl-4b1e83c2.js +0 -65
  600. package/dist/OverrideHelper-74cc3959.js +0 -242
  601. package/dist/PBFDecoderWorker-fd40e0f9.js +0 -213
  602. package/dist/PointCloudLayer-64cdbbb2.js +0 -197
  603. package/dist/PointCloudUniqueValueRenderer-db9b3a98.js +0 -115
  604. package/dist/PointCloudWorker-a5eb5224.js +0 -212
  605. package/dist/PooledRBush-be6fe17a.js +0 -272
  606. package/dist/Popup-db250fe6.js +0 -3990
  607. package/dist/PortalLayer-a6ce110e.js +0 -126
  608. package/dist/Program-ecabc523.js +0 -694
  609. package/dist/ProgramTemplate-e5ce3b0f.js +0 -35
  610. package/dist/QueryEngine-87b2546b.js +0 -896
  611. package/dist/QueryTask-36400ec7.js +0 -119
  612. package/dist/RasterSymbolizer-cfd47847.js +0 -3024
  613. package/dist/RasterVFDisplayObject-d4c967ea.js +0 -581
  614. package/dist/RasterWorker-068ae23a.js +0 -78
  615. package/dist/RawBlockCache-9e8d4c35.js +0 -185
  616. package/dist/RealisticTree.glsl-adab8e44.js +0 -42
  617. package/dist/RefreshableLayer-eec34ca2.js +0 -80
  618. package/dist/RefreshableLayerView-ee06f08c.js +0 -16
  619. package/dist/Relationship-a7eb5489.js +0 -64
  620. package/dist/RelationshipQuery-4551bb04.js +0 -22
  621. package/dist/RenderingContext-9e8fac0d.js +0 -889
  622. package/dist/RibbonLine.glsl-5990bf5f.js +0 -65
  623. package/dist/RouteLayer-858bc482.js +0 -786
  624. package/dist/RouteLayerView2D-a70d519f.js +0 -195
  625. package/dist/SDFHelper-efca0a53.js +0 -140
  626. package/dist/SSAO.glsl-7670c1fc.js +0 -43
  627. package/dist/SSAOBlur.glsl-3523d6af.js +0 -42
  628. package/dist/ScaleRangeLayer-7f440b85.js +0 -21
  629. package/dist/SceneLayer-999bd23f.js +0 -542
  630. package/dist/SceneLayerSnappingSource-9420aaed.js +0 -218
  631. package/dist/SceneLayerSnappingSourceWorker-be67e552.js +0 -112
  632. package/dist/SceneLayerWorker-201939c2.js +0 -164
  633. package/dist/SceneService-318eff2f.js +0 -215
  634. package/dist/Scheduler-279ea0c3.js +0 -373
  635. package/dist/ShadedColorMaterial.glsl-bd2979d8.js +0 -64
  636. package/dist/SnappingOperation-5100da71.js +0 -48
  637. package/dist/SourceLayerData-50c2b980.js +0 -116
  638. package/dist/SpatialFilter-b6c6b2fc.js +0 -1701
  639. package/dist/Stop-196981da.js +0 -281
  640. package/dist/StreamLayer-37b818b8.js +0 -188
  641. package/dist/StreamLayerView2D-7f0f45bc.js +0 -164
  642. package/dist/StyleRepository-4e8fa398.js +0 -2212
  643. package/dist/SublayersOwner-90d10612.js +0 -545
  644. package/dist/SubtypeGroupLayer-959cabf8.js +0 -514
  645. package/dist/SubtypeGroupLayerView2D-95e63b42.js +0 -84
  646. package/dist/TechniqueInstance-bd190c26.js +0 -233
  647. package/dist/TemporalLayer-aacda167.js +0 -23
  648. package/dist/Texture-3618be49.js +0 -501
  649. package/dist/TextureOnly.glsl-fcca7034.js +0 -65
  650. package/dist/Theme-85608a9a.js +0 -3426
  651. package/dist/Tick-79e96104.js +0 -723
  652. package/dist/TileContainer-f1e7edd8.js +0 -31
  653. package/dist/TileInfoTilemapCache-2f882821.js +0 -38
  654. package/dist/TileLayer-db13a237.js +0 -194
  655. package/dist/TileLayerView2D-15af6be4.js +0 -187
  656. package/dist/TilemapCache-fc4b2c6c.js +0 -189
  657. package/dist/TimeInfo-39a9d4e1.js +0 -42
  658. package/dist/TimeOnly-b759457a.js +0 -706
  659. package/dist/Tooltip-0ba72b27.js +0 -138
  660. package/dist/TopFeaturesQuery-a11ecc39.js +0 -32
  661. package/dist/TurboLine-5e62d290.js +0 -565
  662. package/dist/UniqueValueRenderer-bf2f3234.js +0 -1039
  663. package/dist/UnknownLayer-2cf71578.js +0 -30
  664. package/dist/UnknownTimeZone-aabdcf56.js +0 -15
  665. package/dist/UnsupportedLayer-36650e4a.js +0 -31
  666. package/dist/UpdateTracking2D-b6d16b0c.js +0 -8566
  667. package/dist/Util-8f54c96b.js +0 -57
  668. package/dist/VectorTileLayer-ddcca4ec.js +0 -544
  669. package/dist/VectorTileLayerView2D-8176946a.js +0 -2108
  670. package/dist/Version-9eb299cd.js +0 -33
  671. package/dist/VertexArrayObject-d1a4262b.js +0 -73
  672. package/dist/VertexColor.glsl-fd9f70e0.js +0 -2683
  673. package/dist/VertexSnappingCandidate-70513010.js +0 -13
  674. package/dist/VideoLayerView2D-e08e1d57.js +0 -124
  675. package/dist/VoxelLayer-959702aa.js +0 -631
  676. package/dist/WFSLayer-4a41b206.js +0 -221
  677. package/dist/WFSSourceWorker-53d88982.js +0 -157
  678. package/dist/WGLContainer-e9e8616e.js +0 -5426
  679. package/dist/WMSLayer-8e44f55c.js +0 -536
  680. package/dist/WMSLayerView2D-415a1793.js +0 -117
  681. package/dist/WMTSLayer-804f4bed.js +0 -531
  682. package/dist/WMTSLayerView2D-96186a90.js +0 -142
  683. package/dist/WebTileLayer-7391ea01.js +0 -110
  684. package/dist/WhereClause-1816217e.js +0 -2766
  685. package/dist/WorkerHandle-25f67c67.js +0 -47
  686. package/dist/WorkerTileHandler-a7e508bc.js +0 -1539
  687. package/dist/action-3ce81e45.js +0 -198
  688. package/dist/action-group-f2d26c2b.js +0 -145
  689. package/dist/action-menu-015d91ab.js +0 -1759
  690. package/dist/apng-e5532475.js +0 -392
  691. package/dist/arcade-dbe2ca4a.js +0 -229
  692. package/dist/arcadeAsyncRuntime-78b83b41.js +0 -943
  693. package/dist/arcadeUtils-cb1066a6.js +0 -8741
  694. package/dist/arcgis-knowledge-client-core-7379d99e.js +0 -1218
  695. package/dist/arcgis-knowledge-client-core-simd-ea8b4d20.js +0 -1218
  696. package/dist/arcgisLayers-cd3494fd.js +0 -152
  697. package/dist/associatedFeatureServiceUtils-da8d377d.js +0 -92
  698. package/dist/axisAngleDegrees-19922758.js +0 -49
  699. package/dist/basis_transcoder-bf0490cc.js +0 -1248
  700. package/dist/calcite-action-0db4f61c.js +0 -22
  701. package/dist/calcite-action-bar-1b4c89cb.js +0 -303
  702. package/dist/calcite-action-group-3c8a934c.js +0 -28
  703. package/dist/calcite-button-1079a10c.js +0 -228
  704. package/dist/calcite-flow-c1e71a12.js +0 -128
  705. package/dist/calcite-flow-item-1097b48f.js +0 -499
  706. package/dist/calcite-icon-c88b4a67.js +0 -16
  707. package/dist/calcite-input-8c33ee84.js +0 -24
  708. package/dist/calcite-label-7fbfbe36.js +0 -79
  709. package/dist/calcite-list-93af4ae2.js +0 -2135
  710. package/dist/calcite-list-item-f0a6cda3.js +0 -576
  711. package/dist/calcite-list-item-group-107a313e.js +0 -71
  712. package/dist/calcite-loader-5194bf83.js +0 -14
  713. package/dist/calcite-modal-486280cc.js +0 -333
  714. package/dist/calcite-notice-a81274a8.js +0 -181
  715. package/dist/calcite-option-0020a955.js +0 -94
  716. package/dist/calcite-scrim-27d65e7f.js +0 -18
  717. package/dist/calcite-select-05f25c2a.js +0 -231
  718. package/dist/capabilities-238bde7d.js +0 -50
  719. package/dist/chartCommon-7eda170a.js +0 -256
  720. package/dist/chartUtilsAm5-fd8aeac2.js +0 -2954
  721. package/dist/clientSideDefaults-b91506af.js +0 -39
  722. package/dist/colorRamps-6027ea73.js +0 -38
  723. package/dist/colorUtils-3dd4b884.js +0 -164
  724. package/dist/commonProperties-bf4d305f.js +0 -60
  725. package/dist/computeTranslationToOriginAndRotation-ca5a9439.js +0 -60
  726. package/dist/conditionalSlot-80a4c6ff.js +0 -27
  727. package/dist/createConnection-70dd787a.js +0 -299
  728. package/dist/dataUtils-b632d3a2.js +0 -1421
  729. package/dist/deduplicate-e13aa9e2.js +0 -89
  730. package/dist/defaults-40a1a995.js +0 -31
  731. package/dist/deleteForwardEdits-b0182a08.js +0 -13
  732. package/dist/diffUtils-5f43e52a.js +0 -90
  733. package/dist/drapedUtils-416e5304.js +0 -75
  734. package/dist/earcut-235aa57d.js +0 -292
  735. package/dist/edgeProcessing-43d45a32.js +0 -252
  736. package/dist/editingSupport-7706f838.js +0 -203
  737. package/dist/editsZScale-49d8a8cd.js +0 -37
  738. package/dist/elevationInfoUtils-3fbfcf1f.js +0 -126
  739. package/dist/executeForIds-419ba6a3.js +0 -14
  740. package/dist/executeForTopCount-8a8ba5c7.js +0 -17
  741. package/dist/executeForTopExtents-9f24d5d0.js +0 -17
  742. package/dist/executeForTopIds-0bfdb55f.js +0 -17
  743. package/dist/executeQueryJSON-2a2e9e1b.js +0 -15
  744. package/dist/executeQueryPBF-f10de9ec.js +0 -152
  745. package/dist/executeRelationshipQuery-0680cb30.js +0 -53
  746. package/dist/executeTopFeaturesQuery-c553d696.js +0 -18
  747. package/dist/featureConversionUtils-83783887.js +0 -479
  748. package/dist/featureLayerUtils-545d260a.js +0 -250
  749. package/dist/featureLayerUtils-b18e6016.js +0 -142
  750. package/dist/featureSetUtils-0c7ba073.js +0 -2530
  751. package/dist/featuresetbase-aadfabb3.js +0 -707
  752. package/dist/featuresetgeom-a405018e.js +0 -99
  753. package/dist/featuresetstats-f6602402.js +0 -81
  754. package/dist/featuresetstring-834ea865.js +0 -95
  755. package/dist/fetchService-dac740ef.js +0 -33
  756. package/dist/fieldProperties-b024e721.js +0 -33
  757. package/dist/floatRGBA-46ee3e38.js +0 -20
  758. package/dist/form-0b2f0ac9.js +0 -138
  759. package/dist/geohashUtils-418d1ca6.js +0 -85
  760. package/dist/geojson-96d3353d.js +0 -208
  761. package/dist/geomasync-ff5b3734.js +0 -567
  762. package/dist/geometryEngine-8fcb3d59.js +0 -192
  763. package/dist/geometryEngineAsync-212f4b0f.js +0 -217
  764. package/dist/geometryEngineBase-4c2ff8b9.js +0 -18463
  765. package/dist/geometryEngineJSON-131b461e.js +0 -171
  766. package/dist/geometryEngineJSON-b43cf67f.js +0 -46
  767. package/dist/geometryEngineWorker-707ca480.js +0 -11
  768. package/dist/geometryServiceUtils-af23d0b5.js +0 -28
  769. package/dist/georeference-02bc532d.js +0 -291
  770. package/dist/gif-b072aa1c.js +0 -323
  771. package/dist/gltfexport-3362ea71.js +0 -705
  772. package/dist/groupLayerUtils-81545911.js +0 -39
  773. package/dist/heatmapUtils-b25824e4.js +0 -45
  774. package/dist/highlightReasons-5b8b2665.js +0 -19
  775. package/dist/hydrated-b0c62926.js +0 -40
  776. package/dist/i3s-32edc725.js +0 -809
  777. package/dist/icon-453c7f62.js +0 -127
  778. package/dist/imageBitmapUtils-51497e26.js +0 -23
  779. package/dist/imageUtils-1d1da6e6.js +0 -89
  780. package/dist/imageUtils-8c40eba6.js +0 -69
  781. package/dist/imageryUtils-0c00fbf3.js +0 -43
  782. package/dist/index-3b4c2147.js +0 -45568
  783. package/dist/input-message-32600f49.js +0 -92
  784. package/dist/input2-1c0831ed.js +0 -575
  785. package/dist/interactive-5824e097.js +0 -80
  786. package/dist/jsonContext-ec21ce85.js +0 -15
  787. package/dist/jsonUtils-012feb40.js +0 -476
  788. package/dist/jsonUtils-3979baa3.js +0 -59
  789. package/dist/jsonUtils-3eb7c689.js +0 -86
  790. package/dist/kmlUtils-4c198ea5.js +0 -112
  791. package/dist/knowledgeGraphService-a159d815.js +0 -739
  792. package/dist/knowledgegraph-eb0d44d4.js +0 -149
  793. package/dist/labelUtils-01b646c7.js +0 -61
  794. package/dist/labelingInfo-148dcd26.js +0 -46
  795. package/dist/layersCreator-4e94f616.js +0 -151
  796. package/dist/layersLoader-f4e3ab33.js +0 -197
  797. package/dist/lazyLayerLoader-eb51910e.js +0 -10
  798. package/dist/lclayout-4d303c41.js +0 -773
  799. package/dist/lengthUtils-6abaf27a.js +0 -5
  800. package/dist/lerc-wasm-0ae912df.js +0 -325
  801. package/dist/libtess-asm-91c97dcd.js +0 -3673
  802. package/dist/libtess-cba14731.js +0 -269
  803. package/dist/lineSegment-8f04aab4.js +0 -76
  804. package/dist/loadGLTFMesh-71542570.js +0 -181
  805. package/dist/loadable-e7c40a8a.js +0 -24
  806. package/dist/loader-6272e4b3.js +0 -79
  807. package/dist/lyr3DWorker-9ee4ee8b.js +0 -2108
  808. package/dist/mapViewDeps-b17a2e04.js +0 -3052
  809. package/dist/mediaLayerUtils-f0ccfd82.js +0 -35
  810. package/dist/meshFeatureSet-304dfa08.js +0 -126
  811. package/dist/meshVertexSpaceUtils-e7f774fa.js +0 -58
  812. package/dist/multidimensionalUtils-642f26da.js +0 -290
  813. package/dist/normalizeUtilsSync-b5f617e6.js +0 -181
  814. package/dist/number-3af512e3.js +0 -128
  815. package/dist/objectResourceUtils-d45057aa.js +0 -1455
  816. package/dist/observers-700e505d.js +0 -30
  817. package/dist/ogcFeatureUtils-440ed0bf.js +0 -206
  818. package/dist/openCloseComponent-1501c620.js +0 -37
  819. package/dist/orientedBoundingBox-80988e7f.js +0 -447
  820. package/dist/parser-6e351b85.js +0 -488
  821. package/dist/pbf-a85c52b3.js +0 -215
  822. package/dist/pbfQueryUtils-5f25f81f.js +0 -422
  823. package/dist/pe-wasm-e588110b.js +0 -887
  824. package/dist/persistable-ad01d0ca.js +0 -89
  825. package/dist/perspectiveUtils-ab58ddbb.js +0 -42
  826. package/dist/pieChart-d3793e8b.js +0 -555
  827. package/dist/plane-e103e8ed.js +0 -160
  828. package/dist/popupUtils-5f7c3e79.js +0 -50
  829. package/dist/popupUtils-b95ab60a.js +0 -22
  830. package/dist/portalItemUtils-3d59513a.js +0 -57
  831. package/dist/portalLayers-16b2f807.js +0 -312
  832. package/dist/portalUtils-3789afb0.js +0 -7
  833. package/dist/programUtils-c8d96b39.js +0 -59
  834. package/dist/project-7eaa59a4.js +0 -21
  835. package/dist/projectPointToVector-19151d97.js +0 -14
  836. package/dist/projectVectorToVector-d552535c.js +0 -13
  837. package/dist/quantityUtils-258bfdb4.js +0 -33
  838. package/dist/quantizationUtils-752e4d24.js +0 -68
  839. package/dist/quat-6dc51256.js +0 -104
  840. package/dist/query-da893693.js +0 -89
  841. package/dist/queryAttachments-df86b71d.js +0 -39
  842. package/dist/queryEngineUtils-ffc50ce5.js +0 -21
  843. package/dist/queryTopFeatures-5a58a12d.js +0 -50
  844. package/dist/queryZScale-39ffaf30.js +0 -12
  845. package/dist/rasterProjectionHelper-d13bc46d.js +0 -577
  846. package/dist/rasterUtils-22b15453.js +0 -122
  847. package/dist/rasterizingUtils-3388ddbf.js +0 -46
  848. package/dist/request-82a2415a.js +0 -46
  849. package/dist/requestImageUtils-2fca27f8.js +0 -8
  850. package/dist/resourceExtension-672d03cc.js +0 -17
  851. package/dist/resourceUtils-95b9964a.js +0 -42
  852. package/dist/resourceUtils-b1e50d5e.js +0 -69
  853. package/dist/resourceUtils-e8831103.js +0 -62
  854. package/dist/saveAPIKeyUtils-ee9b0447.js +0 -8
  855. package/dist/saveUtils-1323ad64.js +0 -24
  856. package/dist/scaleUtils-1a70f716.js +0 -23
  857. package/dist/scrim-c0a641cd.js +0 -114
  858. package/dist/serviceCapabilitiesUtils-33d4e1c0.js +0 -64
  859. package/dist/sourceUtils-e8c5db4e.js +0 -71
  860. package/dist/sphere-75cef429.js +0 -199
  861. package/dist/statsWorker-1f1bc582.js +0 -37
  862. package/dist/streamLayerUtils-c85a0eed.js +0 -31
  863. package/dist/styleUtils-05bc85a5.js +0 -75
  864. package/dist/styleUtils-7bd8d0a7.js +0 -14
  865. package/dist/sublayerUtils-feb77591.js +0 -37
  866. package/dist/substitute-c31da60c.js +0 -52
  867. package/dist/symbolColorUtils-3c385668.js +0 -8
  868. package/dist/symbolLayerUtils-2d2753b7.js +0 -31
  869. package/dist/symbologySnappingCandidates-00eeca39.js +0 -221
  870. package/dist/t9n-55800455.js +0 -349
  871. package/dist/testSVGPremultipliedAlpha-ec1f73c4.js +0 -94
  872. package/dist/timeSupport-a7623294.js +0 -410
  873. package/dist/triangle-c799f11b.js +0 -98
  874. package/dist/unitConversionUtils-05050e6d.js +0 -17
  875. package/dist/unitFormatUtils-2a84c371.js +0 -40
  876. package/dist/uploadAssetErrors-601b044e.js +0 -70
  877. package/dist/uploadAssets-5a835c8a.js +0 -330
  878. package/dist/utils-2dc379da.js +0 -79
  879. package/dist/utils-34b1ea70.js +0 -2746
  880. package/dist/utils-45c14202.js +0 -232
  881. package/dist/utils-484969fb.js +0 -91
  882. package/dist/utils-5aaff624.js +0 -433
  883. package/dist/utils-a94dc35d.js +0 -419
  884. package/dist/utils-e68cfebf.js +0 -34
  885. package/dist/utils-fc14cc83.js +0 -73
  886. package/dist/utils3-5745e839.js +0 -75
  887. package/dist/vec3-12b9e1d8.js +0 -81
  888. package/dist/vec42-a1569d60.js +0 -125
  889. package/dist/versionUtils-c4f3617a.js +0 -161
  890. package/dist/visualVariableUtils-bcb95edc.js +0 -267
  891. package/dist/webStyleSymbolUtils-9db5b81c.js +0 -48
  892. package/dist/webglDeps-05e0410a.js +0 -23
  893. package/dist/wfsUtils-7caaa2cc.js +0 -343
  894. package/dist/workerHelper-86e37deb.js +0 -11
  895. package/dist/xyChart-0673158d.js +0 -3335
@@ -0,0 +1,3052 @@
1
+ import { gY as Rt, bz as zt, cs as ie, s as Ne, cr as It, dc as $t, t as Ke, fm as Dt, f$ as Lt, aO as H, k4 as Nt, k5 as Ut, k6 as Vt, bF as Gt, k7 as Ht, jo as Wt, Q as P, fc as qt, U as de, gU as jt, gX as Xt, W as re, j7 as Yt, bJ as Ue, i as Je, c9 as Kt, dO as Jt, f5 as Qt, b9 as Te, fd as Ve, fg as Ce, iT as Zt, g2 as Qe, f9 as ei, f7 as ti, iJ as ii, iL as ri, N as si, hc as ai, k8 as ni, k9 as oi, l as Ze, ka as li, he as hi, x as ci, a as ui, o as Ee, P as di, b as et, dj as pi, kb as _i } from "./index-a8d87ec0.js";
2
+ import { o as mi } from "./colorUtils-611a3fa1.js";
3
+ import { aU as tt, aV as fi, K as ae, aW as gi, t as yi, aX as vi, aY as bi } from "./UpdateTracking2D-bf4e8a89.js";
4
+ import { o as wi, f as F, B as xi, b as Mi, p as ge, I as O, D as Re, h as se, L as ye, T as ze, x as it, w as Oi, P as Si, A as Pi, F as Ti, E as Ci, z as Ft, t as k, u as Ei } from "./utils-a7d5b733.js";
5
+ import { i as xe } from "./enums-fa8f05ab.js";
6
+ import { f as he } from "./OverrideHelper-880a7e09.js";
7
+ import { f as rt, m as st, e as Ri, a as zi } from "./SDFHelper-70cff23b.js";
8
+ import { o as Fi, $ as j, _ as Fe, e as ki, j as at, t as Bi, p as Ai, f as Ii, M as $e, I as ce, J as $i, T as kt, v as Di } from "./definitions-a00a3a6c.js";
9
+ import { A as ve, E as D, t as Li, g as Ni, o as nt, h as Ui, i as Vi } from "./Container-5cca9103.js";
10
+ import { d as Gi, e as ot, a as Q, c as lt, h as ht, i as Hi, m as Wi } from "./WGLContainer-f2c4f5da.js";
11
+ import { L as A } from "./enums-25d066fc.js";
12
+ import { e as qi, a as Me } from "./ProgramTemplate-e4360f44.js";
13
+ import { n as Se } from "./programUtils-00a4e18d.js";
14
+ import { e as ct, r as ji, t as Xi, a as Yi, n as Ki, b as Ji, c as Qi } from "./MagnifierPrograms-5042ccad.js";
15
+ import { d as Pn, f as Tn } from "./MagnifierPrograms-5042ccad.js";
16
+ import { h as Ge } from "./BufferObject-6f0ccf08.js";
17
+ import { R as v, E as ne, F as He, G as C, D as E, L, O as De, I as ke, C as Le, B as We, U as qe, T as ut, N as Be, P as Zi } from "./enums-2c166c09.js";
18
+ import { o as je } from "./VertexArrayObject-e736d4c8.js";
19
+ import { o as er, w as tr } from "./RenderingContext-e718bfed.js";
20
+ import { p as ir, s as rr } from "./imageUtils-5fc5f2e1.js";
21
+ import { e as sr, i as ar } from "./rasterizingUtils-0c9cf9ce.js";
22
+ import { t as $ } from "./Rect-894f011c.js";
23
+ import { e as R, m as X } from "./Texture-b28260ca.js";
24
+ import { n as dt } from "./pbf-b0a9807c.js";
25
+ import { o as nr } from "./floatRGBA-bcce207e.js";
26
+ import { j as or, M as lr, y as hr } from "./LabelMetric-39280634.js";
27
+ import { f as cr } from "./utils-214b98cc.js";
28
+ import { t as pt } from "./VertexElementDescriptor-d7c718c2.js";
29
+ import { x as N, i as Xe, s as ur } from "./Program-8b1e5f48.js";
30
+ import { F as dr, T as pr } from "./FeatureCommandQueue-d1572e0d.js";
31
+ import { $ as En } from "./GraphicsView2D-3103ed12.js";
32
+ import { t as zn } from "./GraphicContainer-9bd07fb2.js";
33
+ import { t as _t } from "./requestImageUtils-90da2619.js";
34
+ import "vue";
35
+ import "./vec42-d5675dd5.js";
36
+ import "./vec4f64-043e974c.js";
37
+ import "./TurboLine-87dd880a.js";
38
+ import "./earcut-da8e2a55.js";
39
+ import "./GeometryUtils-b855940e.js";
40
+ import "./OptimizedGeometry-3b808152.js";
41
+ import "./defaults-f025f8a3.js";
42
+ import "./defaultsJSON-ba17aa15.js";
43
+ import "./BindType-5e76c8e1.js";
44
+ import "./Util-6762e3c9.js";
45
+ import "./highlightReasons-6f0f9ef6.js";
46
+ import "./constants-5bd557fe.js";
47
+ import "./quantizationUtils-4616cce9.js";
48
+ import "./parser-65ddb097.js";
49
+ import "./vec4f32-b2628ced.js";
50
+ import "./StyleDefinition-f4862d5a.js";
51
+ import "./config-61215215.js";
52
+ import "./featureConversionUtils-8fd0a407.js";
53
+ import "./OptimizedFeatureSet-54e095c4.js";
54
+ import "./NestedMap-83f8e815.js";
55
+ import "./CircularArray-b2bc1dfd.js";
56
+ import "./testSVGPremultipliedAlpha-e3c11fd6.js";
57
+ import "./AttributeStore-f80857be.js";
58
+ import "./labelUtils-333abe25.js";
59
+ import "./FieldsIndex-7d8f3589.js";
60
+ import "./UnknownTimeZone-e62caf07.js";
61
+ import "./TimeOnly-bb600899.js";
62
+ import "./timeSupport-3ddd7e4b.js";
63
+ import "./json-5febf88a.js";
64
+ import "./diffUtils-b887dbbc.js";
65
+ import "./OrderIndependentTransparency-3eadfe42.js";
66
+ import "./basicInterfaces-fa4f5fa7.js";
67
+ import "./doublePrecisionUtils-46e21550.js";
68
+ import "./lengthUtils-7339106c.js";
69
+ import "./normalizeUtilsSync-71d587bd.js";
70
+ import "./AGraphicContainer-b6e32ab3.js";
71
+ import "./TechniqueInstance-9c0d4dcf.js";
72
+ import "./TileContainer-09ca940a.js";
73
+ import "./vec3f32-304a6a9c.js";
74
+ const _r = () => Ne.getLogger("esri.symbols.cim.cimAnalyzer");
75
+ function mr(u) {
76
+ const e = u.markerPlacement;
77
+ return e && e.angleToLine ? xe.MAP : xe.SCREEN;
78
+ }
79
+ class fr {
80
+ constructor(e) {
81
+ this._cimLayers = [], this._poMap = {}, this._primitiveOverrides = [], e && (this._resourceManager = e);
82
+ }
83
+ analyzeSymbolReference(e, t, i) {
84
+ if (this._cimLayers = i ?? [], !e)
85
+ return this._cimLayers;
86
+ if (this._reset(), e.primitiveOverrides) {
87
+ this._primitiveOverrides = e.primitiveOverrides;
88
+ for (const r of this._primitiveOverrides) {
89
+ const a = r.valueExpressionInfo;
90
+ if (a)
91
+ this._setPoMap(r.primitiveName, r.propertyName, a);
92
+ else if (r.value != null) {
93
+ let s = r.value;
94
+ r.propertyName.includes("Color") && (mi(s) && (s = wi(s)), s = F(s)), this._setPoMap(r.primitiveName, r.propertyName, s);
95
+ }
96
+ }
97
+ }
98
+ return this._analyzeSymbol(e.symbol, t), this._cimLayers;
99
+ }
100
+ _reset() {
101
+ this._cimLayers = [], this._poMap = {}, this._primitiveOverrides = [];
102
+ }
103
+ _analyzeSymbol(e, t) {
104
+ switch (e == null ? void 0 : e.type) {
105
+ case "CIMPointSymbol":
106
+ case "CIMLineSymbol":
107
+ case "CIMPolygonSymbol":
108
+ this._analyzeMultiLayerSymbol(e, t);
109
+ }
110
+ }
111
+ _analyzeMultiLayerSymbol(e, t) {
112
+ const i = e == null ? void 0 : e.symbolLayers;
113
+ if (!i)
114
+ return;
115
+ const r = e.effects;
116
+ let a = xe.SCREEN;
117
+ const s = xi(e) ?? 0;
118
+ e.type === "CIMPointSymbol" && e.angleAlignment === "Map" && (a = xe.MAP);
119
+ const n = e.type === "CIMPolygonSymbol";
120
+ let o = i.length;
121
+ for (; o--; ) {
122
+ const l = i[o];
123
+ if (!l || l.enable === !1)
124
+ continue;
125
+ let h;
126
+ r != null && r.length && (h = [...r]);
127
+ const c = l.effects;
128
+ c != null && c.length && (r ? h.push(...c) : h = [...c]);
129
+ let d = null;
130
+ if (h) {
131
+ d = [];
132
+ for (const _ of h) {
133
+ const f = he.findEffectOverrides(_, this._primitiveOverrides);
134
+ f && d.push(f);
135
+ }
136
+ }
137
+ const p = [];
138
+ switch (he.findApplicableOverrides(l, this._primitiveOverrides, p), l.type) {
139
+ case "CIMSolidFill":
140
+ this._analyzeSolidFill(l, d);
141
+ break;
142
+ case "CIMPictureFill":
143
+ this._analyzePictureFill(l, d);
144
+ break;
145
+ case "CIMHatchFill":
146
+ this._analyzeHatchFill(l, d);
147
+ break;
148
+ case "CIMGradientFill":
149
+ this._analyzeGradientFill(l, d);
150
+ break;
151
+ case "CIMSolidStroke":
152
+ this._analyzeSolidStroke(l, d, n, s);
153
+ break;
154
+ case "CIMPictureStroke":
155
+ this._analyzePictureStroke(l, d, n, s);
156
+ break;
157
+ case "CIMGradientStroke":
158
+ this._analyzeGradientStroke(l, d, n, s);
159
+ break;
160
+ case "CIMCharacterMarker":
161
+ case "CIMPictureMarker":
162
+ case "CIMVectorMarker": {
163
+ e.type !== "CIMLineSymbol" && e.type !== "CIMPolygonSymbol" || (a = mr(l));
164
+ const _ = [], f = l.primitiveName;
165
+ f && _.push(f);
166
+ const g = n && Mi(l.markerPlacement);
167
+ this._analyzeMarker(l, d, null, _, a, s, t, [], !1, g);
168
+ break;
169
+ }
170
+ default:
171
+ _r().error("Cannot analyze CIM layer", l.type);
172
+ }
173
+ }
174
+ }
175
+ _analyzeSolidFill(e, t) {
176
+ const { primitiveName: i, type: r } = e, a = F(e.color);
177
+ this._cimLayers.push({ type: "fill", spriteRasterizationParam: null, colorLocked: !!e.colorLocked, color: this._getValueOrOverrideExpression(r, i, "Color", a), height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, effects: t, applyRandomOffset: !1, sampleAlphaOnly: !0, hasUnresolvedReplacementColor: !1 });
178
+ }
179
+ _analyzePictureFill(e, t) {
180
+ const { primitiveName: i, type: r } = e, a = ge(e), s = O(e.height, k.CIMPictureFill.height);
181
+ let n = O(e.scaleX, 1);
182
+ if ("width" in e && typeof e.width == "number") {
183
+ const l = e.width;
184
+ let h = 1;
185
+ const c = this._resourceManager.getResource(e.url);
186
+ c != null && (h = c.width / c.height), n /= h * (s / l);
187
+ }
188
+ const o = { type: "sprite-rasterization-param", resource: e, overrides: this._getPrimitiveMaterialOverrides(i, r) };
189
+ this._cimLayers.push({ type: "fill", spriteRasterizationParam: o, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(r, i, "TintColor", a), height: this._getValueOrOverrideExpression(r, i, "Height", s), scaleX: this._getValueOrOverrideExpression(r, i, "ScaleX", n), angle: this._getValueOrOverrideExpression(r, i, "Rotation", O(e.rotation)), offsetX: this._getValueOrOverrideExpression(r, i, "OffsetX", O(e.offsetX)), offsetY: this._getValueOrOverrideExpression(r, i, "OffsetY", O(e.offsetY)), applyRandomOffset: !1, sampleAlphaOnly: !1, hasUnresolvedReplacementColor: !1 });
190
+ }
191
+ _analyzeHatchFill(e, t) {
192
+ var h, c, d;
193
+ const { primitiveName: i, type: r } = e, a = this._analyzeMaterialOverrides(i, ["Rotation", "OffsetX", "OffsetY"]), s = this._normalizePrimitiveOverrideProps(a);
194
+ let n = [255, 255, 255, 1], o = !1;
195
+ if ((h = e.lineSymbol) != null && h.symbolLayers)
196
+ for (const p of e.lineSymbol.symbolLayers) {
197
+ if (p.type !== "CIMSolidStroke")
198
+ continue;
199
+ const _ = p.primitiveName ?? i;
200
+ o || !_ || p.colorLocked || ((c = this._poMap[_]) == null ? void 0 : c.Color) == null && ((d = this._poMap[_]) == null ? void 0 : d.StrokeColor) == null || (n = F(p.color), n = this._maybeGetValueOrOverrideExpression(_, "StrokeColor") ?? this._getValueOrOverrideExpression(r, _, "Color", n), o = !0);
201
+ const f = this._maybeGetValueOrOverrideExpression(_, "StrokeWidth");
202
+ if (f) {
203
+ let g = null, y = null;
204
+ typeof f == "number" ? g = f : y = f.valueExpressionInfo;
205
+ let m = s.find((M) => M.propertyName === "strokeWidth");
206
+ m ? m.propertyName = "width" : (m = { type: "CIMPrimitiveOverride", primitiveName: _, propertyName: "width", valueExpressionInfo: y, value: g, defaultValue: Re(r, "width") }, s.push(m));
207
+ }
208
+ }
209
+ const l = { type: "sprite-rasterization-param", resource: e, overrides: s };
210
+ this._cimLayers.push({ type: "fill", spriteRasterizationParam: l, colorLocked: !!e.colorLocked, effects: t, color: n, height: this._getValueOrOverrideExpression(r, i, "Separation", O(e.separation, k.CIMHatchFill.separation)), scaleX: 1, angle: this._getValueOrOverrideExpression(r, i, "Rotation", O(e.rotation)), offsetX: this._getValueOrOverrideExpression(r, i, "OffsetX", O(e.offsetX)), offsetY: this._getValueOrOverrideExpression(r, i, "OffsetY", O(e.offsetY)), applyRandomOffset: !1, sampleAlphaOnly: !0, hasUnresolvedReplacementColor: !o });
211
+ }
212
+ _analyzeGradientFill(e, t) {
213
+ this._cimLayers.push({ type: "fill", spriteRasterizationParam: null, colorLocked: !!e.colorLocked, effects: t, color: [128, 128, 128, 1], height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, applyRandomOffset: !1, sampleAlphaOnly: !1, hasUnresolvedReplacementColor: !1 });
214
+ }
215
+ _analyzeSolidStroke(e, t, i, r) {
216
+ const { primitiveName: a, type: s } = e, n = F(e.color), o = O(e.width, k.CIMSolidStroke.width), l = se(e.capStyle, k.CIMSolidStroke.capstyle), h = se(e.joinStyle, k.CIMSolidStroke.joinstyle), c = e.miterLimit;
217
+ let d, p, _ = [];
218
+ if (this._analyzePrimitiveOverrides(a, t, null, null) && (_ = this._getPrimitiveMaterialOverrides(a, s)), t && t instanceof Array && t.length > 0) {
219
+ const g = t[t.length - 1].effect;
220
+ g && g.type === "CIMGeometricEffectDashes" && g.lineDashEnding === "NoConstraint" && g.offsetAlongLine === null && (d = g.dashTemplate, p = g.scaleDash, (t = [...t]).pop());
221
+ }
222
+ const f = d !== void 0 ? { type: "sprite-rasterization-param", resource: { type: "dash", dashTemplate: d, capStyle: l }, overrides: _ } : null;
223
+ this._cimLayers.push({ type: "line", spriteRasterizationParam: f, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(s, a, "Color", n), width: this._getValueOrOverrideExpression(s, a, "Width", o), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", l), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", h), miterLimit: c && this._getValueOrOverrideExpression(s, a, "MiterLimit", c), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: d, scaleDash: p, sampleAlphaOnly: !0 });
224
+ }
225
+ _analyzePictureStroke(e, t, i, r) {
226
+ const { primitiveName: a, type: s } = e, n = ge(e), o = O(e.width, k.CIMPictureStroke.width), l = se(e.capStyle, k.CIMPictureStroke.capstyle), h = se(e.joinStyle, k.CIMPictureStroke.joinstyle), c = e.miterLimit, d = { type: "sprite-rasterization-param", resource: e, overrides: this._getPrimitiveMaterialOverrides(a, s) };
227
+ this._cimLayers.push({ type: "line", spriteRasterizationParam: d, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(s, a, "TintColor", n), width: this._getValueOrOverrideExpression(s, a, "Width", o), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", l), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", h), miterLimit: c && this._getValueOrOverrideExpression(s, a, "MiterLimit", c), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: null, scaleDash: !1, sampleAlphaOnly: !1 });
228
+ }
229
+ _analyzeGradientStroke(e, t, i, r) {
230
+ const { primitiveName: a, type: s } = e, n = O(e.width, k.CIMSolidStroke.width), o = se(e.capStyle, k.CIMGradientStroke.capstyle), l = se(e.joinStyle, k.CIMGradientStroke.joinstyle), h = e.miterLimit;
231
+ this._cimLayers.push({ type: "line", spriteRasterizationParam: null, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: [128, 128, 128, 1], width: this._getValueOrOverrideExpression(s, a, "Width", n), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", o), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", l), miterLimit: h && this._getValueOrOverrideExpression(s, a, "MiterLimit", h), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: null, scaleDash: !1, sampleAlphaOnly: !1 });
232
+ }
233
+ _analyzeMarker(e, t, i, r, a, s, n, o, l = !1, h = !1) {
234
+ if (l || (l = !!e.colorLocked), this._analyzeMarkerInsidePolygon(e, t, l))
235
+ return;
236
+ const c = O(e.size, k.CIMVectorMarker.size), d = O(e.rotation), p = O(e.offsetX), _ = O(e.offsetY), { primitiveName: f, type: g } = e, y = this._getValueOrOverrideExpression(g, f, "Size", c), m = this._getValueOrOverrideExpression(g, f, "Rotation", d), M = this._getValueOrOverrideExpression(g, f, "OffsetX", p), w = this._getValueOrOverrideExpression(g, f, "OffsetY", _);
237
+ switch (e.type) {
238
+ case "CIMPictureMarker":
239
+ this._analyzePictureMarker(e, t, i, r, a, s, y, m, M, w, o, l, h);
240
+ break;
241
+ case "CIMVectorMarker":
242
+ this._analyzeVectorMarker(e, t, i, r, a, s, y, m, M, w, o, n, l, h);
243
+ }
244
+ }
245
+ _analyzeMarkerInsidePolygon(e, t, i) {
246
+ const { markerPlacement: r, type: a } = e;
247
+ if (!r || r.type !== "CIMMarkerPlacementInsidePolygon")
248
+ return !1;
249
+ if (a === "CIMVectorMarker" || a === "CIMPictureMarker") {
250
+ const d = e.primitiveName;
251
+ if (d && this._analyzePrimitiveOverrides([d], t, null, null))
252
+ return !1;
253
+ const p = r.primitiveName;
254
+ if (p && this._analyzePrimitiveOverrides([p], t, null, null))
255
+ return !1;
256
+ if (a === "CIMVectorMarker") {
257
+ const { markerGraphics: _ } = e;
258
+ if (_)
259
+ for (const f of _) {
260
+ const { symbol: g } = f;
261
+ if ((g == null ? void 0 : g.type) === "CIMPolygonSymbol" && g.symbolLayers) {
262
+ const { symbolLayers: y } = g;
263
+ for (const m of y)
264
+ if (m.type === "CIMSolidStroke")
265
+ return !1;
266
+ }
267
+ }
268
+ } else {
269
+ const { animatedSymbolProperties: _ } = e;
270
+ if (_)
271
+ return !1;
272
+ }
273
+ }
274
+ const s = Math.abs(r.stepX), n = Math.abs(r.stepY);
275
+ if (s === 0 || n === 0)
276
+ return !0;
277
+ let o, l;
278
+ if (r.gridType === "Random") {
279
+ const d = It(Fi), p = Math.max(Math.floor(d / s), 1);
280
+ o = n * Math.max(Math.floor(d / n), 1), l = p * s / o;
281
+ } else
282
+ r.shiftOddRows ? (o = 2 * n, l = s / n * 0.5) : (o = n, l = s / n);
283
+ const h = ge(e), c = e.type === "CIMCharacterMarker" ? null : { type: "sprite-rasterization-param", resource: e, overrides: [] };
284
+ return this._cimLayers.push({ type: "fill", spriteRasterizationParam: c, colorLocked: i, effects: t, color: h, height: o, scaleX: l, angle: r.gridAngle, offsetX: O(r.offsetX), offsetY: O(r.offsetY), applyRandomOffset: r.gridType === "Random", sampleAlphaOnly: e.type !== "CIMPictureMarker", hasUnresolvedReplacementColor: !0 }), !0;
285
+ }
286
+ _analyzePictureMarker(e, t, i, r, a, s, n, o, l, h, c, d, p) {
287
+ var T, S, z, U, B, W, V, q;
288
+ const { primitiveName: _, type: f } = e;
289
+ let g = O(e.scaleX, 1);
290
+ const y = ge(e);
291
+ i || (i = this._createMarkerPlacementOverrideExpression(e.markerPlacement));
292
+ const m = this._createAnimatedSymbolPropertiesOverrideExpression(e.animatedSymbolProperties), M = e.anchorPoint ?? { x: 0, y: 0 };
293
+ if ("width" in e && typeof e.width == "number") {
294
+ const Y = e.width;
295
+ let K = 1;
296
+ const G = this._resourceManager.getResource(e.url);
297
+ G != null && (K = G.width / G.height), g /= K * (O(e.size) / Y);
298
+ }
299
+ const w = [...r];
300
+ let x;
301
+ e.primitiveName && w.push(e.primitiveName), e.animatedSymbolProperties || m ? x = { type: "animated", url: e.url, urlHash: "H" + Rt(e.url), playAnimation: (T = e.animatedSymbolProperties) == null ? void 0 : T.playAnimation, reverseAnimation: (S = e.animatedSymbolProperties) == null ? void 0 : S.reverseAnimation, randomizeStartTime: (z = e.animatedSymbolProperties) == null ? void 0 : z.randomizeStartTime, randomizeStartSeed: (U = e.animatedSymbolProperties) == null ? void 0 : U.randomizeStartSeed, startTimeOffset: (B = e.animatedSymbolProperties) == null ? void 0 : B.startTimeOffset, duration: (W = e.animatedSymbolProperties) == null ? void 0 : W.duration, repeatType: (V = e.animatedSymbolProperties) == null ? void 0 : V.repeatType, repeatDelay: (q = e.animatedSymbolProperties) == null ? void 0 : q.repeatDelay } : (x = zt(e), x.markerPlacement = null);
302
+ const b = { type: "sprite-rasterization-param", resource: x, overrides: this._getMaterialOverrides(w, f) };
303
+ m && b.overrides.push(...m.overrides), this._cimLayers.push({ type: "marker", spriteRasterizationParam: b, colorLocked: d, effects: t, scaleSymbolsProportionally: !1, alignment: a, size: n, scaleX: this._getValueOrOverrideExpression(f, _, "ScaleX", g), rotation: o, offsetX: l, offsetY: h, transform: { type: "cim-marker-transform-param", params: c }, color: this._getValueOrOverrideExpression(f, _, "TintColor", y), anchorPoint: { x: M.x, y: M.y }, isAbsoluteAnchorPoint: e.anchorPointUnits !== "Relative", outlineColor: [0, 0, 0, 0], outlineWidth: 0, frameHeight: 0, widthRatio: 1, rotateClockwise: !!e.rotateClockwise, referenceSize: s, sizeRatio: 1, isOutline: p, markerPlacement: i, animatedSymbolProperties: m });
304
+ }
305
+ _analyzeVectorMarker(e, t, i, r, a, s, n, o, l, h, c, d, p, _) {
306
+ const f = e.markerGraphics;
307
+ if (!f)
308
+ return;
309
+ const g = e.frame;
310
+ let y = 0;
311
+ if (y = g ? g.ymax - g.ymin : s, y) {
312
+ const m = { offsetX: l, offsetY: h, rotation: o, size: n, frameHeight: y, rotateClockWise: !!e.rotateClockwise };
313
+ c = [...c, m];
314
+ }
315
+ i || (i = this._createMarkerPlacementOverrideExpression(e.markerPlacement));
316
+ for (const m of f)
317
+ if (m) {
318
+ const M = m.symbol;
319
+ if (!M)
320
+ continue;
321
+ const w = m.primitiveName;
322
+ let x;
323
+ if (w && r.push(w), (M.type === "CIMPointSymbol" || M.type === "CIMTextSymbol") && g) {
324
+ let b = 0, T = 0;
325
+ const S = m.geometry;
326
+ "x" in S && "y" in S && (b += S.x - 0.5 * (g.xmin + g.xmax), T += S.y - 0.5 * (g.ymin + g.ymax));
327
+ const z = e.anchorPoint;
328
+ z && (e.anchorPointUnits === "Absolute" ? (b -= z.x, T -= z.y) : g && (b -= (g.xmax - g.xmin) * z.x, T -= (g.ymax - g.ymin) * z.y));
329
+ const U = { offsetX: b, offsetY: T, rotation: 0, size: 0, frameHeight: 0, rotateClockWise: !1 };
330
+ x = [...c, U];
331
+ }
332
+ switch (M.type) {
333
+ case "CIMPointSymbol":
334
+ case "CIMLineSymbol":
335
+ case "CIMPolygonSymbol":
336
+ d || yr(M) ? this._analyzeMultiLayerGraphicNonSDF(e, t, i, null, m, r, a, s, x ?? c, y, p, _) : this._analyzeMultiLayerGraphic(e, t, i, null, m, r, a, s, x ?? c, y, p, _);
337
+ break;
338
+ case "CIMTextSymbol":
339
+ this._analyzeTextGraphic(t, i, m, r, a, s, x ?? c, p);
340
+ }
341
+ w && r.pop();
342
+ }
343
+ }
344
+ _analyzeMultiLayerGraphic(e, t, i, r, a, s, n, o, l, h, c, d) {
345
+ const p = a.symbol, _ = p.symbolLayers;
346
+ if (!_)
347
+ return;
348
+ let f = _.length;
349
+ if (gr(_))
350
+ return void this._analyzeCompositeMarkerGraphic(e, t, i, r, a, _, n, o, l, h, c, d);
351
+ const g = this._resourceManager.geometryEngine, y = tt.applyEffects(p.effects, a.geometry, g);
352
+ if (y)
353
+ for (; f--; ) {
354
+ const m = _[f];
355
+ if (!m || m.enable === !1)
356
+ continue;
357
+ const M = m.primitiveName;
358
+ switch (M && s.push(M), m.type) {
359
+ case "CIMSolidFill":
360
+ case "CIMSolidStroke": {
361
+ const w = tt.applyEffects(m.effects, y, g), x = rt(w);
362
+ if (!x)
363
+ continue;
364
+ const b = e.anchorPointUnits !== "Relative", [T, S, z, U] = st(x, e.frame, e.size, e.anchorPoint, b), B = m.type === "CIMSolidFill", W = { type: "sdf", geom: w, asFill: B }, { path: V } = m, q = B ? F(ye(m)) : V == null ? F(ze(m)) : [0, 0, 0, 0], Y = B ? [0, 0, 0, 0] : F(ze(m)), K = it(m) ?? 0;
365
+ if (!B && !K)
366
+ break;
367
+ const G = a.primitiveName;
368
+ let _e = null;
369
+ B && !m.colorLocked && (_e = this._maybeGetValueOrOverrideExpression(G, "FillColor"));
370
+ let oe = null;
371
+ B || m.colorLocked || (oe = this._maybeGetValueOrOverrideExpression(G, "StrokeColor"));
372
+ const Pe = _e ?? this._getValueOrOverrideExpression(m.type, M, "Color", q), me = oe ?? this._getValueOrOverrideExpression(m.type, M, "Color", Y), Z = this._maybeGetValueOrOverrideExpression(G, "StrokeWidth") ?? this._getValueOrOverrideExpression(m.type, M, "Width", K), fe = V ? { type: "sprite-rasterization-param", resource: { type: "path", path: V, asFill: B }, overrides: [] } : { type: "sprite-rasterization-param", resource: W, overrides: [] };
373
+ this._cimLayers.push({ type: "marker", spriteRasterizationParam: fe, colorLocked: !!m.colorLocked || !!c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: S, y: z }, isAbsoluteAnchorPoint: b, size: h, rotation: 0, offsetX: 0, offsetY: 0, scaleX: 1, transform: { type: "cim-marker-transform-param", params: l }, frameHeight: h, widthRatio: U, rotateClockwise: !1, referenceSize: o, sizeRatio: T, color: Pe, outlineColor: me, outlineWidth: Z, isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
374
+ break;
375
+ }
376
+ case "CIMPictureMarker":
377
+ case "CIMVectorMarker":
378
+ m.markerPlacement ? this._analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, !!m.colorLocked || !!c, d) : this._analyzeMarker(m, t, i, s, n, o, !1, l, c, d);
379
+ break;
380
+ default:
381
+ this._analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, !!m.colorLocked || !!c, d);
382
+ }
383
+ M && s.pop();
384
+ }
385
+ }
386
+ _analyzeTextGraphic(e, t, i, r, a, s, n, o) {
387
+ var me;
388
+ const l = [];
389
+ he.findApplicableOverrides(i, this._primitiveOverrides, l);
390
+ const h = i.geometry;
391
+ if (!("x" in h) || !("y" in h))
392
+ return;
393
+ const c = i.symbol, d = Oi(c), p = Si(c.fontStyleName), _ = fi(c.fontFamilyName);
394
+ c.font = { family: _, decoration: d, ...p };
395
+ const f = O(c.height, k.CIMTextSymbol.height), g = O(c.angle), y = O(c.offsetX), m = O(c.offsetY), M = F(ye(c));
396
+ let w = F(ze(c)), x = it(c) ?? 0;
397
+ x || (w = F(ye(c.haloSymbol)), x = O(c.haloSize));
398
+ let b = !1;
399
+ if ((me = c.symbol) != null && me.symbolLayers)
400
+ for (const Z of c.symbol.symbolLayers)
401
+ F(ye(Z)) != null && (b = !!Z.colorLocked);
402
+ const T = i.primitiveName;
403
+ let S = null;
404
+ b || (S = this._maybeGetValueOrOverrideExpression(T, "FillColor"));
405
+ const z = this._maybeGetValueOrOverrideExpression(T, "TextSize"), U = this._maybeGetValueOrOverrideExpression(T, "TextAngle"), B = this._maybeGetValueOrOverrideExpression(T, "TextOffsetX"), W = this._maybeGetValueOrOverrideExpression(T, "TextOffsetY");
406
+ let V = null, q = null, Y = 0;
407
+ if (c.callout && c.callout.type === "CIMBackgroundCallout") {
408
+ const Z = c.callout;
409
+ if (Z.backgroundSymbol) {
410
+ const fe = Z.backgroundSymbol.symbolLayers;
411
+ if (fe)
412
+ for (const le of fe)
413
+ le.type === "CIMSolidFill" ? V = F(le.color) : le.type === "CIMSolidStroke" && (q = F(le.color), Y = O(le.width, k.CIMSolidStroke.width));
414
+ }
415
+ }
416
+ const K = this._getValueOrOverrideExpression(c.type, i.primitiveName, "TextString", i.textString ?? "");
417
+ if (K == null)
418
+ return;
419
+ const { fontStyleName: G } = c, _e = _ + (G ? "-" + G.toLowerCase() : "-regular"), oe = this._getMaterialOverrides(r, c.type);
420
+ oe.push(...this._getPrimitiveMaterialOverrides(i.primitiveName, c.type));
421
+ const Pe = { type: "text-rasterization-param", resource: { type: "text", textString: i.textString ?? "", font: c.font, symbol: c, primitiveName: i.primitiveName }, overrides: oe };
422
+ this._cimLayers.push({ type: "text", lineWidth: null, textRasterizationParam: Pe, colorLocked: !!o || !!b, effects: e, alignment: a, anchorPoint: { x: 0, y: 0 }, isAbsoluteAnchorPoint: !1, fontName: _e, decoration: d, weight: p.weight, style: p.style, size: z ?? f, angle: U ?? g, offsetX: B ?? y, offsetY: W ?? m, transform: { type: "cim-marker-transform-param", params: n }, horizontalAlignment: Pi(c.horizontalAlignment), verticalAlignment: Ti(c.verticalAlignment), text: K, color: S ?? this._getValueOrOverrideExpression(c.type, i.primitiveName, "Color", M), outlineColor: w, outlineSize: x, backgroundColor: V, borderLineColor: q, borderLineWidth: Y, referenceSize: s, sizeRatio: 1, markerPlacement: t });
423
+ }
424
+ _analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, c, d) {
425
+ const p = this._buildSimpleMarker(e, a), _ = e.primitiveName, f = this._analyzeMaterialOverrides(_, ["Rotation", "OffsetX", "OffsetY"]), g = this._normalizePrimitiveOverrideProps(f), [y, m, M] = ae.getTextureAnchor(p, this._resourceManager), w = this._getMaterialOverrides(s, e.type);
426
+ w.push(...g);
427
+ const x = { type: "sprite-rasterization-param", resource: { ...p, avoidSDFRasterization: !0 }, overrides: w };
428
+ this._cimLayers.push({ type: "marker", spriteRasterizationParam: x, colorLocked: c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: y, y: m }, isAbsoluteAnchorPoint: !1, size: h, rotation: 0, offsetX: 0, offsetY: 0, transform: { type: "cim-marker-transform-param", params: l }, color: [255, 255, 255, 1], outlineColor: [0, 0, 0, 0], outlineWidth: 0, scaleX: 1, frameHeight: h, widthRatio: 1, rotateClockwise: !!e.rotateClockwise, referenceSize: o, sizeRatio: M / ie(e.size), isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
429
+ }
430
+ _createMarkerPlacementOverrideExpression(e) {
431
+ if (!e)
432
+ return null;
433
+ const t = [];
434
+ return he.findApplicableOverrides(e, this._primitiveOverrides, t), { type: "cim-marker-placement-info", placement: e, overrides: mt(t) };
435
+ }
436
+ _createAnimatedSymbolPropertiesOverrideExpression(e) {
437
+ if (!e)
438
+ return null;
439
+ const t = [];
440
+ return he.findApplicableOverrides(e, this._primitiveOverrides, t), { type: "cim-animation-info", animation: e, overrides: mt(t) };
441
+ }
442
+ _buildSimpleMarker(e, t) {
443
+ return { type: e.type, enable: !0, name: e.name, colorLocked: e.colorLocked, primitiveName: e.primitiveName, anchorPoint: e.anchorPoint, anchorPointUnits: e.anchorPointUnits, offsetX: 0, offsetY: 0, rotateClockwise: e.rotateClockwise, rotation: 0, size: e.size, billboardMode3D: e.billboardMode3D, depth3D: e.depth3D, frame: e.frame, markerGraphics: [t], scaleSymbolsProportionally: e.scaleSymbolsProportionally, respectFrame: e.respectFrame, clippingPath: e.clippingPath };
444
+ }
445
+ _analyzeCompositeMarkerGraphic(e, t, i, r, a, s, n, o, l, h, c, d) {
446
+ const p = a.geometry, _ = s[0], f = s[1], g = rt(p);
447
+ if (!g)
448
+ return;
449
+ const y = e.anchorPointUnits !== "Relative", [m, M, w, x] = st(g, e.frame, e.size, e.anchorPoint, y), { path: b } = f, T = f.primitiveName, S = _.primitiveName, z = a.primitiveName;
450
+ let U = null;
451
+ f.colorLocked || c || (U = this._maybeGetValueOrOverrideExpression(z, "FillColor"));
452
+ const B = U ?? this._getValueOrOverrideExpression(f.type, T, "Color", F(f.color));
453
+ let W = null;
454
+ _.colorLocked || c || (W = this._maybeGetValueOrOverrideExpression(z, "StrokeColor"));
455
+ const V = W ?? this._getValueOrOverrideExpression(_.type, S, "Color", F(_.color)), q = this._maybeGetValueOrOverrideExpression(z, "StrokeWidth") ?? this._getValueOrOverrideExpression(_.type, S, "Width", O(_.width, k.CIMSolidStroke.width)), Y = { type: "sprite-rasterization-param", resource: b ? { type: "path", path: b, asFill: !0 } : { type: "sdf", geom: p, asFill: !0 }, overrides: [] };
456
+ this._cimLayers.push({ type: "marker", spriteRasterizationParam: Y, colorLocked: c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: M, y: w }, isAbsoluteAnchorPoint: y, size: h, rotation: 0, offsetX: 0, offsetY: 0, scaleX: 1, transform: { type: "cim-marker-transform-param", params: l }, frameHeight: h, widthRatio: x, rotateClockwise: !1, referenceSize: o, sizeRatio: m, color: B, outlineColor: V, outlineWidth: q, isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
457
+ }
458
+ _setPoMap(e, t, i) {
459
+ let r;
460
+ this._poMap[e] ? r = this._poMap[e] : (r = {}, this._poMap[e] = r), r[t] = i;
461
+ }
462
+ _maybeGetValueOrOverrideExpression(e, t, i) {
463
+ return this._getValueOrOverrideExpression("", e, t, i, !1);
464
+ }
465
+ _getValueOrOverrideExpression(e, t, i, r, a = !0) {
466
+ if (a && !Ci(r) && (r = Re(e, i.toLowerCase())), t == null)
467
+ return r;
468
+ const s = this._poMap[t];
469
+ if (s == null)
470
+ return r;
471
+ const n = s[i];
472
+ return typeof n == "string" || typeof n == "number" || Array.isArray(n) ? n : n ? { valueExpressionInfo: n, defaultValue: r } : r;
473
+ }
474
+ _analyzePrimitiveOverrides(e, t, i, r) {
475
+ if (e == null)
476
+ return !1;
477
+ typeof e == "string" && (e = [e]);
478
+ for (const a of this._primitiveOverrides)
479
+ if (e.includes(a.primitiveName) && a.valueExpressionInfo)
480
+ return !0;
481
+ if (t != null) {
482
+ for (const a of t)
483
+ if ((a == null ? void 0 : a.overrides.length) > 0)
484
+ return !0;
485
+ }
486
+ if (i != null) {
487
+ for (const a of i)
488
+ if ((a == null ? void 0 : a.overrides.length) > 0)
489
+ return !0;
490
+ }
491
+ if (r != null) {
492
+ for (const a of r)
493
+ if ((a == null ? void 0 : a.overrides.length) > 0)
494
+ return !0;
495
+ }
496
+ return !1;
497
+ }
498
+ _getMaterialOverrides(e, t) {
499
+ if (!e)
500
+ return [];
501
+ const i = [];
502
+ for (const r of e)
503
+ i.push(...this._getPrimitiveMaterialOverrides(r, t));
504
+ return i;
505
+ }
506
+ _getPrimitiveMaterialOverrides(e, t) {
507
+ if (!e)
508
+ return [];
509
+ const i = this._normalizePrimitiveOverrideProps(this._primitiveOverrides.filter((r) => r.primitiveName === e));
510
+ return i.forEach((r) => r.defaultValue = Re(t, r.propertyName.toLowerCase())), i;
511
+ }
512
+ _analyzeMaterialOverrides(e, t) {
513
+ return this._primitiveOverrides.filter((i) => i.primitiveName !== e || !t.includes(i.propertyName));
514
+ }
515
+ _normalizePrimitiveOverrideProps(e) {
516
+ return e.map((t) => ({ ...t, propertyName: Ft(t.propertyName) }));
517
+ }
518
+ }
519
+ function Ae(u) {
520
+ if (u && u.indexOf("Level_") === 0) {
521
+ const e = parseInt(u.substr(6), 10);
522
+ if (!isNaN(e))
523
+ return e;
524
+ }
525
+ return 0;
526
+ }
527
+ const gr = (u) => u && u.length === 2 && u[0].enable && u[1].enable && u[0].type === "CIMSolidStroke" && u[1].type === "CIMSolidFill" && u[0].path == null && u[1].path == null && !u[0].effects && !u[1].effects;
528
+ function yr(u) {
529
+ const e = u.symbolLayers;
530
+ if (!e || e.length !== 2)
531
+ return !1;
532
+ const t = e.find((r) => {
533
+ var a;
534
+ return (a = r.effects) == null ? void 0 : a.find((s) => s.type === "CIMGeometricEffectDashes" && s.dashTemplate != null);
535
+ }), i = e.find((r) => {
536
+ var a;
537
+ return (a = r.effects) == null ? void 0 : a.find((s) => s.type === "CIMGeometricEffectAddControlPoints");
538
+ });
539
+ return !!t || !!i;
540
+ }
541
+ function mt(u) {
542
+ return zt(u).map((e) => ({ ...e, propertyName: Ft(e.propertyName) }));
543
+ }
544
+ let vr = class {
545
+ constructor(e) {
546
+ this.events = new $t(), this._hasMajorPerformanceCaveat = !1, this._lastRenderFrameCounter = 0, this._canvas = document.createElement("canvas"), this._canvas.setAttribute("style", "width: 100%; height:100%; display:block; willChange:transform");
547
+ const t = { failIfMajorPerformanceCaveat: !0, alpha: !0, antialias: !1, depth: !0, stencil: !0 };
548
+ e.appendChild(this._canvas);
549
+ let i = Ke(this._canvas, t);
550
+ i || (i = Ke(this._canvas, { ...t, failIfMajorPerformanceCaveat: !1 }), this._hasMajorPerformanceCaveat = !0), this._gl = i, this._handles = Dt([Lt(this._canvas, "webglcontextlost", (r) => this.events.emit("webgl-context-lost", r))]);
551
+ }
552
+ destroy() {
553
+ var e;
554
+ (e = this._canvas.parentNode) == null || e.removeChild(this._canvas), this._canvas = null, this._handles.remove(), this._gl = null;
555
+ }
556
+ get gl() {
557
+ return this._gl;
558
+ }
559
+ render(e, t) {
560
+ if (this._hasMajorPerformanceCaveat || H("esri-force-performance-mode")) {
561
+ if (++this._lastRenderFrameCounter >= H("esri-performance-mode-frames-between-render") && (t(), this._lastRenderViewState = e.state.clone(), this._lastRenderFrameCounter = 0), this._lastRenderViewState) {
562
+ const [i, r, a, s, n, o] = this._computeViewTransform(this._lastRenderViewState, e.state);
563
+ this._canvas.style.transform = `matrix(${i}, ${r}, ${a}, ${s}, ${n}, ${o})`;
564
+ }
565
+ } else
566
+ t();
567
+ }
568
+ resize(e) {
569
+ const t = this._canvas, i = t.style, { state: { size: r }, pixelRatio: a } = e, s = r[0], n = r[1], o = Math.round(s * a), l = Math.round(n * a);
570
+ t.width === o && t.height === l || (t.width = o, t.height = l), i.width = s + "px", i.height = n + "px";
571
+ }
572
+ _computeViewTransform(e, t) {
573
+ const [i, r] = e.center, [a, s] = t.center, [n, o] = e.toScreen([0, 0], a, s), [l, h] = e.toScreen([0, 0], i, r), c = l - n, d = h - o, p = e.scale / t.scale, _ = t.rotation - e.rotation, f = Wt();
574
+ return Nt(f), Ut(f, f, [p, p]), Vt(f, f, Gt(_)), Ht(f, f, [c, d]), f;
575
+ }
576
+ };
577
+ const br = { background: { "background.frag": `#ifdef PATTERN
578
+ uniform lowp float u_opacity;
579
+ uniform lowp sampler2D u_texture;
580
+ varying mediump vec4 v_tlbr;
581
+ varying mediump vec2 v_tileTextureCoord;
582
+ #else
583
+ uniform lowp vec4 u_color;
584
+ #endif
585
+ void main() {
586
+ #ifdef PATTERN
587
+ mediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);
588
+ mediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);
589
+ lowp vec4 color = texture2D(u_texture, samplePos);
590
+ gl_FragColor = u_opacity * color;
591
+ #else
592
+ gl_FragColor = u_color;
593
+ #endif
594
+ }`, "background.vert": `precision mediump float;
595
+ attribute vec2 a_pos;
596
+ uniform highp mat3 u_dvsMat3;
597
+ uniform mediump float u_coord_range;
598
+ uniform mediump float u_depth;
599
+ #ifdef PATTERN
600
+ uniform mediump mat3 u_pattern_matrix;
601
+ varying mediump vec2 v_tileTextureCoord;
602
+ uniform mediump vec4 u_tlbr;
603
+ uniform mediump vec2 u_mosaicSize;
604
+ varying mediump vec4 v_tlbr;
605
+ #endif
606
+ void main() {
607
+ gl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);
608
+ #ifdef PATTERN
609
+ v_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;
610
+ v_tlbr = u_tlbr / u_mosaicSize.xyxy;
611
+ #endif
612
+ }` }, circle: { "circle.frag": `precision lowp float;
613
+ varying lowp vec4 v_color;
614
+ varying lowp vec4 v_stroke_color;
615
+ varying mediump float v_blur;
616
+ varying mediump float v_stroke_width;
617
+ varying mediump float v_radius;
618
+ varying mediump vec2 v_offset;
619
+ void main()
620
+ {
621
+ mediump float dist = length(v_offset);
622
+ mediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);
623
+ lowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));
624
+ gl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);
625
+ }`, "circle.vert": `precision mediump float;
626
+ attribute vec2 a_pos;
627
+ #pragma header
628
+ varying lowp vec4 v_color;
629
+ varying lowp vec4 v_stroke_color;
630
+ varying mediump float v_blur;
631
+ varying mediump float v_stroke_width;
632
+ varying mediump float v_radius;
633
+ varying mediump vec2 v_offset;
634
+ uniform highp mat3 u_dvsMat3;
635
+ uniform highp mat3 u_displayMat3;
636
+ uniform mediump vec2 u_circleTranslation;
637
+ uniform mediump float u_depth;
638
+ uniform mediump float u_antialiasingWidth;
639
+ void main()
640
+ {
641
+ #pragma main
642
+ v_color = color * opacity;
643
+ v_stroke_color = stroke_color * stroke_opacity;
644
+ v_stroke_width = stroke_width;
645
+ v_radius = radius;
646
+ v_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));
647
+ mediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);
648
+ v_offset = offset;
649
+ mediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);
650
+ gl_Position = vec4(pos.xy, u_depth, 1.0);
651
+ }` }, fill: { "fill.frag": `precision lowp float;
652
+ #ifdef PATTERN
653
+ uniform lowp sampler2D u_texture;
654
+ varying mediump vec2 v_tileTextureCoord;
655
+ varying mediump vec4 v_tlbr;
656
+ #endif
657
+ varying lowp vec4 v_color;
658
+ vec4 mixColors(vec4 color1, vec4 color2) {
659
+ float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);
660
+ vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);
661
+ return vec4(compositeColor, compositeAlpha);
662
+ }
663
+ void main()
664
+ {
665
+ #ifdef PATTERN
666
+ mediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);
667
+ mediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);
668
+ lowp vec4 color = texture2D(u_texture, samplePos);
669
+ gl_FragColor = v_color[3] * color;
670
+ #else
671
+ gl_FragColor = v_color;
672
+ #endif
673
+ }`, "fill.vert": `precision mediump float;
674
+ attribute vec2 a_pos;
675
+ #pragma header
676
+ uniform highp mat3 u_dvsMat3;
677
+ uniform highp mat3 u_displayMat3;
678
+ uniform mediump float u_depth;
679
+ uniform mediump vec2 u_fillTranslation;
680
+ #ifdef PATTERN
681
+ #include <util/util.glsl>
682
+ uniform mediump vec2 u_mosaicSize;
683
+ uniform mediump float u_patternFactor;
684
+ varying mediump vec2 v_tileTextureCoord;
685
+ varying mediump vec4 v_tlbr;
686
+ #endif
687
+ varying lowp vec4 v_color;
688
+ void main()
689
+ {
690
+ #pragma main
691
+ v_color = color * opacity;
692
+ #ifdef PATTERN
693
+ float patternWidth = nextPOT(tlbr.z - tlbr.x);
694
+ float patternHeight = nextPOT(tlbr.w - tlbr.y);
695
+ float scaleX = 1.0 / (patternWidth * u_patternFactor);
696
+ float scaleY = 1.0 / (patternHeight * u_patternFactor);
697
+ mat3 patterMat = mat3(scaleX, 0.0, 0.0,
698
+ 0.0, -scaleY, 0.0,
699
+ 0.0, 0.0, 1.0);
700
+ v_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;
701
+ v_tlbr = tlbr / u_mosaicSize.xyxy;
702
+ #endif
703
+ vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);
704
+ gl_Position = vec4(pos.xy, u_depth, 1.0);
705
+ }` }, icon: { "icon.frag": `precision mediump float;
706
+ uniform lowp sampler2D u_texture;
707
+ #ifdef SDF
708
+ uniform lowp vec4 u_color;
709
+ uniform lowp vec4 u_outlineColor;
710
+ #endif
711
+ varying mediump vec2 v_tex;
712
+ varying lowp float v_opacity;
713
+ varying mediump vec2 v_size;
714
+ varying lowp vec4 v_color;
715
+ #ifdef SDF
716
+ varying mediump flaot v_halo_width;
717
+ #endif
718
+ #include <util/encoding.glsl>
719
+ vec4 mixColors(vec4 color1, vec4 color2) {
720
+ float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);
721
+ vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);
722
+ return vec4(compositeColor, compositeAlpha);
723
+ }
724
+ void main()
725
+ {
726
+ #ifdef SDF
727
+ lowp vec4 fillPixelColor = v_color;
728
+ float d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;
729
+ const float softEdgeRatio = 0.248062016;
730
+ float size = max(v_size.x, v_size.y);
731
+ float dist = d * softEdgeRatio * size;
732
+ fillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);
733
+ if (v_halo_width > 0.25) {
734
+ lowp vec4 outlinePixelColor = u_outlineColor;
735
+ const float outlineLimitRatio = (16.0 / 86.0);
736
+ float clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));
737
+ outlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);
738
+ gl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);
739
+ }
740
+ else {
741
+ gl_FragColor = v_opacity * fillPixelColor;
742
+ }
743
+ #else
744
+ lowp vec4 texColor = texture2D(u_texture, v_tex);
745
+ gl_FragColor = v_opacity * texColor;
746
+ #endif
747
+ }`, "icon.vert": `attribute vec2 a_pos;
748
+ attribute vec2 a_vertexOffset;
749
+ attribute vec4 a_texAngleRange;
750
+ attribute vec4 a_levelInfo;
751
+ attribute float a_opacityInfo;
752
+ #pragma header
753
+ varying lowp vec4 v_color;
754
+ #ifdef SDF
755
+ varying mediump float v_halo_width;
756
+ #endif
757
+ uniform highp mat3 u_dvsMat3;
758
+ uniform highp mat3 u_displayMat3;
759
+ uniform highp mat3 u_displayViewMat3;
760
+ uniform mediump vec2 u_iconTranslation;
761
+ uniform vec2 u_mosaicSize;
762
+ uniform mediump float u_depth;
763
+ uniform mediump float u_mapRotation;
764
+ uniform mediump float u_level;
765
+ uniform lowp float u_keepUpright;
766
+ uniform mediump float u_fadeDuration;
767
+ varying mediump vec2 v_tex;
768
+ varying lowp float v_opacity;
769
+ varying mediump vec2 v_size;
770
+ const float C_OFFSET_PRECISION = 1.0 / 8.0;
771
+ const float C_256_TO_RAD = 3.14159265359 / 128.0;
772
+ const float C_DEG_TO_RAD = 3.14159265359 / 180.0;
773
+ const float tileCoordRatio = 1.0 / 8.0;
774
+ uniform highp float u_time;
775
+ void main()
776
+ {
777
+ #pragma main
778
+ v_color = color;
779
+ v_opacity = opacity;
780
+ #ifdef SDF
781
+ v_halo_width = halo_width;
782
+ #endif
783
+ float modded = mod(a_opacityInfo, 128.0);
784
+ float targetOpacity = (a_opacityInfo - modded) / 128.0;
785
+ float startOpacity = modded / 127.0;
786
+ float interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);
787
+ v_opacity *= interpolatedOpacity;
788
+ mediump float a_angle = a_levelInfo[1];
789
+ mediump float a_minLevel = a_levelInfo[2];
790
+ mediump float a_maxLevel = a_levelInfo[3];
791
+ mediump vec2 a_tex = a_texAngleRange.xy;
792
+ mediump float delta_z = 0.0;
793
+ mediump float rotated = mod(a_angle + u_mapRotation, 256.0);
794
+ delta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));
795
+ delta_z += 1.0 - step(a_minLevel, u_level);
796
+ delta_z += step(a_maxLevel, u_level);
797
+ delta_z += step(v_opacity, 0.0);
798
+ vec2 offset = C_OFFSET_PRECISION * a_vertexOffset;
799
+ v_size = abs(offset);
800
+ #ifdef SDF
801
+ offset = (120.0 / 86.0) * offset;
802
+ #endif
803
+ mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);
804
+ gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);
805
+ v_tex = a_tex.xy / u_mosaicSize;
806
+ }` }, line: { "line.frag": `precision lowp float;
807
+ varying mediump vec2 v_normal;
808
+ varying highp float v_accumulatedDistance;
809
+ varying mediump float v_lineHalfWidth;
810
+ varying lowp vec4 v_color;
811
+ varying mediump float v_blur;
812
+ #if defined (PATTERN) || defined(SDF)
813
+ varying mediump vec4 v_tlbr;
814
+ varying mediump vec2 v_patternSize;
815
+ varying mediump float v_widthRatio;
816
+ uniform sampler2D u_texture;
817
+ uniform mediump float u_antialiasing;
818
+ #endif
819
+ #ifdef SDF
820
+ #include <util/encoding.glsl>
821
+ #endif
822
+ void main()
823
+ {
824
+ mediump float fragDist = length(v_normal) * v_lineHalfWidth;
825
+ lowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);
826
+ #ifdef PATTERN
827
+ mediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));
828
+ mediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);
829
+ mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));
830
+ lowp vec4 color = texture2D(u_texture, texCoord);
831
+ gl_FragColor = alpha * v_color[3] * color;
832
+ #elif defined(SDF)
833
+ mediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));
834
+ mediump float relativeTexY = 0.5 + 0.25 * v_normal.y;
835
+ mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));
836
+ mediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;
837
+ float dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);
838
+ gl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;
839
+ #else
840
+ gl_FragColor = alpha * v_color;
841
+ #endif
842
+ }`, "line.vert": `precision mediump float;
843
+ attribute vec2 a_pos;
844
+ attribute vec4 a_extrude_offset;
845
+ attribute vec4 a_dir_normal;
846
+ attribute vec2 a_accumulatedDistance;
847
+ #pragma header
848
+ uniform highp mat3 u_dvsMat3;
849
+ uniform highp mat3 u_displayMat3;
850
+ uniform highp mat3 u_displayViewMat3;
851
+ uniform mediump float u_zoomFactor;
852
+ uniform mediump vec2 u_lineTranslation;
853
+ uniform mediump float u_antialiasing;
854
+ uniform mediump float u_depth;
855
+ varying mediump vec2 v_normal;
856
+ varying highp float v_accumulatedDistance;
857
+ const float scale = 1.0 / 31.0;
858
+ const mediump float tileCoordRatio = 8.0;
859
+ #if defined (SDF)
860
+ const mediump float sdfPatternHalfWidth = 15.5;
861
+ #endif
862
+ #if defined (PATTERN) || defined(SDF)
863
+ uniform mediump vec2 u_mosaicSize;
864
+ varying mediump vec4 v_tlbr;
865
+ varying mediump vec2 v_patternSize;
866
+ varying mediump float v_widthRatio;
867
+ #endif
868
+ varying lowp vec4 v_color;
869
+ varying mediump float v_lineHalfWidth;
870
+ varying mediump float v_blur;
871
+ void main()
872
+ {
873
+ #pragma main
874
+ v_color = color * opacity;
875
+ v_blur = blur + u_antialiasing;
876
+ v_normal = a_dir_normal.zw * scale;
877
+ #if defined (PATTERN) || defined(SDF)
878
+ v_tlbr = tlbr / u_mosaicSize.xyxy;
879
+ v_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);
880
+ #if defined (PATTERN)
881
+ v_widthRatio = width / v_patternSize.y;
882
+ #else
883
+ v_widthRatio = width / sdfPatternHalfWidth / 2.0;
884
+ #endif
885
+ #endif
886
+ v_lineHalfWidth = (width + u_antialiasing) * 0.5;
887
+ mediump vec2 dir = a_dir_normal.xy * scale;
888
+ mediump vec2 offset_ = a_extrude_offset.zw * scale * offset;
889
+ mediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;
890
+ mediump 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);
891
+ gl_Position = vec4(pos.xy, u_depth, 1.0);
892
+ #if defined (PATTERN) || defined(SDF)
893
+ v_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);
894
+ #endif
895
+ }` }, outline: { "outline.frag": `varying lowp vec4 v_color;
896
+ varying mediump vec2 v_normal;
897
+ void main()
898
+ {
899
+ lowp float dist = abs(v_normal.y);
900
+ lowp float alpha = smoothstep(1.0, 0.0, dist);
901
+ gl_FragColor = alpha * v_color;
902
+ }`, "outline.vert": `attribute vec2 a_pos;
903
+ attribute vec2 a_offset;
904
+ attribute vec2 a_xnormal;
905
+ #pragma header
906
+ varying lowp vec4 v_color;
907
+ uniform highp mat3 u_dvsMat3;
908
+ uniform highp mat3 u_displayMat3;
909
+ uniform mediump vec2 u_fillTranslation;
910
+ uniform mediump float u_depth;
911
+ uniform mediump float u_outline_width;
912
+ varying lowp vec2 v_normal;
913
+ const float scale = 1.0 / 15.0;
914
+ void main()
915
+ {
916
+ #pragma main
917
+ v_color = color * opacity;
918
+ v_normal = a_xnormal;
919
+ mediump vec2 dist = u_outline_width * scale * a_offset;
920
+ mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);
921
+ gl_Position = vec4(pos.xy, u_depth, 1.0);
922
+ }` }, text: { "text.frag": `uniform lowp sampler2D u_texture;
923
+ varying lowp vec2 v_tex;
924
+ varying lowp vec4 v_color;
925
+ varying mediump float v_edgeWidth;
926
+ varying mediump float v_edgeDistance;
927
+ void main()
928
+ {
929
+ lowp float dist = texture2D(u_texture, v_tex).a;
930
+ mediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);
931
+ gl_FragColor = alpha * v_color;
932
+ }`, "text.vert": `attribute vec2 a_pos;
933
+ attribute vec2 a_vertexOffset;
934
+ attribute vec4 a_texAngleRange;
935
+ attribute vec4 a_levelInfo;
936
+ attribute float a_opacityInfo;
937
+ #pragma header
938
+ varying lowp vec4 v_color;
939
+ uniform highp mat3 u_dvsMat3;
940
+ uniform highp mat3 u_displayMat3;
941
+ uniform highp mat3 u_displayViewMat3;
942
+ uniform mediump vec2 u_textTranslation;
943
+ uniform vec2 u_mosaicSize;
944
+ uniform mediump float u_depth;
945
+ uniform mediump float u_mapRotation;
946
+ uniform mediump float u_level;
947
+ uniform lowp float u_keepUpright;
948
+ uniform mediump float u_fadeDuration;
949
+ varying lowp vec2 v_tex;
950
+ const float offsetPrecision = 1.0 / 8.0;
951
+ const mediump float edgePos = 0.75;
952
+ uniform mediump float u_antialiasingWidth;
953
+ varying mediump float v_edgeDistance;
954
+ varying mediump float v_edgeWidth;
955
+ uniform lowp float u_halo;
956
+ const float sdfFontScale = 1.0 / 24.0;
957
+ const float sdfPixel = 3.0;
958
+ uniform highp float u_time;
959
+ void main()
960
+ {
961
+ #pragma main
962
+ if (u_halo > 0.5)
963
+ {
964
+ v_color = halo_color * opacity;
965
+ halo_width *= sdfPixel;
966
+ halo_blur *= sdfPixel;
967
+ }
968
+ else
969
+ {
970
+ v_color = color * opacity;
971
+ halo_width = 0.0;
972
+ halo_blur = 0.0;
973
+ }
974
+ float modded = mod(a_opacityInfo, 128.0);
975
+ float targetOpacity = (a_opacityInfo - modded) / 128.0;
976
+ float startOpacity = modded / 127.0;
977
+ float interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);
978
+ v_color *= interpolatedOpacity;
979
+ mediump float a_angle = a_levelInfo[1];
980
+ mediump float a_minLevel = a_levelInfo[2];
981
+ mediump float a_maxLevel = a_levelInfo[3];
982
+ mediump vec2 a_tex = a_texAngleRange.xy;
983
+ mediump float a_visMinAngle = a_texAngleRange.z;
984
+ mediump float a_visMaxAngle = a_texAngleRange.w;
985
+ mediump float delta_z = 0.0;
986
+ mediump float angle = mod(a_angle + u_mapRotation, 256.0);
987
+ if (a_visMinAngle < a_visMaxAngle)
988
+ {
989
+ delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));
990
+ }
991
+ else
992
+ {
993
+ delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));
994
+ }
995
+ delta_z += 1.0 - step(a_minLevel, u_level);
996
+ delta_z += step(a_maxLevel, u_level);
997
+ delta_z += step(v_color[3], 0.0);
998
+ v_tex = a_tex.xy / u_mosaicSize;
999
+ v_edgeDistance = edgePos - halo_width / size;
1000
+ v_edgeWidth = (u_antialiasingWidth + halo_blur) / size;
1001
+ mediump 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);
1002
+ gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);
1003
+ }` }, util: { "encoding.glsl": `const vec4 rgba2float_factors = vec4(
1004
+ 255.0 / (256.0),
1005
+ 255.0 / (256.0 * 256.0),
1006
+ 255.0 / (256.0 * 256.0 * 256.0),
1007
+ 255.0 / (256.0 * 256.0 * 256.0 * 256.0)
1008
+ );
1009
+ float rgba2float(vec4 rgba) {
1010
+ return dot(rgba, rgba2float_factors);
1011
+ }`, "util.glsl": `float nextPOT(in float x) {
1012
+ return pow(2.0, ceil(log2(abs(x))));
1013
+ }` } };
1014
+ function wr(u) {
1015
+ let e = br;
1016
+ return u.split("/").forEach((t) => {
1017
+ e && (e = e[t]);
1018
+ }), e;
1019
+ }
1020
+ const xr = new qi(wr);
1021
+ function I(u) {
1022
+ return xr.resolveIncludes(u);
1023
+ }
1024
+ const ft = (u) => Se({ PATTERN: u.pattern }), Mr = { shaders: (u) => ({ vertexShader: ft(u) + I("background/background.vert"), fragmentShader: ft(u) + I("background/background.frag") }) }, Or = { shaders: (u) => ({ vertexShader: I("circle/circle.vert"), fragmentShader: I("circle/circle.frag") }) }, gt = (u) => Se({ PATTERN: u.pattern }), Sr = { shaders: (u) => ({ vertexShader: gt(u) + I("fill/fill.vert"), fragmentShader: gt(u) + I("fill/fill.frag") }) }, Pr = { shaders: (u) => ({ vertexShader: I("outline/outline.vert"), fragmentShader: I("outline/outline.frag") }) }, yt = (u) => Se({ SDF: u.sdf }), Tr = { shaders: (u) => ({ vertexShader: yt(u) + I("icon/icon.vert"), fragmentShader: yt(u) + I("icon/icon.frag") }) }, vt = (u) => Se({ PATTERN: u.pattern, SDF: u.sdf }), Cr = { shaders: (u) => ({ vertexShader: vt(u) + I("line/line.vert"), fragmentShader: vt(u) + I("line/line.frag") }) }, Er = { shaders: (u) => ({ vertexShader: I("text/text.vert"), fragmentShader: I("text/text.frag") }) };
1025
+ let Rr = class {
1026
+ constructor() {
1027
+ this._programByKey = /* @__PURE__ */ new Map();
1028
+ }
1029
+ dispose() {
1030
+ this._programByKey.forEach((e) => e.dispose()), this._programByKey.clear();
1031
+ }
1032
+ getMaterialProgram(e, t, i) {
1033
+ const r = t.key << 3 | this._getMaterialOptionsValue(t.type, i);
1034
+ if (this._programByKey.has(r))
1035
+ return this._programByKey.get(r);
1036
+ const a = this._getProgramTemplate(t.type), { shaders: s } = a, { vertexShader: n, fragmentShader: o } = s(i), l = t.getShaderHeader(), h = t.getShaderMain(), c = n.replace("#pragma header", l).replace("#pragma main", h), d = e.programCache.acquire(c, o, t.getAttributeLocations());
1037
+ return this._programByKey.set(r, d), d;
1038
+ }
1039
+ _getMaterialOptionsValue(e, t) {
1040
+ switch (e) {
1041
+ case A.BACKGROUND:
1042
+ return (t.pattern ? 1 : 0) << 1;
1043
+ case A.FILL:
1044
+ return (t.pattern ? 1 : 0) << 1;
1045
+ case A.OUTLINE:
1046
+ return 0;
1047
+ case A.LINE: {
1048
+ const i = t;
1049
+ return (i.sdf ? 1 : 0) << 2 | (i.pattern ? 1 : 0) << 1;
1050
+ }
1051
+ case A.ICON:
1052
+ return (t.sdf ? 1 : 0) << 1;
1053
+ case A.CIRCLE:
1054
+ case A.TEXT:
1055
+ default:
1056
+ return 0;
1057
+ }
1058
+ }
1059
+ _getProgramTemplate(e) {
1060
+ switch (e) {
1061
+ case A.BACKGROUND:
1062
+ return Mr;
1063
+ case A.CIRCLE:
1064
+ return Or;
1065
+ case A.FILL:
1066
+ return Sr;
1067
+ case A.ICON:
1068
+ return Tr;
1069
+ case A.LINE:
1070
+ return Cr;
1071
+ case A.OUTLINE:
1072
+ return Pr;
1073
+ case A.TEXT:
1074
+ return Er;
1075
+ default:
1076
+ return null;
1077
+ }
1078
+ }
1079
+ }, Bt = class {
1080
+ constructor() {
1081
+ this._initialized = !1;
1082
+ }
1083
+ dispose() {
1084
+ this._program = P(this._program), this._vertexArrayObject = P(this._vertexArrayObject);
1085
+ }
1086
+ render(e, t, i, r) {
1087
+ e && (this._initialized || this._initialize(e), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), e.bindVAO(this._vertexArrayObject), e.useProgram(this._program), t.setSamplingMode(i), e.bindTexture(t, 0), this._program.setUniform1i("u_tex", 0), this._program.setUniform1f("u_opacity", r), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindTexture(null, 0), e.bindVAO());
1088
+ }
1089
+ _initialize(e) {
1090
+ if (this._initialized)
1091
+ return !0;
1092
+ const t = Me(e, ct);
1093
+ if (!t)
1094
+ return !1;
1095
+ const i = new Int8Array(16);
1096
+ i[0] = -1, i[1] = -1, i[2] = 0, i[3] = 0, i[4] = 1, i[5] = -1, i[6] = 1, i[7] = 0, i[8] = -1, i[9] = 1, i[10] = 0, i[11] = 1, i[12] = 1, i[13] = 1, i[14] = 1, i[15] = 1;
1097
+ const r = ct.attributes, a = new je(e, r, Gi, { geometry: Ge.createVertex(e, He.STATIC_DRAW, i) });
1098
+ return this._program = t, this._vertexArrayObject = a, this._initialized = !0, !0;
1099
+ }
1100
+ };
1101
+ class zr {
1102
+ constructor(e) {
1103
+ this._rctx = e, this._programByKey = /* @__PURE__ */ new Map();
1104
+ }
1105
+ dispose() {
1106
+ this._programByKey.forEach((e) => e.dispose()), this._programByKey.clear();
1107
+ }
1108
+ getProgram(e, t = []) {
1109
+ const i = e.vsPath + "." + e.fsPath + JSON.stringify(t);
1110
+ if (this._programByKey.has(i))
1111
+ return this._programByKey.get(i);
1112
+ const r = { ...t.map((h) => typeof h == "string" ? { name: h, value: !0 } : h).reduce((h, c) => ({ ...h, [c.name]: c.value }), {}) }, { vsPath: a, fsPath: s, attributes: n } = e, o = er(a, s, n, r), l = this._rctx.programCache.acquire(o.shaders.vertexShader, o.shaders.fragmentShader, o.attributes);
1113
+ if (!l)
1114
+ throw new Error("Unable to get program for key: ${key}");
1115
+ return this._programByKey.set(i, l), l;
1116
+ }
1117
+ }
1118
+ let Fr = class {
1119
+ constructor() {
1120
+ this._resourceMap = /* @__PURE__ */ new Map(), this._inFlightResourceMap = /* @__PURE__ */ new Map(), this.geometryEngine = null, this.geometryEnginePromise = null;
1121
+ }
1122
+ destroy() {
1123
+ this._inFlightResourceMap.clear(), this._resourceMap.clear();
1124
+ }
1125
+ getResource(e) {
1126
+ return this._resourceMap.get(e) ?? null;
1127
+ }
1128
+ async fetchResource(e, t) {
1129
+ const i = this._resourceMap.get(e);
1130
+ if (i)
1131
+ return { width: i.width, height: i.height };
1132
+ let r = this._inFlightResourceMap.get(e);
1133
+ return r ? r.then((a) => ({ width: a.width, height: a.height })) : (r = ir(e, t), this._inFlightResourceMap.set(e, r), r.then((a) => (this._inFlightResourceMap.delete(e), this._resourceMap.set(e, a), { width: a.width, height: a.height }), () => ({ width: 0, height: 0 })));
1134
+ }
1135
+ deleteResource(e) {
1136
+ this._inFlightResourceMap.delete(e), this._resourceMap.delete(e);
1137
+ }
1138
+ loadFont(e) {
1139
+ return gi(e);
1140
+ }
1141
+ };
1142
+ const kr = 512;
1143
+ let Br = class {
1144
+ constructor(e) {
1145
+ this._resourceManager = e, this._cachedRasterizationCanvas = null;
1146
+ }
1147
+ dispose() {
1148
+ this._cachedRasterizationCanvas = null;
1149
+ }
1150
+ get _canvas() {
1151
+ return this._cachedRasterizationCanvas || (this._cachedRasterizationCanvas = document.createElement("canvas")), this._cachedRasterizationCanvas;
1152
+ }
1153
+ rasterizeJSONResource(e, t) {
1154
+ switch (e.type) {
1155
+ case "dash": {
1156
+ const i = e.dashTemplate, r = e.capStyle, [a, s, n] = ar(i, r);
1157
+ return { size: [s, n], image: new Uint32Array(a.buffer), sdf: !0, simplePattern: !0, anchorX: 0, anchorY: 0 };
1158
+ }
1159
+ case "fill-style": {
1160
+ const [i, r, a, s] = sr(this._canvas, e, t);
1161
+ return { size: [r, a], image: new Uint32Array(i.buffer), sdf: !1, simplePattern: !0, anchorX: 0, anchorY: 0, rasterizationScale: s };
1162
+ }
1163
+ case "sdf":
1164
+ return this._rasterizeSDFInfo(e);
1165
+ case "CIMHatchFill":
1166
+ case "CIMVectorMarker":
1167
+ case "CIMPictureMarker":
1168
+ return this._rasterizeCIMJSONResource(e, t);
1169
+ }
1170
+ }
1171
+ _rasterizeCIMJSONResource(e, t) {
1172
+ var i;
1173
+ switch (e.type) {
1174
+ case "CIMHatchFill": {
1175
+ const r = ae.fromCIMHatchFill(e, t);
1176
+ return this._rasterizeCIMVectorMarker(r);
1177
+ }
1178
+ case "CIMPictureMarker": {
1179
+ const r = ae.fromCIMInsidePolygon(e);
1180
+ return this._rasterizeCIMVectorMarker(r);
1181
+ }
1182
+ case "CIMVectorMarker": {
1183
+ if (((i = e.markerPlacement) == null ? void 0 : i.type) === "CIMMarkerPlacementInsidePolygon") {
1184
+ const a = ae.fromCIMInsidePolygon(e);
1185
+ return this._rasterizeCIMVectorMarker(a);
1186
+ }
1187
+ const r = Ri(e);
1188
+ return r && !e.avoidSDFRasterization ? this._rasterizeSDFInfo(r) : this._rasterizeCIMVectorMarker(e, !1);
1189
+ }
1190
+ }
1191
+ }
1192
+ _rasterizeSDFInfo(e) {
1193
+ if (!e)
1194
+ return null;
1195
+ const [t, i, r] = zi(e);
1196
+ return t ? { size: [i, r], image: new Uint32Array(t.buffer), sdf: !0, simplePattern: !0, anchorX: 0, anchorY: 0 } : null;
1197
+ }
1198
+ _rasterizeCIMVectorMarker(e, t = !0) {
1199
+ const i = t ? yi.fromExtent(e.frame) : null, [r, a, s, n, o] = ae.rasterize(this._canvas, e, i, this._resourceManager);
1200
+ return r ? { size: [a, s], image: new Uint32Array(r.buffer), sdf: !1, simplePattern: !1, anchorX: n, anchorY: o } : null;
1201
+ }
1202
+ rasterizeImageResource(e, t, i, r) {
1203
+ this._canvas.width = e, this._canvas.height = t;
1204
+ const a = this._canvas.getContext("2d", { willReadFrequently: !0 });
1205
+ i instanceof ImageData ? a.putImageData(i, 0, 0) : (i.setAttribute("width", `${e}px`), i.setAttribute("height", `${t}px`), a.drawImage(i, 0, 0, e, t));
1206
+ const s = a.getImageData(0, 0, e, t), n = new Uint8Array(s.data);
1207
+ if (r) {
1208
+ for (const p of r)
1209
+ if (p && p.oldColor && p.oldColor.length === 4 && p.newColor && p.newColor.length === 4) {
1210
+ const [_, f, g, y] = p.oldColor, [m, M, w, x] = p.newColor;
1211
+ if (_ === m && f === M && g === w && y === x)
1212
+ continue;
1213
+ for (let b = 0; b < n.length; b += 4)
1214
+ _ === n[b] && f === n[b + 1] && g === n[b + 2] && y === n[b + 3] && (n[b] = m, n[b + 1] = M, n[b + 2] = w, n[b + 3] = x);
1215
+ }
1216
+ }
1217
+ let o;
1218
+ for (let p = 0; p < n.length; p += 4)
1219
+ o = n[p + 3] / 255, n[p] = n[p] * o, n[p + 1] = n[p + 1] * o, n[p + 2] = n[p + 2] * o;
1220
+ let l = n, h = e, c = t;
1221
+ const d = kr;
1222
+ if (h >= d || c >= d) {
1223
+ const p = h / c;
1224
+ p > 1 ? (h = d, c = Math.round(d / p)) : (c = d, h = Math.round(d * p)), l = new Uint8Array(4 * h * c);
1225
+ const _ = new Uint8ClampedArray(l.buffer);
1226
+ Ei(n, e, t, _, h, c, !1);
1227
+ }
1228
+ return { size: [h, c], image: new Uint32Array(l.buffer), sdf: !1, simplePattern: !1, anchorX: 0, anchorY: 0 };
1229
+ }
1230
+ }, Oe = class {
1231
+ constructor(e, t) {
1232
+ this._width = 0, this._height = 0, this._free = [], this._width = e, this._height = t, this._free.push(new $(0, 0, e, t));
1233
+ }
1234
+ get width() {
1235
+ return this._width;
1236
+ }
1237
+ get height() {
1238
+ return this._height;
1239
+ }
1240
+ allocate(e, t) {
1241
+ if (e > this._width || t > this._height)
1242
+ return new $();
1243
+ let i = null, r = -1;
1244
+ for (let a = 0; a < this._free.length; ++a) {
1245
+ const s = this._free[a];
1246
+ e <= s.width && t <= s.height && (i === null || s.y <= i.y && s.x <= i.x) && (i = s, r = a);
1247
+ }
1248
+ return i === null ? new $() : (this._free.splice(r, 1), i.width < i.height ? (i.width > e && this._free.push(new $(i.x + e, i.y, i.width - e, t)), i.height > t && this._free.push(new $(i.x, i.y + t, i.width, i.height - t))) : (i.width > e && this._free.push(new $(i.x + e, i.y, i.width - e, i.height)), i.height > t && this._free.push(new $(i.x, i.y + t, e, i.height - t))), new $(i.x, i.y, e, t));
1249
+ }
1250
+ release(e) {
1251
+ for (let t = 0; t < this._free.length; ++t) {
1252
+ const i = this._free[t];
1253
+ if (i.y === e.y && i.height === e.height && i.x + i.width === e.x)
1254
+ i.width += e.width;
1255
+ else if (i.x === e.x && i.width === e.width && i.y + i.height === e.y)
1256
+ i.height += e.height;
1257
+ else if (e.y === i.y && e.height === i.height && e.x + e.width === i.x)
1258
+ i.x = e.x, i.width += e.width;
1259
+ else {
1260
+ if (e.x !== i.x || e.width !== i.width || e.y + e.height !== i.y)
1261
+ continue;
1262
+ i.y = e.y, i.height += e.height;
1263
+ }
1264
+ this._free.splice(t, 1), this.release(e);
1265
+ }
1266
+ this._free.push(e);
1267
+ }
1268
+ };
1269
+ const Ar = 256, Ir = (u) => Math.floor(u / 256);
1270
+ function $r(u) {
1271
+ const e = /* @__PURE__ */ new Set();
1272
+ for (const t of u)
1273
+ e.add(Ir(t));
1274
+ return e;
1275
+ }
1276
+ function Dr(u, e, t) {
1277
+ return u.has(e) || u.set(e, t().then(() => {
1278
+ u.delete(e);
1279
+ }).catch((i) => {
1280
+ u.delete(e), qt(i);
1281
+ })), u.get(e);
1282
+ }
1283
+ const Lr = (u) => ({ rect: new $(0, 0, 0, 0), page: 0, metrics: { left: 0, width: 0, height: 0, advance: 0, top: 0 }, code: u, sdf: !0 });
1284
+ let Nr = class {
1285
+ constructor(e, t, i) {
1286
+ this.width = 0, this.height = 0, this._dirties = [], this._glyphData = [], this._currentPage = 0, this._glyphCache = {}, this._textures = [], this._rangePromises = /* @__PURE__ */ new Map(), this._preloadCache = {}, this.width = e, this.height = t, this._glyphSource = i, this._binPack = new Oe(e - 4, t - 4), this._glyphData.push(new Uint8Array(e * t)), this._dirties.push(!0), this._textures.push(null), this._initDecorationGlyphs();
1287
+ }
1288
+ dispose() {
1289
+ this._binPack = null;
1290
+ for (const e of this._textures)
1291
+ e && e.dispose();
1292
+ this._textures.length = 0, this._glyphData.length = 0;
1293
+ }
1294
+ _initDecorationGlyphs() {
1295
+ const e = [117, 149, 181, 207, 207, 181, 149, 117], t = [], i = [];
1296
+ for (let s = 0; s < e.length; s++) {
1297
+ const n = e[s];
1298
+ for (let o = 0; o < 11; o++) {
1299
+ const l = s >= 3 && s < 5 && o >= 3 && o < 8 ? 255 : 0;
1300
+ t.push(n), i.push(l);
1301
+ }
1302
+ }
1303
+ const r = { metrics: { width: 5, height: 2, left: 0, top: 0, advance: 0 }, bitmap: new Uint8Array(t) }, a = { metrics: { width: 5, height: 2, left: 0, top: 0, advance: 0 }, bitmap: new Uint8Array(i) };
1304
+ this._recordGlyph(r), this._recordGlyph(a);
1305
+ }
1306
+ getTexture(e, t) {
1307
+ if (!this._textures[t]) {
1308
+ const i = new R();
1309
+ i.pixelFormat = C.ALPHA, i.wrapMode = E.CLAMP_TO_EDGE, i.width = this.width, i.height = this.height, this._textures[t] = new X(e, i, new Uint8Array(this.width * this.height));
1310
+ }
1311
+ return this._dirties[t] && (this._textures[t].setData(this._glyphData[t]), this._dirties[t] = !1), this._textures[t];
1312
+ }
1313
+ async getGlyphItems(e, t, i) {
1314
+ const r = this._getGlyphCache(e);
1315
+ return await this._fetchRanges(e, t, i), t.map((a) => this._getMosaicItem(r, e, a));
1316
+ }
1317
+ bind(e, t, i, r) {
1318
+ const a = this.getTexture(e, i);
1319
+ a.setSamplingMode(t), e.bindTexture(a, r);
1320
+ }
1321
+ preloadASCIIGlyphCache(e) {
1322
+ const t = this._preloadCache[e];
1323
+ if (t != null)
1324
+ return t;
1325
+ const i = this._glyphSource.preloadASCIIRange(e).then(() => {
1326
+ const r = this._getGlyphCache(e);
1327
+ for (let a = 0; a < 256; a++)
1328
+ this._getMosaicItem(r, e, a);
1329
+ });
1330
+ return this._preloadCache[e] = i, i;
1331
+ }
1332
+ _getGlyphCache(e) {
1333
+ return this._glyphCache[e] || (this._glyphCache[e] = {}), this._glyphCache[e];
1334
+ }
1335
+ _invalidate() {
1336
+ this._dirties[this._currentPage] = !0;
1337
+ }
1338
+ async _fetchRanges(e, t, i) {
1339
+ const r = $r(t), a = [];
1340
+ r.forEach((s) => {
1341
+ a.push(this._fetchRange(e, s, i));
1342
+ }), await Promise.all(a);
1343
+ }
1344
+ async _fetchRange(e, t, i) {
1345
+ if (t > Ar)
1346
+ return;
1347
+ const r = e + t;
1348
+ return Dr(this._rangePromises, r, () => this._glyphSource.getRange(e, t, i));
1349
+ }
1350
+ _getMosaicItem(e, t, i) {
1351
+ if (!e[i]) {
1352
+ const r = this._glyphSource.getGlyph(t, i);
1353
+ if (!(r != null && r.metrics))
1354
+ return Lr(i);
1355
+ const a = this._recordGlyph(r), s = this._currentPage, n = r.metrics;
1356
+ e[i] = { rect: a, page: s, metrics: n, code: i, sdf: !0 }, this._invalidate();
1357
+ }
1358
+ return e[i];
1359
+ }
1360
+ _recordGlyph(e) {
1361
+ const t = e.metrics;
1362
+ let i;
1363
+ if (t.width === 0)
1364
+ i = new $(0, 0, 0, 0);
1365
+ else {
1366
+ const a = t.width + 6, s = t.height + 2 * 3;
1367
+ i = this._binPack.allocate(a, s), i.isEmpty && (this._dirties[this._currentPage] || (this._glyphData[this._currentPage] = null), this._currentPage = this._glyphData.length, this._glyphData.push(new Uint8Array(this.width * this.height)), this._dirties.push(!0), this._textures.push(null), this._initDecorationGlyphs(), this._binPack = new Oe(this.width - 4, this.height - 4), i = this._binPack.allocate(a, s));
1368
+ const n = this._glyphData[this._currentPage], o = e.bitmap;
1369
+ let l, h;
1370
+ if (o)
1371
+ for (let c = 0; c < s; c++) {
1372
+ l = a * c, h = this.width * (i.y + c) + i.x;
1373
+ for (let d = 0; d < a; d++)
1374
+ n[h + d] = o[l + d];
1375
+ }
1376
+ H("esri-glyph-debug") && this._showDebugPage(n);
1377
+ }
1378
+ return i;
1379
+ }
1380
+ _showDebugPage(e) {
1381
+ const t = document.createElement("canvas"), i = t.getContext("2d"), r = new ImageData(this.width, this.height), a = r.data;
1382
+ t.width = this.width, t.height = this.height, t.style.border = "1px solid black";
1383
+ for (let s = 0; s < e.length; ++s)
1384
+ a[4 * s] = e[s], a[4 * s + 1] = 0, a[4 * s + 2] = 0, a[4 * s + 3] = 255;
1385
+ i.putImageData(r, 0, 0), document.body.appendChild(t);
1386
+ }
1387
+ }, bt = class {
1388
+ constructor(e) {
1389
+ for (this._metrics = [], this._bitmaps = []; e.next(); )
1390
+ switch (e.tag()) {
1391
+ case 1: {
1392
+ const t = e.getMessage();
1393
+ for (; t.next(); )
1394
+ switch (t.tag()) {
1395
+ case 3: {
1396
+ const i = t.getMessage();
1397
+ let r, a, s, n, o, l, h;
1398
+ for (; i.next(); )
1399
+ switch (i.tag()) {
1400
+ case 1:
1401
+ r = i.getUInt32();
1402
+ break;
1403
+ case 2:
1404
+ a = i.getBytes();
1405
+ break;
1406
+ case 3:
1407
+ s = i.getUInt32();
1408
+ break;
1409
+ case 4:
1410
+ n = i.getUInt32();
1411
+ break;
1412
+ case 5:
1413
+ o = i.getSInt32();
1414
+ break;
1415
+ case 6:
1416
+ l = i.getSInt32();
1417
+ break;
1418
+ case 7:
1419
+ h = i.getUInt32();
1420
+ break;
1421
+ default:
1422
+ i.skip();
1423
+ }
1424
+ i.release(), r && (this._metrics[r] = { width: s, height: n, left: o, top: l, advance: h }, this._bitmaps[r] = a);
1425
+ break;
1426
+ }
1427
+ default:
1428
+ t.skip();
1429
+ }
1430
+ t.release();
1431
+ break;
1432
+ }
1433
+ default:
1434
+ e.skip();
1435
+ }
1436
+ }
1437
+ getMetrics(e) {
1438
+ return this._metrics[e];
1439
+ }
1440
+ getBitmap(e) {
1441
+ return this._bitmaps[e];
1442
+ }
1443
+ }, Ur = class {
1444
+ constructor() {
1445
+ this._ranges = [];
1446
+ }
1447
+ getRange(e) {
1448
+ return this._ranges[e];
1449
+ }
1450
+ addRange(e, t) {
1451
+ this._ranges[e] = t;
1452
+ }
1453
+ }, Vr = class {
1454
+ constructor(e) {
1455
+ this._glyphInfo = {}, this._baseURL = e;
1456
+ }
1457
+ getRange(e, t, i) {
1458
+ const r = this._getFontStack(e);
1459
+ if (r.getRange(t))
1460
+ return Promise.resolve();
1461
+ const a = 256 * t, s = a + 255, n = this._baseURL.replace("{fontstack}", e).replace("{range}", a + "-" + s);
1462
+ return de(n, { responseType: "array-buffer", ...i }).then((o) => {
1463
+ r.addRange(t, new bt(new dt(new Uint8Array(o.data), new DataView(o.data))));
1464
+ });
1465
+ }
1466
+ async preloadASCIIRange(e) {
1467
+ const t = this._getFontStack(e), i = 0, r = 255, a = this._baseURL.replace("{fontstack}", e).replace("{range}", i + "-" + r), s = await de(a, { responseType: "array-buffer" }), n = new bt(new dt(new Uint8Array(s.data), new DataView(s.data)));
1468
+ for (let o = i; o <= r; o++)
1469
+ t.getRange(o) || t.addRange(o, n);
1470
+ }
1471
+ getGlyph(e, t) {
1472
+ const i = this._getFontStack(e);
1473
+ if (!i)
1474
+ return;
1475
+ const r = Math.floor(t / 256), a = i.getRange(r);
1476
+ return a ? { metrics: a.getMetrics(t), bitmap: a.getBitmap(t) } : void 0;
1477
+ }
1478
+ _getFontStack(e) {
1479
+ let t = this._glyphInfo[e];
1480
+ return t || (t = this._glyphInfo[e] = new Ur()), t;
1481
+ }
1482
+ };
1483
+ const ue = 1e20;
1484
+ let Gr = class {
1485
+ constructor(e) {
1486
+ this._svg = null, this.size = e;
1487
+ const t = document.createElement("canvas");
1488
+ t.width = t.height = e, this._context = t.getContext("2d", { willReadFrequently: !1 }), this._gridOuter = new Float64Array(e * e), this._gridInner = new Float64Array(e * e), this._f = new Float64Array(e), this._d = new Float64Array(e), this._z = new Float64Array(e + 1), this._v = new Int16Array(e);
1489
+ }
1490
+ dispose() {
1491
+ this._context = this._gridOuter = this._gridInner = this._f = this._d = this._z = this._v = null, this._svg && (document.body.removeChild(this._svg), this._svg = null);
1492
+ }
1493
+ draw(e, t, i, r = 31) {
1494
+ this._initSVG();
1495
+ const a = this.createSVGString(e, t);
1496
+ return new Promise((s, n) => {
1497
+ const o = new Image();
1498
+ o.src = "data:image/svg+xml; charset=utf8, " + encodeURIComponent(a), o.onload = () => {
1499
+ o.onload = null, this._context.clearRect(0, 0, this.size, this.size), this._context.drawImage(o, 0, 0, this.size, this.size);
1500
+ const h = this._context.getImageData(0, 0, this.size, this.size), c = new Uint8Array(this.size * this.size * 4);
1501
+ for (let d = 0; d < this.size * this.size; d++) {
1502
+ const p = h.data[4 * d + 3] / 255;
1503
+ this._gridOuter[d] = p === 1 ? 0 : p === 0 ? ue : Math.max(0, 0.5 - p) ** 2, this._gridInner[d] = p === 1 ? ue : p === 0 ? 0 : Math.max(0, p - 0.5) ** 2;
1504
+ }
1505
+ this._edt(this._gridOuter, this.size, this.size), this._edt(this._gridInner, this.size, this.size);
1506
+ for (let d = 0; d < this.size * this.size; d++) {
1507
+ const p = this._gridOuter[d] - this._gridInner[d];
1508
+ nr(0.5 - p / (2 * r), c, 4 * d);
1509
+ }
1510
+ s(c);
1511
+ };
1512
+ const l = i == null ? void 0 : i.signal;
1513
+ l && jt(l, () => n(Xt()));
1514
+ });
1515
+ }
1516
+ _initSVG() {
1517
+ if (!this._svg) {
1518
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1519
+ e.setAttribute("style", "position: absolute;"), e.setAttribute("width", "0"), e.setAttribute("height", "0"), e.setAttribute("aria-hidden", "true"), e.setAttribute("role", "presentation"), document.body.appendChild(e), this._svg = e;
1520
+ }
1521
+ return this._svg;
1522
+ }
1523
+ createSVGString(e, t) {
1524
+ const i = this._initSVG(), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
1525
+ r.setAttribute("d", e), i.appendChild(r);
1526
+ const a = r.getBBox(), s = a.width / a.height, n = this.size / 2;
1527
+ let o, l, h;
1528
+ if (s > 1) {
1529
+ o = n / a.width;
1530
+ const _ = n * (1 / s);
1531
+ l = this.size / 4, h = n - _ / 2;
1532
+ } else
1533
+ o = n / a.height, l = n - n * s / 2, h = this.size / 4;
1534
+ const c = -a.x * o + l, d = -a.y * o + h;
1535
+ r.setAttribute("style", `transform: matrix(${o}, 0, 0, ${o}, ${c}, ${d})`), r.setAttribute("stroke-width", "" + 0.5 / o);
1536
+ const p = `<svg style="fill:${t ? "red" : "none"}; stroke:${t ? "none" : "red"}" height="${this.size}" width="${this.size}" xmlns="http://www.w3.org/2000/svg">${i.innerHTML}</svg>`;
1537
+ return i.removeChild(r), p;
1538
+ }
1539
+ _edt(e, t, i) {
1540
+ const r = this._f, a = this._d, s = this._v, n = this._z;
1541
+ for (let o = 0; o < t; o++) {
1542
+ for (let l = 0; l < i; l++)
1543
+ r[l] = e[l * t + o];
1544
+ this._edt1d(r, a, s, n, i);
1545
+ for (let l = 0; l < i; l++)
1546
+ e[l * t + o] = a[l];
1547
+ }
1548
+ for (let o = 0; o < i; o++) {
1549
+ for (let l = 0; l < t; l++)
1550
+ r[l] = e[o * t + l];
1551
+ this._edt1d(r, a, s, n, t);
1552
+ for (let l = 0; l < t; l++)
1553
+ e[o * t + l] = Math.sqrt(a[l]);
1554
+ }
1555
+ }
1556
+ _edt1d(e, t, i, r, a) {
1557
+ i[0] = 0, r[0] = -ue, r[1] = +ue;
1558
+ for (let s = 1, n = 0; s < a; s++) {
1559
+ let o = (e[s] + s * s - (e[i[n]] + i[n] * i[n])) / (2 * s - 2 * i[n]);
1560
+ for (; o <= r[n]; )
1561
+ n--, o = (e[s] + s * s - (e[i[n]] + i[n] * i[n])) / (2 * s - 2 * i[n]);
1562
+ n++, i[n] = s, r[n] = o, r[n + 1] = +ue;
1563
+ }
1564
+ for (let s = 0, n = 0; s < a; s++) {
1565
+ for (; r[n + 1] < s; )
1566
+ n++;
1567
+ t[s] = (s - i[n]) * (s - i[n]) + e[i[n]];
1568
+ }
1569
+ }
1570
+ };
1571
+ function J(u) {
1572
+ return u && u.type === "static";
1573
+ }
1574
+ let Hr = class At {
1575
+ constructor(e, t, i = 0) {
1576
+ this._mosaicPages = [], this._maxItemSize = 0, this._currentPage = 0, this._pageWidth = 0, this._pageHeight = 0, this._mosaicRects = /* @__PURE__ */ new Map(), this._spriteCopyQueue = [], this.pixelRatio = 1, (e <= 0 || t <= 0) && console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"), this._pageWidth = e, this._pageHeight = t, i > 0 && (this._maxItemSize = i), this.pixelRatio = window.devicePixelRatio || 1, this._binPack = new Oe(this._pageWidth, this._pageHeight);
1577
+ const r = Math.floor(this._pageWidth), a = Math.floor(this._pageHeight);
1578
+ this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(r * a) }, size: [this._pageWidth, this._pageHeight], dirty: !0, texture: void 0 });
1579
+ }
1580
+ getWidth(e) {
1581
+ return e >= this._mosaicPages.length ? -1 : this._mosaicPages[e].size[0];
1582
+ }
1583
+ getHeight(e) {
1584
+ return e >= this._mosaicPages.length ? -1 : this._mosaicPages[e].size[1];
1585
+ }
1586
+ getPageTexture(e) {
1587
+ return e < this._mosaicPages.length ? this._mosaicPages[e].texture : null;
1588
+ }
1589
+ has(e) {
1590
+ return this._mosaicRects.has(e);
1591
+ }
1592
+ get itemCount() {
1593
+ return this._mosaicRects.size;
1594
+ }
1595
+ getSpriteItem(e) {
1596
+ return this._mosaicRects.get(e);
1597
+ }
1598
+ addSpriteItem(e, t, i, r, a, s, n = 1) {
1599
+ if (this._mosaicRects.has(e))
1600
+ return this._mosaicRects.get(e);
1601
+ let o, l, h;
1602
+ if (J(i))
1603
+ [o, l, h] = this._allocateImage(t[0], t[1]);
1604
+ else {
1605
+ o = new $(0, 0, t[0], t[1]), l = this._mosaicPages.length;
1606
+ const d = void 0;
1607
+ this._mosaicPages.push({ mosaicsData: i, size: [t[0] + 2 * j, t[1] + 2 * j], dirty: !0, texture: d });
1608
+ }
1609
+ if (o.width <= 0 || o.height <= 0)
1610
+ return null;
1611
+ const c = { type: "sprite", rect: o, width: t[0], height: t[1], sdf: a, simplePattern: s, rasterizationScale: n, page: l };
1612
+ return this._mosaicRects.set(e, c), J(i) && (H("esri-mosaic-debug") && this._showDebugSprite(t, i.data), this._copy({ rect: o, spriteSize: t, spriteData: i.data, page: l, pageSize: h, repeat: r, sdf: a })), c;
1613
+ }
1614
+ hasItemsToProcess() {
1615
+ return this._spriteCopyQueue.length !== 0;
1616
+ }
1617
+ processNextItem() {
1618
+ const e = this._spriteCopyQueue.pop();
1619
+ e && this._copy(e);
1620
+ }
1621
+ getMosaicItemPosition(e) {
1622
+ const t = this.getSpriteItem(e), i = t == null ? void 0 : t.rect;
1623
+ if (!i)
1624
+ return null;
1625
+ i.width = t.width, i.height = t.height;
1626
+ const r = t.width, a = t.height, s = j, n = this._mosaicPages[t.page].size;
1627
+ return { size: [t.width, t.height], tl: [(i.x + s) / n[0], (i.y + s) / n[1]], br: [(i.x + s + r) / n[0], (i.y + s + a) / n[1]], page: t.page };
1628
+ }
1629
+ bind(e, t, i = 0, r = 0) {
1630
+ const a = this._mosaicPages[i], s = a.mosaicsData;
1631
+ let n = a.texture;
1632
+ n || (n = wt(e, a.size), a.texture = n), n.setSamplingMode(t), J(s) ? (e.bindTexture(n, r), a.dirty && (n.setData(new Uint8Array(s.data.buffer)), n.generateMipmap(), H("esri-mosaic-debug") && this._showDebugPage(i))) : (s.data.loadFrame(n), e.bindTexture(n, r), n.generateMipmap()), a.dirty = !1;
1633
+ }
1634
+ getTexture(e, t = 0) {
1635
+ const i = this._mosaicPages[t], r = i.mosaicsData;
1636
+ let a = i.texture;
1637
+ return a || (a = wt(e, i.size), i.texture = a), J(r) ? i.dirty && (a.setData(new Uint8Array(r.data.buffer)), a.generateMipmap(), H("esri-mosaic-debug") && this._showDebugPage(t)) : (r.data.loadFrame(a), a.generateMipmap()), i.dirty = !1, a;
1638
+ }
1639
+ dispose() {
1640
+ this._binPack = null;
1641
+ for (const e of this._mosaicPages) {
1642
+ const t = e.texture;
1643
+ t && t.dispose();
1644
+ const i = e.mosaicsData;
1645
+ J(i) || i.data.destroy();
1646
+ }
1647
+ this._mosaicPages = null, this._mosaicRects.clear();
1648
+ }
1649
+ static _copyBits(e, t, i, r, a, s, n, o, l, h, c) {
1650
+ let d = r * t + i, p = o * s + n;
1651
+ if (c) {
1652
+ p -= s;
1653
+ for (let _ = -1; _ <= h; _++, d = ((_ + h) % h + r) * t + i, p += s)
1654
+ for (let f = -1; f <= l; f++)
1655
+ a[p + f] = e[d + (f + l) % l];
1656
+ } else
1657
+ for (let _ = 0; _ < h; _++) {
1658
+ for (let f = 0; f < l; f++)
1659
+ a[p + f] = e[d + f];
1660
+ d += t, p += s;
1661
+ }
1662
+ }
1663
+ _copy(e) {
1664
+ if (e.page >= this._mosaicPages.length)
1665
+ return;
1666
+ const t = this._mosaicPages[e.page], i = t.mosaicsData;
1667
+ if (!J(t.mosaicsData))
1668
+ throw new re("mapview-invalid-resource", "unsuitable data type!");
1669
+ const r = e.spriteData, a = i.data;
1670
+ a && r || console.error("Source or target images are uninitialized!"), At._copyBits(r, e.spriteSize[0], 0, 0, a, e.pageSize[0], e.rect.x + j, e.rect.y + j, e.spriteSize[0], e.spriteSize[1], e.repeat), t.dirty = !0;
1671
+ }
1672
+ _allocateImage(e, t) {
1673
+ e += 2 * j, t += 2 * j;
1674
+ const i = Math.max(e, t);
1675
+ if (this._maxItemSize && this._maxItemSize < i) {
1676
+ const a = 2 ** Math.ceil(ot(e)), s = 2 ** Math.ceil(ot(t)), n = new $(0, 0, e, t);
1677
+ return this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(a * s) }, size: [a, s], dirty: !0, texture: void 0 }), [n, this._mosaicPages.length - 1, [a, s]];
1678
+ }
1679
+ const r = this._binPack.allocate(e, t);
1680
+ if (r.width <= 0) {
1681
+ const a = this._mosaicPages[this._currentPage];
1682
+ return !a.dirty && J(a.mosaicsData) && (a.mosaicsData.data = null), this._currentPage = this._mosaicPages.length, this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(this._pageWidth * this._pageHeight) }, size: [this._pageWidth, this._pageHeight], dirty: !0, texture: void 0 }), this._binPack = new Oe(this._pageWidth, this._pageHeight), this._allocateImage(e, t);
1683
+ }
1684
+ return [r, this._currentPage, [this._pageWidth, this._pageHeight]];
1685
+ }
1686
+ _showDebugSprite([e, t], i) {
1687
+ const r = document.createElement("canvas");
1688
+ r.width = e, r.height = t, r.setAttribute("style", `position: absolute; top: ${4 + 204 * Wr++}px; right: 208px; width: 200px; height: 200px; border: 1px solid black;`);
1689
+ const a = r.getContext("2d"), s = new ImageData(e, t);
1690
+ s.data.set(new Uint8Array(i.buffer)), a.putImageData(s, 0, 0), document.body.appendChild(r);
1691
+ }
1692
+ _showDebugPage(e) {
1693
+ const t = this._mosaicPages[e], { size: [i, r], mosaicsData: a } = t;
1694
+ if (!J(a))
1695
+ return void console.error("Could not show sprite mosaic debug for non-static resource");
1696
+ const s = `mosaicDebugPage${e}`, n = document.getElementById(s) ?? document.createElement("canvas");
1697
+ n.id = s, n.width = i, n.height = r, n.setAttribute("style", `position: absolute; top: ${4 + 204 * e}px; right: 4px; width: 200px; height: 200px; border: 1px solid black;`);
1698
+ const o = n.getContext("2d"), l = new ImageData(i, r);
1699
+ l.data.set(new Uint8Array(a.data.buffer)), o.putImageData(l, 0, 0), document.body.appendChild(n);
1700
+ }
1701
+ }, Wr = 0;
1702
+ function wt(u, e) {
1703
+ const t = new R();
1704
+ return t.width = e[0], t.height = e[1], t.wrapMode = E.CLAMP_TO_EDGE, new X(u, t, null);
1705
+ }
1706
+ let qr = class {
1707
+ constructor(e, t, i, r) {
1708
+ this._animation = e, this._frameData = null;
1709
+ const a = (s) => {
1710
+ this._frameData = s, t.requestRender();
1711
+ };
1712
+ this.frameCount = this._animation.frameDurations.length, this.width = this._animation.width, this.height = this._animation.height, this._playHandle = cr(this._animation, i, r, a);
1713
+ }
1714
+ destroy() {
1715
+ this._playHandle.remove();
1716
+ }
1717
+ loadFrame(e) {
1718
+ const t = this._frameData;
1719
+ if (t == null)
1720
+ return;
1721
+ const i = "width" in t ? t.width : t.codedWidth, r = "height" in t ? t.height : t.codedHeight;
1722
+ e.updateData(0, j, j, i, r, t), this._frameData = null;
1723
+ }
1724
+ };
1725
+ const xt = "arial-unicode-ms-regular", jr = () => Ne.getLogger("esri.views.2d.engine.webgl.TextureManager"), ee = (u, e, t) => jr().error(new re(u, e, t));
1726
+ function Xr(u) {
1727
+ switch (u.type) {
1728
+ case "fill-style":
1729
+ case "CIMHatchFill":
1730
+ return Bi;
1731
+ }
1732
+ return 1;
1733
+ }
1734
+ class Ye {
1735
+ static fromMosaic(e, t) {
1736
+ return new Ye(e, t.page, t.sdf);
1737
+ }
1738
+ constructor(e, t, i) {
1739
+ this.mosaicType = e, this.page = t, this.sdf = i;
1740
+ }
1741
+ }
1742
+ class Yr {
1743
+ constructor(e) {
1744
+ this._requestRender = e, this._resourceManager = new Fr(), this._invalidFontsMap = /* @__PURE__ */ new Map(), this._sdfConverter = new Gr(Fe), this._bindingInfos = new Array(), this._hashToBindingIndex = /* @__PURE__ */ new Map(), this._ongoingRasterizations = /* @__PURE__ */ new Map(), this._imageRequestQueue = new Yt({ concurrency: 10, process: async (t, i) => {
1745
+ Ue(i);
1746
+ try {
1747
+ return await de(t, { responseType: "image", signal: i });
1748
+ } catch (r) {
1749
+ throw Je(r) ? r : new re("mapview-invalid-resource", `Could not fetch requested resource at ${t}`, r);
1750
+ }
1751
+ } }), this._spriteMosaic = new Hr(2048, 2048, 500), this._glyphSource = new Vr(`${Kt.fontsUrl}/{fontstack}/{range}.pbf`), this._glyphMosaic = new Nr(1024, 1024, this._glyphSource), this._rasterizer = new Br(this.resourceManager);
1752
+ }
1753
+ dispose() {
1754
+ this._spriteMosaic.dispose(), this._glyphMosaic.dispose(), this._rasterizer.dispose(), this._sdfConverter.dispose(), this._spriteMosaic = null, this._glyphMosaic = null, this._sdfConverter = null, this._hashToBindingIndex.clear(), this._hashToBindingIndex = null, this._bindingInfos = null, this._ongoingRasterizations.clear(), this._ongoingRasterizations = null, this._imageRequestQueue.clear(), this._imageRequestQueue = null, this._resourceManager.destroy();
1755
+ }
1756
+ get sprites() {
1757
+ return this._spriteMosaic;
1758
+ }
1759
+ get glyphs() {
1760
+ return this._glyphMosaic;
1761
+ }
1762
+ get resourceManager() {
1763
+ return this._resourceManager;
1764
+ }
1765
+ async rasterizeItem(e, t) {
1766
+ if (e == null)
1767
+ return ee("mapview-null-resource", "Unable to rasterize null resource"), null;
1768
+ if (e.type !== "cim-rasterization-info")
1769
+ return ee("mapview-unexpected-resource", "Unable to rasterize resource"), null;
1770
+ const { resource: i } = e;
1771
+ if (i.type === "text") {
1772
+ const a = await this._rasterizeText(i, t);
1773
+ for (const s of a.glyphs)
1774
+ this._setTextureBinding(ve.GLYPH, s);
1775
+ return a;
1776
+ }
1777
+ const r = await this._rasterizeSprite(i, t);
1778
+ return r && this._setTextureBinding(ve.SPRITE, r), r;
1779
+ }
1780
+ getMosaicInfo(e, t, i = !1) {
1781
+ const r = this._getTextureBindingInfo(e, t, i);
1782
+ return r ? { size: r.size, texture: { texture: r.texture, unit: r.type === "sprite" ? ki : at } } : (ee("mapview-invalid-resource", `Unable to find resource for ${t}`), { size: [0, 0], texture: { texture: null, unit: 0 } });
1783
+ }
1784
+ _getTextureBindingInfo(e, t, i) {
1785
+ const r = this._bindingInfos[t - 1], a = r.page, s = i ? L.LINEAR_MIPMAP_LINEAR : L.LINEAR;
1786
+ switch (r.mosaicType) {
1787
+ case ve.SPRITE: {
1788
+ const n = [this.sprites.getWidth(a), this.sprites.getHeight(a)], o = this._spriteMosaic.getTexture(e, a);
1789
+ return o.setSamplingMode(s), { type: "sprite", texture: o, size: n };
1790
+ }
1791
+ case ve.GLYPH: {
1792
+ const n = [this.glyphs.width, this.glyphs.height], o = this._glyphMosaic.getTexture(e, a);
1793
+ return this._glyphMosaic.bind(e, s, a, at), o.setSamplingMode(s), { type: "glyph", texture: o, size: n };
1794
+ }
1795
+ default:
1796
+ return ee("mapview-texture-manager", `Cannot handle unknown type ${r.mosaicType}`), null;
1797
+ }
1798
+ }
1799
+ _hashMosaic(e, t) {
1800
+ return 1 | e << 1 | (t.sdf ? 1 : 0) << 2 | t.page << 3;
1801
+ }
1802
+ _setTextureBinding(e, t) {
1803
+ const i = this._hashMosaic(e, t);
1804
+ if (!this._hashToBindingIndex.has(i)) {
1805
+ const r = Ye.fromMosaic(e, t), a = this._bindingInfos.length + 1;
1806
+ this._hashToBindingIndex.set(i, a), this._bindingInfos.push(r);
1807
+ }
1808
+ t.textureBinding = this._hashToBindingIndex.get(i);
1809
+ }
1810
+ async _rasterizeText(e, t) {
1811
+ const { font: i, textString: r } = e, a = vi(i), s = this._invalidFontsMap.has(a), [n, o] = bi(r), l = or(n);
1812
+ try {
1813
+ const h = s ? xt : a;
1814
+ return H("esri-2d-stabilize-glyphs") && await this._glyphMosaic.preloadASCIIGlyphCache(h), { type: "glyphs", glyphs: await this._glyphMosaic.getGlyphItems(h, l, t), isRightToLeft: o };
1815
+ } catch {
1816
+ return ee("mapview-invalid-resource", `Couldn't find font ${a}. Falling back to Arial Unicode MS Regular`), this._invalidFontsMap.set(a, !0), { type: "glyphs", glyphs: await this._glyphMosaic.getGlyphItems(xt, l, t), isRightToLeft: o };
1817
+ }
1818
+ }
1819
+ _hashSpriteResource(e) {
1820
+ switch (e.type) {
1821
+ case "path":
1822
+ return `path:${e.path}.${e.asFill ? 1 : 0}`;
1823
+ case "CIMPictureMarker":
1824
+ return `${e.type}:${e.url}:${e.size}`;
1825
+ case "CIMPictureFill":
1826
+ return `${e.type}:${e.url}:${e.height}`;
1827
+ case "CIMPictureStroke":
1828
+ return `${e.type}:${e.url}:${e.width}`;
1829
+ case "dash":
1830
+ return `dash:${e.capStyle}.${e.dashTemplate.join("")}`;
1831
+ case "sdf":
1832
+ return `sdf:${JSON.stringify(e.geom)}.${e.asFill ? 1 : 0}`;
1833
+ case "fill-style":
1834
+ return `fill_style:${e.style}`;
1835
+ case "animated":
1836
+ return JSON.stringify(lr(e));
1837
+ case "CIMHatchFill":
1838
+ case "CIMVectorMarker":
1839
+ return JSON.stringify(e);
1840
+ }
1841
+ }
1842
+ async _rasterizeSprite(e, t) {
1843
+ var r;
1844
+ if (!e)
1845
+ return null;
1846
+ const i = Rt(this._hashSpriteResource(e));
1847
+ if (this._spriteMosaic.has(i))
1848
+ return this._spriteMosaic.getSpriteItem(i);
1849
+ if ("url" in e && e.url || e.type === "CIMPictureFill" || e.type === "CIMPictureStroke" || e.type === "CIMPictureMarker" || e.type === "CIMVectorMarker") {
1850
+ const a = [];
1851
+ ae.fetchResources({ type: "CIMPointSymbol", symbolLayers: [e] }, this._resourceManager, a), a.length > 0 && await Promise.all(a);
1852
+ }
1853
+ switch (e.type) {
1854
+ case "CIMPictureMarker":
1855
+ return ((r = e.markerPlacement) == null ? void 0 : r.type) === "CIMMarkerPlacementInsidePolygon" ? this._rasterizeJSONResource(i, e) : this._handleAsyncResource(i, e, t);
1856
+ case "animated":
1857
+ case "CIMPictureFill":
1858
+ case "CIMPictureStroke":
1859
+ case "path":
1860
+ return this._handleAsyncResource(i, e, t);
1861
+ case "sdf":
1862
+ case "dash":
1863
+ case "fill-style":
1864
+ case "CIMVectorMarker":
1865
+ case "CIMHatchFill":
1866
+ return this._rasterizeJSONResource(i, e);
1867
+ }
1868
+ }
1869
+ _rasterizeJSONResource(e, t) {
1870
+ const i = this._rasterizer.rasterizeJSONResource(t, Xr(t));
1871
+ if (i) {
1872
+ const { size: r, image: a, sdf: s, simplePattern: n, rasterizationScale: o } = i;
1873
+ return this._addItemToMosaic(e, r, { type: "static", data: a }, be(t), s, n, o);
1874
+ }
1875
+ return null;
1876
+ }
1877
+ async _handleAsyncResource(e, t, i) {
1878
+ if (this._ongoingRasterizations.has(e))
1879
+ return this._ongoingRasterizations.get(e);
1880
+ let r;
1881
+ return r = t.type === "path" ? this._handleSVG(t, e, i) : this._handleImage(t, e, i), this._ongoingRasterizations.set(e, r), r.finally(() => this._ongoingRasterizations.delete(e)), r;
1882
+ }
1883
+ async _handleSVG(e, t, i) {
1884
+ const r = [Fe, Fe], { asFill: a } = e, s = await this._sdfConverter.draw(e.path, a, i);
1885
+ return this._addItemToMosaic(t, r, { type: "static", data: new Uint32Array(s.buffer) }, !1, !0, !0);
1886
+ }
1887
+ async _handleGIFOrPNG(e, t, i) {
1888
+ const r = e.url, a = this.resourceManager.getResource(r);
1889
+ if (a == null)
1890
+ return null;
1891
+ const { width: s, height: n } = a;
1892
+ if (a instanceof HTMLImageElement) {
1893
+ if (e.type === "animated")
1894
+ return ee("mapview-unexpected-resource", "Attempt to configure animations for a non-animated image."), null;
1895
+ const d = "colorSubstitutions" in e ? e.colorSubstitutions : void 0, { size: p, sdf: _, image: f } = this._rasterizer.rasterizeImageResource(s, n, a, d);
1896
+ return this._addItemToMosaic(t, p, { type: "static", data: f }, be(e), _, !1);
1897
+ }
1898
+ let o, l, h;
1899
+ e.type === "animated" ? (o = !1, l = { playAnimation: e.playAnimation, reverseAnimation: e.reverseAnimation, randomizeStartTime: e.randomizeStartTime, randomizeStartSeed: e.randomizeStartSeed, startTimeOffset: e.startTimeOffset, duration: e.duration, repeatType: e.repeatType, repeatDelay: e.repeatDelay }, h = e.startGroup || 0) : (o = be(e), l = {}, h = 0);
1900
+ const c = new qr(a, this._requestRender, l, h);
1901
+ return this._addItemToMosaic(t, [c.width, c.height], { type: "animated", data: c }, o, !1, !1);
1902
+ }
1903
+ async _handleImage(e, t, i) {
1904
+ const r = e.url;
1905
+ if (Jr(r) || Zr(r))
1906
+ return this._handleGIFOrPNG(e, t, i);
1907
+ if (e.type === "animated")
1908
+ return ee("mapview-unexpected-resource", "Attempt to configure animations for a non-animated image."), null;
1909
+ try {
1910
+ let a;
1911
+ const s = this.resourceManager.getResource(r);
1912
+ if (s != null && s instanceof HTMLImageElement)
1913
+ a = s;
1914
+ else {
1915
+ const { data: p } = await this._imageRequestQueue.push(r, { ...i });
1916
+ a = p;
1917
+ }
1918
+ if (hr(r)) {
1919
+ if ("width" in e && "height" in e)
1920
+ a.width = ie(e.width), a.height = ie(e.height);
1921
+ else if ("cim" in e) {
1922
+ const p = e;
1923
+ a.width = ie(p.width ?? p.scaleX * p.size), a.height = ie(p.size);
1924
+ }
1925
+ }
1926
+ if (!a.width || !a.height)
1927
+ return null;
1928
+ const n = a.width, o = a.height, l = "colorSubstitutions" in e ? e.colorSubstitutions : void 0, { size: h, sdf: c, image: d } = this._rasterizer.rasterizeImageResource(n, o, a, l);
1929
+ return this._addItemToMosaic(t, h, { type: "static", data: d }, be(e), c, !1);
1930
+ } catch (a) {
1931
+ throw Je(a) ? a : new re("mapview-invalid-resource", `Could not fetch requested resource at ${r}. ${a.message}`);
1932
+ }
1933
+ }
1934
+ _addItemToMosaic(e, t, i, r, a, s, n) {
1935
+ return this._spriteMosaic.addSpriteItem(e, t, i, r, a, s, n);
1936
+ }
1937
+ }
1938
+ function be(u) {
1939
+ switch (u.type) {
1940
+ case "CIMVectorMarker":
1941
+ case "CIMPictureMarker":
1942
+ return es(u);
1943
+ default:
1944
+ return !0;
1945
+ }
1946
+ }
1947
+ const Kr = (u) => u != null && u.startsWith("data:image/gif"), Jr = (u) => u && (u.includes(".gif") || Kr(u)), Qr = (u) => u != null && u.startsWith("data:image/png"), Zr = (u) => u && (u.includes(".png") || Qr(u)), es = (u) => u && "markerPlacement" in u && u.markerPlacement && u.markerPlacement.type === "CIMMarkerPlacementInsidePolygon";
1948
+ let ts = class {
1949
+ constructor(e) {
1950
+ this._queue = [], this._refreshable = e;
1951
+ }
1952
+ destroy() {
1953
+ this._queue = [];
1954
+ }
1955
+ enqueueTextureUpdate(e, t) {
1956
+ const i = Jt(), r = e, a = Ii, s = Math.ceil(r.height / a);
1957
+ Ue(t);
1958
+ for (let n = 0; n < s; n++) {
1959
+ const o = n * a, l = n === s - 1, h = l ? r.height - a * n : a;
1960
+ this._queue.push({ type: "chunk", request: e, resolver: i, chunk: n, chunkOffset: o, destHeight: h, chunkIsLast: l, options: t });
1961
+ }
1962
+ return Qt(t, (n) => i.reject(n)), i.promise;
1963
+ }
1964
+ upload() {
1965
+ let e = 0;
1966
+ for (; this._queue.length; ) {
1967
+ const t = performance.now(), i = this._queue.shift();
1968
+ if (i) {
1969
+ if (i.options.signal != null && i.options.signal.aborted)
1970
+ continue;
1971
+ switch (i.type) {
1972
+ case "chunk":
1973
+ this._uploadChunk(i);
1974
+ break;
1975
+ case "no-chunk":
1976
+ this._uploadNoChunk(i);
1977
+ }
1978
+ const r = performance.now() - t;
1979
+ if (e += r, e + r >= Ai)
1980
+ break;
1981
+ }
1982
+ }
1983
+ this._queue.length && this._refreshable.requestRender();
1984
+ }
1985
+ _uploadChunk(e) {
1986
+ const { request: t, resolver: i, chunkOffset: r, chunkIsLast: a, destHeight: s } = e, { data: n, texture: o, width: l } = t;
1987
+ n != null && (o.updateData(0, 0, r, l, s, n, r), a && i.resolve());
1988
+ }
1989
+ _uploadNoChunk(e) {
1990
+ const { request: t, resolver: i } = e, { data: r, texture: a } = t;
1991
+ a.setData(r), i.resolve();
1992
+ }
1993
+ };
1994
+ const is = ii(-0.5, -0.5);
1995
+ let rs = class {
1996
+ constructor() {
1997
+ this._centerNdc = Te(), this._pxToNdc = Te(), this._worldDimensionsPx = Te(), this._mat3 = Ve(), this._initialized = !1;
1998
+ }
1999
+ dispose() {
2000
+ this._program = P(this._program), this._quad = P(this._quad);
2001
+ }
2002
+ render(e, t, i) {
2003
+ const { context: r } = e, a = this._updateGeometry(e, i);
2004
+ if (t != null) {
2005
+ const { r: s, g: n, b: o, a: l } = t;
2006
+ r.setClearColor(l * s / 255, l * n / 255, l * o / 255, l);
2007
+ } else
2008
+ r.setClearColor(0, 0, 0, 0);
2009
+ if (r.setStencilFunction(De.ALWAYS, 0, 255), r.setStencilWriteMask(255), !a)
2010
+ return r.setClearStencil(1), void r.clear(r.gl.STENCIL_BUFFER_BIT | r.gl.COLOR_BUFFER_BIT);
2011
+ r.setClearStencil(0), r.clear(r.gl.STENCIL_BUFFER_BIT | r.gl.COLOR_BUFFER_BIT), this._initialized || this._initialize(r), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.setColorMask(!1, !1, !1, !1), r.setBlendingEnabled(!1), r.setStencilOp(ke.KEEP, ke.KEEP, ke.REPLACE), r.setStencilFunction(De.ALWAYS, 1, 255), r.setStencilTestEnabled(!0), r.useProgram(this._program), this._program.setUniformMatrix3fv("u_worldExtent", this._mat3), this._quad.draw(), this._quad.unbind();
2012
+ }
2013
+ _initialize(e) {
2014
+ if (this._initialized)
2015
+ return;
2016
+ const t = Me(e, ji);
2017
+ t && (this._program = t, this._quad = new Q(e, [0, 0, 1, 0, 0, 1, 1, 1]), this._initialized = !0);
2018
+ }
2019
+ _updateGeometry(e, t) {
2020
+ const { state: i, pixelRatio: r } = e, { size: a, rotation: s } = i, n = Math.round(a[0] * r), o = Math.round(a[1] * r);
2021
+ if (!i.spatialReference.isWrappable)
2022
+ return !1;
2023
+ const l = ri(s), h = Math.abs(Math.cos(l)), c = Math.abs(Math.sin(l)), d = Math.round(n * h + o * c), p = Math.round(i.worldScreenWidth);
2024
+ if (d <= p)
2025
+ return !1;
2026
+ const _ = n * c + o * h, f = p * r, g = (t.left - t.right) * r / n, y = (t.bottom - t.top) * r / o;
2027
+ Ce(this._worldDimensionsPx, f, _, 1), Ce(this._pxToNdc, 2 / n, -2 / o, 1), Ce(this._centerNdc, g, y, 1);
2028
+ const m = this._mat3;
2029
+ return Zt(m, this._centerNdc), Qe(m, m, this._pxToNdc), s !== 0 && ei(m, m, l), Qe(m, m, this._worldDimensionsPx), ti(m, m, is), !0;
2030
+ }
2031
+ }, pe = class {
2032
+ constructor() {
2033
+ this.name = this.constructor.name;
2034
+ }
2035
+ createOptions(e, t) {
2036
+ return null;
2037
+ }
2038
+ }, ss = class extends pe {
2039
+ constructor() {
2040
+ super(...arguments), this.defines = [], this._desc = { vsPath: "fx/integrate", fsPath: "fx/integrate", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
2041
+ }
2042
+ dispose() {
2043
+ this._quad && this._quad.dispose();
2044
+ }
2045
+ bind() {
2046
+ }
2047
+ unbind() {
2048
+ }
2049
+ draw(e, t) {
2050
+ if (!(t != null && t.size))
2051
+ return;
2052
+ const { context: i, renderingOptions: r } = e;
2053
+ this._quad || (this._quad = new Q(i, [0, 0, 1, 0, 0, 1, 1, 1]));
2054
+ const a = i.getBoundFramebufferObject(), { x: s, y: n, width: o, height: l } = i.getViewport(), h = t.getBlock($e.Animation);
2055
+ if (h == null)
2056
+ return;
2057
+ const c = t.getUniforms(i);
2058
+ i.setViewport(0, 0, t.size, t.size);
2059
+ const d = c.filterFlags, p = c.animation, _ = H("featurelayer-animation-enabled") ? r.labelsAnimationTime : 1, f = h.getFBO(i, 1);
2060
+ i.unbindTexture(f.colorTexture), this._computeDelta(e, f, p, d, _);
2061
+ const g = h.getFBO(i);
2062
+ i.unbindTexture(g.colorTexture), this._updateAnimationState(e, f, g), i.bindFramebuffer(a), i.setViewport(s, n, o, l);
2063
+ }
2064
+ _computeDelta(e, t, i, r, a) {
2065
+ const { context: s, painter: n, displayLevel: o } = e, l = n.materialManager.getProgram(this._desc, ["delta"]);
2066
+ if (s.bindFramebuffer(t), s.setColorMask(!0, !0, !0, !0), s.setClearColor(0, 0, 0, 0), s.clear(s.gl.COLOR_BUFFER_BIT), s.useProgram(l), !("type" in r.texture) || !("type" in i.texture))
2067
+ throw new Error("InternalError: Expected to find texture");
2068
+ s.bindTexture(r.texture, r.unit), s.bindTexture(i.texture, i.unit), l.setUniform1i("u_maskTexture", r.unit), l.setUniform1i("u_sourceTexture", i.unit), l.setUniform1f("u_timeDelta", e.deltaTime), l.setUniform1f("u_animationTime", a), l.setUniform1f("u_zoomLevel", Math.round(10 * o)), this._quad.draw();
2069
+ }
2070
+ _updateAnimationState(e, t, i) {
2071
+ const { context: r, painter: a } = e, s = a.materialManager.getProgram(this._desc, ["update"]);
2072
+ r.bindTexture(t.colorTexture, 1), r.useProgram(s), s.setUniform1i("u_sourceTexture", 1), r.bindFramebuffer(i), r.setColorMask(!0, !0, !0, !0), r.setClearColor(0, 0, 0, 0), r.clear(r.gl.COLOR_BUFFER_BIT), this._quad.draw();
2073
+ }
2074
+ };
2075
+ const as = (u) => u.replace("-", "_").toUpperCase(), Mt = (u) => `#define ${as(u)}
2076
+ `;
2077
+ function Ot(u) {
2078
+ return { attributes: /* @__PURE__ */ new Map([["a_pos", 0], ["a_tex", 1]]), shaders: { vertexShader: Mt(u) + lt("blend/blend.vert"), fragmentShader: Mt(u) + lt("blend/blend.frag") } };
2079
+ }
2080
+ const St = () => Ne.getLogger("esri.views.2d.engine.webgl.effects.blendEffects.BlendEffect");
2081
+ let ns = class {
2082
+ constructor() {
2083
+ this._size = [0, 0];
2084
+ }
2085
+ dispose(e) {
2086
+ this._backBufferTexture = P(this._backBufferTexture), this._quad = P(this._quad);
2087
+ }
2088
+ draw(e, t, i, r, a) {
2089
+ const { context: s, drawPhase: n } = e;
2090
+ if (this._setupShader(s), r && r !== "normal" && n !== D.LABEL)
2091
+ return void this._drawBlended(e, t, i, r, a);
2092
+ const o = Ot("normal"), l = s.programCache.acquire(o.shaders.vertexShader, o.shaders.fragmentShader, o.attributes);
2093
+ if (!l)
2094
+ return void St().error(new re("mapview-BlendEffect", 'Error creating shader program for blend mode "normal"'));
2095
+ s.useProgram(l), t.setSamplingMode(i), s.bindTexture(t, 0), l.setUniform1i("u_layerTexture", 0), l.setUniform1f("u_opacity", a), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA);
2096
+ const h = this._quad;
2097
+ h.draw(), h.unbind(), l.dispose();
2098
+ }
2099
+ _drawBlended(e, t, i, r, a) {
2100
+ const { context: s, state: n, pixelRatio: o, inFadeTransition: l } = e, { size: h } = n, c = s.getBoundFramebufferObject();
2101
+ let d, p;
2102
+ c != null ? (d = c.width, p = c.height) : (d = Math.round(o * h[0]), p = Math.round(o * h[1])), this._createOrResizeTexture(e, d, p);
2103
+ const _ = this._backBufferTexture;
2104
+ c.copyToTexture(0, 0, d, p, 0, 0, _), s.setStencilTestEnabled(!1), s.setStencilWriteMask(0), s.setBlendingEnabled(!0), s.setDepthTestEnabled(!1), s.setDepthWriteEnabled(!1);
2105
+ const f = Ot(r), g = s.programCache.acquire(f.shaders.vertexShader, f.shaders.fragmentShader, f.attributes);
2106
+ if (!g)
2107
+ return void St().error(new re("mapview-BlendEffect", `Error creating shader program for blend mode ${r}`));
2108
+ s.useProgram(g), _.setSamplingMode(i), s.bindTexture(_, 0), g.setUniform1i("u_backbufferTexture", 0), t.setSamplingMode(i), s.bindTexture(t, 1), g.setUniform1i("u_layerTexture", 1), g.setUniform1f("u_opacity", a), g.setUniform1f("u_inFadeOpacity", l ? 1 : 0), s.setBlendFunction(v.ONE, v.ZERO);
2109
+ const y = this._quad;
2110
+ y.draw(), y.unbind(), g.dispose(), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA);
2111
+ }
2112
+ _setupShader(e) {
2113
+ this._quad || (this._quad = new Q(e, [-1, -1, 1, -1, -1, 1, 1, 1]));
2114
+ }
2115
+ _createOrResizeTexture(e, t, i) {
2116
+ const { context: r } = e;
2117
+ if (this._backBufferTexture === null || t !== this._size[0] || i !== this._size[1]) {
2118
+ if (this._backBufferTexture)
2119
+ this._backBufferTexture.resize(t, i);
2120
+ else {
2121
+ const a = new R();
2122
+ a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.width = t, a.height = i, this._backBufferTexture = new X(r, a);
2123
+ }
2124
+ this._size[0] = t, this._size[1] = i;
2125
+ }
2126
+ }
2127
+ }, Pt = class extends pe {
2128
+ constructor(e) {
2129
+ super(), this.name = this.constructor.name, this.defines = [e];
2130
+ }
2131
+ dispose() {
2132
+ }
2133
+ bind({ context: e, painter: t }) {
2134
+ this._prev = e.getBoundFramebufferObject();
2135
+ const i = t.getFbos().effect0;
2136
+ e.bindFramebuffer(i), e.setColorMask(!0, !0, !0, !0), e.setClearColor(0, 0, 0, 0), e.clear(e.gl.COLOR_BUFFER_BIT);
2137
+ }
2138
+ unbind() {
2139
+ }
2140
+ draw(e, t) {
2141
+ const { context: i, painter: r } = e, a = r.getPostProcessingEffects(t), s = i.getBoundFramebufferObject();
2142
+ for (const { postProcessingEffect: n, effect: o } of a)
2143
+ n.draw(e, s, o);
2144
+ i.bindFramebuffer(this._prev), i.setStencilTestEnabled(!1), r.blitTexture(i, s.colorTexture, L.NEAREST), i.setStencilTestEnabled(!0);
2145
+ }
2146
+ }, os = class {
2147
+ constructor() {
2148
+ this._width = void 0, this._height = void 0, this._resources = null;
2149
+ }
2150
+ dispose() {
2151
+ this._resources && (this._resources.quadGeometry.dispose(), this._resources.quadVAO.dispose(), this._resources.highlightProgram.dispose(), this._resources.blurProgram.dispose(), this._resources = null);
2152
+ }
2153
+ preBlur(e, t) {
2154
+ e.bindTexture(t, ce), e.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [1, 0, 1 / this._width, 0]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", Li), e.bindVAO(this._resources.quadVAO), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
2155
+ }
2156
+ finalBlur(e, t) {
2157
+ e.bindTexture(t, ce), e.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [0, 1, 0, 1 / this._height]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", Ni), e.bindVAO(this._resources.quadVAO), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
2158
+ }
2159
+ renderHighlight(e, t, i) {
2160
+ e.bindTexture(t, ce), e.useProgram(this._resources.highlightProgram), i.applyHighlightOptions(e, this._resources.highlightProgram), e.bindVAO(this._resources.quadVAO), e.setBlendingEnabled(!0), e.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
2161
+ }
2162
+ _initialize(e, t, i) {
2163
+ this._width = t, this._height = i;
2164
+ const r = Ge.createVertex(e, He.STATIC_DRAW, new Int8Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]).buffer), a = new je(e, /* @__PURE__ */ new Map([["a_position", 0], ["a_texcoord", 1]]), { geometry: [new pt("a_position", 2, Le.BYTE, 0, 4), new pt("a_texcoord", 2, Le.UNSIGNED_BYTE, 2, 4)] }, { geometry: r }), s = Me(e, Xi), n = Me(e, Yi);
2165
+ e.useProgram(s), s.setUniform1i("u_texture", ce), s.setUniform1i("u_shade", $i), s.setUniform1f("u_sigma", nt), e.useProgram(n), n.setUniform1i("u_texture", ce), n.setUniform1f("u_sigma", nt), this._resources = { quadGeometry: r, quadVAO: a, highlightProgram: s, blurProgram: n };
2166
+ }
2167
+ setup(e, t, i) {
2168
+ this._resources ? (this._width = t, this._height = i) : this._initialize(e, t, i);
2169
+ }
2170
+ };
2171
+ function Tt(u, e, t) {
2172
+ const i = new R(e, t);
2173
+ return i.wrapMode = E.CLAMP_TO_EDGE, new N(u, i, new Xe(We.STENCIL_INDEX8, e, t));
2174
+ }
2175
+ let ls = class {
2176
+ constructor() {
2177
+ this._width = void 0, this._height = void 0, this._resources = null;
2178
+ }
2179
+ dispose() {
2180
+ this._resources && (this._resources.sharedBlur1Fbo.dispose(), this._resources.sharedBlur2Fbo.dispose(), this._resources = null);
2181
+ }
2182
+ _initialize(e, t, i) {
2183
+ this._width = t, this._height = i;
2184
+ const r = Tt(e, t, i), a = Tt(e, t, i);
2185
+ this._resources = { sharedBlur1Fbo: r, sharedBlur2Fbo: a };
2186
+ }
2187
+ setup(e, t, i) {
2188
+ !this._resources || this._width === t && this._height === i || this.dispose(), this._resources || this._initialize(e, t, i);
2189
+ }
2190
+ get sharedBlur1Tex() {
2191
+ return this._resources.sharedBlur1Fbo.colorTexture;
2192
+ }
2193
+ get sharedBlur1Fbo() {
2194
+ return this._resources.sharedBlur1Fbo;
2195
+ }
2196
+ get sharedBlur2Tex() {
2197
+ return this._resources.sharedBlur2Fbo.colorTexture;
2198
+ }
2199
+ get sharedBlur2Fbo() {
2200
+ return this._resources.sharedBlur2Fbo;
2201
+ }
2202
+ };
2203
+ const te = 4, we = 4 / te;
2204
+ let hs = class extends pe {
2205
+ constructor() {
2206
+ super(...arguments), this.defines = ["highlight"], this._hlRenderer = new os(), this._width = void 0, this._height = void 0, this._boundFBO = null, this._hlSurfaces = new ls(), this._adjustedWidth = void 0, this._adjustedHeight = void 0, this._blitRenderer = new Bt();
2207
+ }
2208
+ dispose() {
2209
+ var e, t;
2210
+ (e = this._hlSurfaces) == null || e.dispose(), (t = this._hlRenderer) == null || t.dispose(), this._boundFBO = null;
2211
+ }
2212
+ bind(e) {
2213
+ const { context: t, painter: i } = e, { width: r, height: a } = t.getViewport(), s = i.getFbos().effect0;
2214
+ this.setup(e, r, a), t.bindFramebuffer(s), t.setColorMask(!0, !0, !0, !0), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT);
2215
+ }
2216
+ unbind() {
2217
+ }
2218
+ setup({ context: e }, t, i) {
2219
+ this._width = t, this._height = i;
2220
+ const r = t % te, a = i % te;
2221
+ t += r < te / 2 ? -r : te - r, i += a < te / 2 ? -a : te - a, this._adjustedWidth = t, this._adjustedHeight = i, this._boundFBO = e.getBoundFramebufferObject();
2222
+ const s = Math.round(t * we), n = Math.round(i * we);
2223
+ this._hlRenderer.setup(e, s, n), this._hlSurfaces.setup(e, s, n);
2224
+ }
2225
+ draw(e) {
2226
+ const { context: t, passOptions: i } = e, r = i.activeGradient, a = t.getBoundFramebufferObject();
2227
+ t.setViewport(0, 0, this._adjustedWidth * we, this._adjustedHeight * we), t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), t.setStencilTestEnabled(!1), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._blitRenderer.render(t, a.colorTexture, L.NEAREST, 1), t.setStencilTestEnabled(!1), t.setBlendingEnabled(!1), t.setColorMask(!1, !1, !1, !0), t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._hlRenderer.preBlur(t, this._hlSurfaces.sharedBlur1Tex), t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._hlRenderer.finalBlur(t, this._hlSurfaces.sharedBlur2Tex), t.bindFramebuffer(this._boundFBO), t.setBlendingEnabled(!0), t.setColorMask(!0, !0, !0, !0), t.setViewport(0, 0, this._width, this._height), this._hlRenderer.renderHighlight(t, this._hlSurfaces.sharedBlur1Tex, r), this._boundFBO = null;
2228
+ }
2229
+ }, cs = class extends pe {
2230
+ constructor() {
2231
+ super(...arguments), this.name = this.constructor.name, this.defines = ["hittest"];
2232
+ }
2233
+ dispose() {
2234
+ this._fbo != null && this._fbo.dispose();
2235
+ }
2236
+ createOptions({ pixelRatio: e }, t, i = kt) {
2237
+ if (!t.length)
2238
+ return null;
2239
+ const r = t.shift(), a = r.x, s = r.y;
2240
+ return this._outstanding = r, { type: "hittest", distance: i * e, smallSymbolDistance: 0, smallSymbolSizeThreshold: 3, position: [a, s] };
2241
+ }
2242
+ bind(e) {
2243
+ const { context: t, attributeView: i } = e;
2244
+ if (!i.size)
2245
+ return;
2246
+ const r = i.getBlock($e.GPGPU);
2247
+ if (r == null)
2248
+ return;
2249
+ const a = r.getFBO(t);
2250
+ t.setViewport(0, 0, i.size, i.size), t.bindFramebuffer(a), t.setColorMask(!0, !0, !0, !0), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT | t.gl.DEPTH_BUFFER_BIT);
2251
+ }
2252
+ unbind() {
2253
+ }
2254
+ draw(e) {
2255
+ if (this._outstanding == null)
2256
+ return;
2257
+ const t = this._outstanding;
2258
+ this._outstanding = null, this._resolve(e, t.resolvers);
2259
+ }
2260
+ async _resolve(e, t) {
2261
+ const { context: i, attributeView: r } = e, a = r.getBlock($e.GPGPU);
2262
+ if (a == null)
2263
+ return void t.forEach((l) => l.resolve([]));
2264
+ const s = a.getFBO(i), n = new Uint8Array(s.width * s.height * 4);
2265
+ try {
2266
+ await s.readPixelsAsync(0, 0, s.width, s.height, C.RGBA, qe.UNSIGNED_BYTE, n);
2267
+ } catch {
2268
+ return void t.forEach((h) => h.resolve([]));
2269
+ }
2270
+ const o = [];
2271
+ for (let l = 0; l < n.length; l += 4) {
2272
+ const h = l / 4;
2273
+ n[l] && o.push(h);
2274
+ }
2275
+ t.forEach((l) => l.resolve(o));
2276
+ }
2277
+ }, us = class extends pe {
2278
+ constructor() {
2279
+ super(...arguments), this.name = this.constructor.name, this.defines = ["id"], this._lastSize = 0, this._boundFBO = null;
2280
+ }
2281
+ dispose() {
2282
+ this._fbo != null && this._fbo.dispose();
2283
+ }
2284
+ bind({ context: e, painter: t }) {
2285
+ this._boundFBO = e.getBoundFramebufferObject();
2286
+ const i = t.getFbos().effect0;
2287
+ e.bindFramebuffer(i), e.setColorMask(!0, !0, !0, !0), e.setClearColor(0, 0, 0, 0), e.clear(e.gl.COLOR_BUFFER_BIT);
2288
+ }
2289
+ unbind({ context: e }) {
2290
+ e.bindFramebuffer(this._boundFBO), this._boundFBO = null;
2291
+ }
2292
+ draw(e, t, i = 2 * kt) {
2293
+ this._resolve(e, t, i);
2294
+ }
2295
+ async _resolve({ context: e, state: t, pixelRatio: i }, r, a) {
2296
+ const s = e.getBoundFramebufferObject(), n = t.size[1] * i, o = Math.round(a * i), l = o / 2, h = o / 2;
2297
+ this._ensureBuffer(o), r.forEach(async (c, d) => {
2298
+ const p = /* @__PURE__ */ new Map(), _ = Math.floor(d.x * i - o / 2), f = Math.floor(n - d.y * i - o / 2);
2299
+ await s.readPixelsAsync(_, f, o, o, C.RGBA, qe.UNSIGNED_BYTE, this._buf);
2300
+ for (let y = 0; y < this._buf32.length; y++) {
2301
+ const m = this._buf32[y];
2302
+ if (m !== 4294967295 && m !== 0) {
2303
+ const M = y % o, w = o - Math.floor(y / o), x = (l - M) * (l - M) + (h - w) * (h - w), b = p.has(m) ? p.get(m) : 4294967295;
2304
+ p.set(m, Math.min(x, b));
2305
+ }
2306
+ }
2307
+ const g = Array.from(p).sort((y, m) => y[1] - m[1]).map((y) => y[0]);
2308
+ c.resolve(g), r.delete(d);
2309
+ });
2310
+ }
2311
+ _ensureBuffer(e) {
2312
+ this._lastSize !== e && (this._lastSize = e, this._buf = new Uint8Array(4 * e * e), this._buf32 = new Uint32Array(this._buf.buffer));
2313
+ }
2314
+ };
2315
+ const Ie = 5, ds = [1, 0], ps = [0, 1], _s = [1, 0.8, 0.6, 0.4, 0.2], ms = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
2316
+ let fs = class {
2317
+ constructor() {
2318
+ this._intensityFBO = null, this._compositeFBO = null, this._mipsFBOs = new Array(Ie), this._nMips = Ie, this._kernelSizeArray = [3, 5, 7, 9, 11], this._size = [0, 0], this._programDesc = { luminosityHighPass: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/luminosityHighPass", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
2319
+ }
2320
+ dispose() {
2321
+ if (this._quad = P(this._quad), this._intensityFBO = P(this._intensityFBO), this._compositeFBO = P(this._compositeFBO), this._mipsFBOs) {
2322
+ for (let e = 0; e < this._nMips; e++)
2323
+ this._mipsFBOs[e] && (this._mipsFBOs[e].horizontal.dispose(), this._mipsFBOs[e].vertical.dispose());
2324
+ this._mipsFBOs = null;
2325
+ }
2326
+ }
2327
+ draw(e, t, i) {
2328
+ const { width: r, height: a } = t, { context: s, painter: n } = e, { materialManager: o } = n, l = s.gl, h = this._programDesc, { strength: c, radius: d, threshold: p } = i;
2329
+ this._quad || (this._quad = new Q(s, [-1, -1, 1, -1, -1, 1, 1, 1])), this._createOrResizeResources(e, r, a), s.setStencilTestEnabled(!1), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilWriteMask(0);
2330
+ const _ = this._quad;
2331
+ _.bind(), s.bindFramebuffer(this._intensityFBO);
2332
+ const f = o.getProgram(h.luminosityHighPass);
2333
+ s.useProgram(f), s.bindTexture(t.colorTexture, 0), f.setUniform1i("u_texture", 0), f.setUniform3fv("u_defaultColor", [0, 0, 0]), f.setUniform1f("u_defaultOpacity", 0), f.setUniform1f("u_luminosityThreshold", p), f.setUniform1f("u_smoothWidth", 0.01);
2334
+ const g = [Math.round(r / 2), Math.round(a / 2)];
2335
+ s.setViewport(0, 0, g[0], g[1]), s.setClearColor(0, 0, 0, 0), s.clear(l.COLOR_BUFFER_BIT), _.draw(), s.setBlendingEnabled(!1);
2336
+ let y = this._intensityFBO.colorTexture;
2337
+ for (let w = 0; w < this._nMips; w++) {
2338
+ const x = o.getProgram(h.gaussianBlur, [{ name: "radius", value: this._kernelSizeArray[w] }]);
2339
+ s.useProgram(x), s.bindTexture(y, w + 1), x.setUniform1i("u_colorTexture", w + 1), x.setUniform2fv("u_texSize", g), x.setUniform2fv("u_direction", ds), s.setViewport(0, 0, g[0], g[1]);
2340
+ const b = this._mipsFBOs[w];
2341
+ s.bindFramebuffer(b.horizontal), _.draw(), y = b.horizontal.colorTexture, s.bindFramebuffer(b.vertical), s.bindTexture(y, w + 1), x.setUniform2fv("u_direction", ps), _.draw(), y = b.vertical.colorTexture, g[0] = Math.round(g[0] / 2), g[1] = Math.round(g[1] / 2);
2342
+ }
2343
+ s.setViewport(0, 0, r, a);
2344
+ const m = o.getProgram(h.composite, [{ name: "nummips", value: Ie }]);
2345
+ s.bindFramebuffer(this._compositeFBO), s.useProgram(m), m.setUniform1f("u_bloomStrength", c), m.setUniform1f("u_bloomRadius", d), m.setUniform1fv("u_bloomFactors", _s), m.setUniform3fv("u_bloomTintColors", ms), s.bindTexture(this._mipsFBOs[0].vertical.colorTexture, 1), m.setUniform1i("u_blurTexture1", 1), s.bindTexture(this._mipsFBOs[1].vertical.colorTexture, 2), m.setUniform1i("u_blurTexture2", 2), s.bindTexture(this._mipsFBOs[2].vertical.colorTexture, 3), m.setUniform1i("u_blurTexture3", 3), s.bindTexture(this._mipsFBOs[3].vertical.colorTexture, 4), m.setUniform1i("u_blurTexture4", 4), s.bindTexture(this._mipsFBOs[4].vertical.colorTexture, 5), m.setUniform1i("u_blurTexture5", 5), _.draw(), s.bindFramebuffer(t), s.setBlendingEnabled(!0);
2346
+ const M = o.getProgram(h.blit);
2347
+ s.useProgram(M), s.bindTexture(this._compositeFBO.colorTexture, 6), M.setUniform1i("u_texture", 6), s.setBlendFunction(v.ONE, v.ONE), _.draw(), _.unbind(), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilTestEnabled(!0);
2348
+ }
2349
+ _createOrResizeResources(e, t, i) {
2350
+ const { context: r } = e;
2351
+ if (this._compositeFBO && this._size[0] === t && this._size[1] === i)
2352
+ return;
2353
+ this._size[0] = t, this._size[1] = i;
2354
+ const a = [Math.round(t / 2), Math.round(i / 2)];
2355
+ if (this._compositeFBO)
2356
+ this._compositeFBO.resize(t, i);
2357
+ else {
2358
+ const s = new R(t, i);
2359
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._compositeFBO = new N(r, s);
2360
+ }
2361
+ if (this._intensityFBO)
2362
+ this._intensityFBO.resize(a[0], a[1]);
2363
+ else {
2364
+ const s = new R(a[0], a[1]);
2365
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._intensityFBO = new N(r, s);
2366
+ }
2367
+ for (let s = 0; s < this._nMips; s++) {
2368
+ if (this._mipsFBOs[s])
2369
+ this._mipsFBOs[s].horizontal.resize(a[0], a[1]), this._mipsFBOs[s].vertical.resize(a[0], a[1]);
2370
+ else {
2371
+ const n = new R(a[0], a[1]);
2372
+ n.internalFormat = C.RGBA, n.wrapMode = E.CLAMP_TO_EDGE, this._mipsFBOs[s] = { horizontal: new N(r, n), vertical: new N(r, n) };
2373
+ }
2374
+ a[0] = Math.round(a[0] / 2), a[1] = Math.round(a[1] / 2);
2375
+ }
2376
+ }
2377
+ };
2378
+ const gs = [1, 0], ys = [0, 1];
2379
+ let vs = class {
2380
+ constructor() {
2381
+ this._blurFBO = null, this._size = [0, 0], this._programDesc = { gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, radialBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/radial-blur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
2382
+ }
2383
+ dispose() {
2384
+ this._blurFBO && (this._blurFBO.dispose(), this._blurFBO = null);
2385
+ }
2386
+ draw(e, t, i) {
2387
+ const { context: r } = e, { type: a, radius: s } = i;
2388
+ if (s === 0)
2389
+ return;
2390
+ this._createOrResizeResources(e), this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1]));
2391
+ const n = this._quad;
2392
+ n.bind(), a === "blur" ? this._gaussianBlur(e, t, s) : this._radialBlur(e, t), n.unbind();
2393
+ }
2394
+ _gaussianBlur(e, t, i) {
2395
+ const { context: r, state: a, painter: s, pixelRatio: n } = e, { size: o } = a, { materialManager: l } = s, h = this._programDesc, c = this._quad, d = [Math.round(n * o[0]), Math.round(n * o[1])], p = this._blurFBO, _ = l.getProgram(h.gaussianBlur, [{ name: "radius", value: Math.ceil(i) }]);
2396
+ r.useProgram(_), r.setBlendingEnabled(!1), r.bindFramebuffer(p), r.bindTexture(t.colorTexture, 4), _.setUniform1i("u_colorTexture", 4), _.setUniform2fv("u_texSize", d), _.setUniform2fv("u_direction", gs), _.setUniform1f("u_sigma", i), c.draw(), r.bindFramebuffer(t), r.setStencilWriteMask(0), r.setStencilTestEnabled(!1), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.bindTexture(p == null ? void 0 : p.colorTexture, 5), _.setUniform1i("u_colorTexture", 5), _.setUniform2fv("u_direction", ys), c.draw(), r.setBlendingEnabled(!0), r.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), r.setStencilTestEnabled(!0);
2397
+ }
2398
+ _radialBlur(e, t) {
2399
+ const { context: i, painter: r } = e, { materialManager: a } = r, s = this._programDesc, n = this._quad, o = this._blurFBO;
2400
+ i.bindFramebuffer(o);
2401
+ const l = a.getProgram(s.radialBlur);
2402
+ i.useProgram(l), i.setBlendingEnabled(!1), i.bindTexture(t.colorTexture, 4), l.setUniform1i("u_colorTexture", 4), n.draw(), i.bindFramebuffer(t), i.setStencilWriteMask(0), i.setStencilTestEnabled(!1), i.setDepthWriteEnabled(!1), i.setDepthTestEnabled(!1), i.setBlendingEnabled(!0);
2403
+ const h = a.getProgram(s.blit);
2404
+ i.useProgram(h), i.bindTexture(o == null ? void 0 : o.colorTexture, 5), h.setUniform1i("u_texture", 5), i.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), n.draw();
2405
+ }
2406
+ _createOrResizeResources(e) {
2407
+ const { context: t, state: i, pixelRatio: r } = e, { size: a } = i, s = Math.round(r * a[0]), n = Math.round(r * a[1]);
2408
+ if (!this._blurFBO || this._size[0] !== s || this._size[1] !== n)
2409
+ if (this._size[0] = s, this._size[1] = n, this._blurFBO)
2410
+ this._blurFBO.resize(s, n);
2411
+ else {
2412
+ const o = new R(s, n);
2413
+ o.internalFormat = C.RGBA, o.wrapMode = E.CLAMP_TO_EDGE, this._blurFBO = new N(t, o);
2414
+ }
2415
+ }
2416
+ };
2417
+ class bs {
2418
+ constructor() {
2419
+ this._layerFBOTexture = null, this._size = [0, 0], this._programDesc = { vsPath: "post-processing/pp", fsPath: "post-processing/filterEffect", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
2420
+ }
2421
+ dispose() {
2422
+ this._layerFBOTexture = P(this._layerFBOTexture);
2423
+ }
2424
+ draw(e, t, i) {
2425
+ const { width: r, height: a } = t;
2426
+ this._createOrResizeResources(e, r, a);
2427
+ const { context: s, painter: n } = e, { materialManager: o } = n, l = this._programDesc, h = this._quad, c = i.colorMatrix;
2428
+ h.bind();
2429
+ const d = this._layerFBOTexture;
2430
+ s.bindFramebuffer(t), t.copyToTexture(0, 0, r, a, 0, 0, d), s.setBlendingEnabled(!1), s.setStencilTestEnabled(!1);
2431
+ const p = o.getProgram(l);
2432
+ s.useProgram(p), s.bindTexture(d, 2), p.setUniformMatrix4fv("u_coefficients", c), p.setUniform1i("u_colorTexture", 2), h.draw(), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilTestEnabled(!0), h.unbind();
2433
+ }
2434
+ _createOrResizeResources(e, t, i) {
2435
+ const { context: r } = e;
2436
+ if (!this._layerFBOTexture || this._size[0] !== t || this._size[1] !== i) {
2437
+ if (this._size[0] = t, this._size[1] = i, this._layerFBOTexture)
2438
+ this._layerFBOTexture.resize(t, i);
2439
+ else {
2440
+ const a = new R();
2441
+ a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.width = t, a.height = i, this._layerFBOTexture = new X(r, a);
2442
+ }
2443
+ this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1]));
2444
+ }
2445
+ }
2446
+ }
2447
+ const ws = [1, 0], xs = [0, 1];
2448
+ class Ms {
2449
+ constructor() {
2450
+ this._layerFBOTexture = null, this._horizontalBlurFBO = null, this._verticalBlurFBO = null, this._size = [0, 0], this._quad = null, this._programDesc = { blur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/drop-shadow/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
2451
+ }
2452
+ dispose() {
2453
+ this._layerFBOTexture = P(this._layerFBOTexture), this._horizontalBlurFBO = P(this._horizontalBlurFBO), this._verticalBlurFBO = P(this._verticalBlurFBO);
2454
+ }
2455
+ draw(e, t, i) {
2456
+ const { context: r, state: a, painter: s } = e, { materialManager: n } = s, o = this._programDesc, l = t.width, h = t.height, c = [Math.round(l), Math.round(h)], { blurRadius: d, offsetX: p, offsetY: _, color: f } = i, g = [ie(p), ie(_)];
2457
+ this._createOrResizeResources(e, l, h, c);
2458
+ const y = this._horizontalBlurFBO, m = this._verticalBlurFBO;
2459
+ r.setStencilWriteMask(0), r.setStencilTestEnabled(!1), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1);
2460
+ const M = this._layerFBOTexture;
2461
+ t.copyToTexture(0, 0, l, h, 0, 0, M), this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1])), r.setViewport(0, 0, c[0], c[1]);
2462
+ const w = this._quad;
2463
+ w.bind(), r.setBlendingEnabled(!1);
2464
+ const x = n.getProgram(o.blur, [{ name: "radius", value: Math.ceil(d) }]);
2465
+ r.useProgram(x), r.bindFramebuffer(y), r.bindTexture(t.colorTexture, 4), x.setUniform1i("u_colorTexture", 4), x.setUniform2fv("u_texSize", c), x.setUniform2fv("u_direction", ws), x.setUniform1f("u_sigma", d), w.draw(), r.bindFramebuffer(m), r.bindTexture(y == null ? void 0 : y.colorTexture, 5), x.setUniform1i("u_colorTexture", 5), x.setUniform2fv("u_direction", xs), w.draw(), r.bindFramebuffer(t), r.setViewport(0, 0, l, h);
2466
+ const b = n.getProgram(o.composite);
2467
+ r.useProgram(b), r.bindTexture(m == null ? void 0 : m.colorTexture, 2), b.setUniform1i("u_blurTexture", 2), r.bindTexture(M, 3), b.setUniform1i("u_layerFBOTexture", 3), b.setUniform4fv("u_shadowColor", [f[3] * (f[0] / 255), f[3] * (f[1] / 255), f[3] * (f[2] / 255), f[3]]), b.setUniformMatrix3fv("u_displayViewMat3", a.displayMat3), b.setUniform2fv("u_shadowOffset", g), w.draw(), r.setBlendingEnabled(!0), r.setStencilTestEnabled(!0), r.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), w.unbind();
2468
+ }
2469
+ _createOrResizeResources(e, t, i, r) {
2470
+ const { context: a } = e;
2471
+ if (!this._horizontalBlurFBO || this._size[0] !== t || this._size[1] !== i) {
2472
+ if (this._size[0] = t, this._size[1] = i, this._horizontalBlurFBO)
2473
+ this._horizontalBlurFBO.resize(r[0], r[1]);
2474
+ else {
2475
+ const s = new R(r[0], r[1]);
2476
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._horizontalBlurFBO = new N(a, s);
2477
+ }
2478
+ if (this._verticalBlurFBO)
2479
+ this._verticalBlurFBO.resize(r[0], r[1]);
2480
+ else {
2481
+ const s = new R(r[0], r[1]);
2482
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._verticalBlurFBO = new N(a, s);
2483
+ }
2484
+ if (this._layerFBOTexture)
2485
+ this._layerFBOTexture.resize(t, i);
2486
+ else {
2487
+ const s = new R();
2488
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, s.width = t, s.height = i, this._layerFBOTexture = new X(a, s);
2489
+ }
2490
+ }
2491
+ }
2492
+ }
2493
+ class Os {
2494
+ constructor() {
2495
+ this._size = [0, 0], this._layerFBOTexture = null;
2496
+ }
2497
+ dispose() {
2498
+ this._layerFBOTexture = P(this._layerFBOTexture);
2499
+ }
2500
+ draw(e, t, i) {
2501
+ const { width: r, height: a } = t;
2502
+ this._createOrResizeResources(e, r, a);
2503
+ const { context: s, painter: n } = e, { amount: o } = i, l = s.gl, h = this._layerFBOTexture;
2504
+ s.bindFramebuffer(t), t.copyToTexture(0, 0, r, a, 0, 0, h), s.setBlendingEnabled(!0), s.setStencilTestEnabled(!1), s.setDepthTestEnabled(!1), s.setClearColor(0, 0, 0, 0), s.clear(l.COLOR_BUFFER_BIT), n.blitTexture(s, h, L.NEAREST, o);
2505
+ }
2506
+ _createOrResizeResources(e, t, i) {
2507
+ const { context: r } = e;
2508
+ if (!this._layerFBOTexture || this._size[0] !== t || this._size[1] !== i)
2509
+ if (this._size[0] = t, this._size[1] = i, this._layerFBOTexture)
2510
+ this._layerFBOTexture.resize(t, i);
2511
+ else {
2512
+ const a = new R();
2513
+ a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.samplingMode = L.NEAREST, a.width = t, a.height = i, this._layerFBOTexture = new X(r, a);
2514
+ }
2515
+ }
2516
+ }
2517
+ function Ss(u) {
2518
+ switch (u) {
2519
+ case "bloom":
2520
+ case "blur":
2521
+ case "opacity":
2522
+ case "drop-shadow":
2523
+ return u;
2524
+ default:
2525
+ return "colorize";
2526
+ }
2527
+ }
2528
+ const Ps = { colorize: () => new bs(), blur: () => new vs(), bloom: () => new fs(), opacity: () => new Os(), "drop-shadow": () => new Ms() };
2529
+ class Ts {
2530
+ constructor() {
2531
+ this._effectMap = /* @__PURE__ */ new Map();
2532
+ }
2533
+ dispose() {
2534
+ this._effectMap.forEach((e) => e.dispose()), this._effectMap.clear();
2535
+ }
2536
+ getPostProcessingEffects(e) {
2537
+ if (!e || e.length === 0)
2538
+ return [];
2539
+ const t = [];
2540
+ for (const i of e) {
2541
+ const r = Ss(i.type);
2542
+ let a = this._effectMap.get(r);
2543
+ a || (a = Ps[r](), this._effectMap.set(r, a)), t.push({ postProcessingEffect: a, effect: i });
2544
+ }
2545
+ return t;
2546
+ }
2547
+ }
2548
+ class Cs {
2549
+ constructor(e, t) {
2550
+ this.brushes = e, this.name = t.name, this.drawPhase = t.drawPhase || D.MAP, this._targetFn = t.target, this.effects = t.effects || [], this.enableDefaultDraw = t.enableDefaultDraw ?? (() => !0), this.forceDrawByDisplayOrder = !!t.forceDrawByDisplayOrder;
2551
+ }
2552
+ render(e) {
2553
+ var s;
2554
+ const { context: t, profiler: i } = e, r = this._targetFn(), a = this.drawPhase & e.drawPhase;
2555
+ if (i.recordPassStart(this.name), a) {
2556
+ this.enableDefaultDraw() && this._doRender(e, r), i.recordPassEnd();
2557
+ for (const n of this.effects) {
2558
+ if (!n.enable())
2559
+ continue;
2560
+ const o = n.apply, l = (s = n.args) == null ? void 0 : s.call(n), h = t.getViewport(), c = t.getBoundFramebufferObject(), d = e.passOptions;
2561
+ this._bindEffect(e, o, l), this._doRender(e, r, o.defines), this._drawAndUnbindEffect(e, o, h, c, d, l);
2562
+ }
2563
+ }
2564
+ }
2565
+ _doRender(e, t, i) {
2566
+ if (t == null)
2567
+ return;
2568
+ const { profiler: r, context: a } = e;
2569
+ for (const s of this.brushes) {
2570
+ if (r.recordBrushStart(s.name), s.brushEffect != null) {
2571
+ const n = a.getViewport(), o = a.getBoundFramebufferObject(), l = e.passOptions;
2572
+ this._bindEffect(e, s.brushEffect), this._drawWithBrush(s, e, t, i), this._drawAndUnbindEffect(e, s.brushEffect, n, o, l);
2573
+ } else
2574
+ this._drawWithBrush(s, e, t, i);
2575
+ r.recordBrushEnd();
2576
+ }
2577
+ }
2578
+ _drawWithBrush(e, t, i, r) {
2579
+ si(i) ? (e.prepareState(t, r), e.drawMany(t, i, r)) : i.visible && (e.prepareState(t, r), e.draw(t, i, r));
2580
+ }
2581
+ _bindEffect(e, t, i) {
2582
+ const { profiler: r } = e;
2583
+ r.recordPassStart(this.name + "." + t.name), t.bind(e, i);
2584
+ const a = t.createOptions(e, i);
2585
+ e.passOptions = a;
2586
+ }
2587
+ _drawAndUnbindEffect(e, t, i, r, a, s) {
2588
+ const { profiler: n, context: o } = e;
2589
+ e.passOptions = a, n.recordBrushStart(t.name), t.draw(e, s), t.unbind(e, s), o.bindFramebuffer(r);
2590
+ const { x: l, y: h, width: c, height: d } = i;
2591
+ o.setViewport(l, h, c, d), n.recordBrushEnd(), n.recordPassEnd();
2592
+ }
2593
+ }
2594
+ class Ct {
2595
+ constructor() {
2596
+ this._programCache = /* @__PURE__ */ new Map();
2597
+ }
2598
+ destroy() {
2599
+ for (const e of this._programCache.values())
2600
+ e.destroy();
2601
+ this._programCache.clear();
2602
+ }
2603
+ getProgram(e, t, i, r, a) {
2604
+ const s = e.getShaderKey(t, i, r, a);
2605
+ let n = this._programCache.get(s);
2606
+ return n || (n = e.getProgram(t, i, r, a), this._programCache.set(s, n)), n;
2607
+ }
2608
+ }
2609
+ class Es {
2610
+ constructor(e, t) {
2611
+ this.context = e, this._currentPipelineStateNeedsUpdate = !1, this._blitRenderer = new Bt(), this._worldExtentRenderer = new rs(), this._brushCache = /* @__PURE__ */ new Map(), this._lastWidth = null, this._lastHeight = null, this._vtlMaterialManager = new Rr(), this._blendEffect = new ns(), this._stencilBuf = null, this._prevBeforeLayerFBOStack = [], this._fboPool = [], this.effects = { highlight: new hs(), hittest: new cs(), hittestVTL: new us(), integrate: new ss(), insideEffect: new Pt("inside"), outsideEffect: new Pt("outside") }, this._programCache = new Ct(), this._shaderState = { shader: null, uniforms: null, defines: null, optionalAttributes: null, useComputeBuffer: !1 }, this.materialManager = new zr(e), this.textureManager = new Yr(t), this.textureUploadManager = new ts(t), this._effectsManager = new Ts(), this._quadMesh = new Q(e, [0, 0, 1, 0, 0, 1, 1, 1]);
2612
+ }
2613
+ dispose() {
2614
+ if (this._programCache.destroy(), this.materialManager.dispose(), this.textureManager.dispose(), this.textureUploadManager.destroy(), this._blitRenderer = P(this._blitRenderer), this._worldExtentRenderer = P(this._worldExtentRenderer), this._quadMesh.dispose(), this._brushCache && (this._brushCache.forEach((e) => e.dispose()), this._brushCache.clear(), this._brushCache = null), this._fbos) {
2615
+ let e;
2616
+ for (e in this._fbos)
2617
+ this._fbos[e] && this._fbos[e].dispose();
2618
+ }
2619
+ for (const e of this._fboPool)
2620
+ e.dispose();
2621
+ if (this._fboPool.length = 0, this.effects) {
2622
+ let e;
2623
+ for (e in this.effects)
2624
+ this.effects[e] && this.effects[e].dispose();
2625
+ }
2626
+ this._effectsManager.dispose(), this._blendEffect.dispose(this.context), this._vtlMaterialManager = P(this._vtlMaterialManager);
2627
+ }
2628
+ clearShaderCache() {
2629
+ this._programCache.destroy(), this._programCache = new Ct();
2630
+ }
2631
+ get blitRenderer() {
2632
+ return this._blitRenderer;
2633
+ }
2634
+ get vectorTilesMaterialManager() {
2635
+ return this._vtlMaterialManager;
2636
+ }
2637
+ getFbos() {
2638
+ if (!this._fbos)
2639
+ throw new Error("InternalError: Painter FBOs not initialized");
2640
+ return this._fbos;
2641
+ }
2642
+ acquireFbo(e, t) {
2643
+ let i;
2644
+ if (this._fboPool.length > 0)
2645
+ i = this._fboPool.pop();
2646
+ else {
2647
+ const r = new R(e, t);
2648
+ r.samplingMode = L.NEAREST, r.wrapMode = E.CLAMP_TO_EDGE, i = new N(this.context, r, this._stencilBuf);
2649
+ }
2650
+ return i.width === e && i.height === t || i.resize(e, t), i;
2651
+ }
2652
+ releaseFbo(e) {
2653
+ this._fboPool.push(e);
2654
+ }
2655
+ getSharedStencilBuffer() {
2656
+ return this._stencilBuf;
2657
+ }
2658
+ beforeRenderPhases(e, t, i) {
2659
+ const { context: r } = e;
2660
+ this._worldExtentRenderer.render(e, t, i);
2661
+ const { width: a, height: s } = r.getViewport();
2662
+ if (this.updateFBOs(a, s), this._prevFBO = r.getBoundFramebufferObject(), r.bindFramebuffer(this.getFbos().output), r.setColorMask(!0, !0, !0, !0), t != null) {
2663
+ const { r: n, g: o, b: l, a: h } = t;
2664
+ r.setClearColor(h * n / 255, h * o / 255, h * l / 255, h);
2665
+ } else
2666
+ r.setClearColor(0, 0, 0, 0);
2667
+ r.setDepthWriteEnabled(!0), r.setClearDepth(1), r.clear(r.gl.COLOR_BUFFER_BIT | r.gl.DEPTH_BUFFER_BIT), r.setDepthWriteEnabled(!1);
2668
+ }
2669
+ afterRenderPhases(e) {
2670
+ const { context: t } = e;
2671
+ t.bindFramebuffer(this._prevFBO), t.setStencilFunction(De.EQUAL, 1, 255), t.setStencilTestEnabled(!0), t.setDepthTestEnabled(!1), this.blitTexture(t, this.getFbos().output.colorTexture, L.NEAREST);
2672
+ }
2673
+ beforeRenderLayer(e, t, i) {
2674
+ const { context: r, blendMode: a, effects: s, drawPhase: n, requireFBO: o } = e;
2675
+ if (o || Et(n, a, s, i)) {
2676
+ const l = r.getBoundFramebufferObject();
2677
+ this._prevBeforeLayerFBOStack.push(l);
2678
+ const { width: h, height: c } = r.getViewport(), d = this.acquireFbo(h, c);
2679
+ r.bindFramebuffer(d), r.setColorMask(!0, !0, !0, !0), r.setClearColor(0, 0, 0, 0), r.setDepthWriteEnabled(!0), r.setClearDepth(1), r.clear(r.gl.COLOR_BUFFER_BIT | r.gl.DEPTH_BUFFER_BIT), r.setDepthWriteEnabled(!1);
2680
+ }
2681
+ r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.setStencilTestEnabled(!0), r.setClearStencil(t), r.setStencilWriteMask(255), r.clear(r.gl.STENCIL_BUFFER_BIT);
2682
+ }
2683
+ afterRenderLayer(e, t) {
2684
+ const { context: i, blendMode: r, effects: a, requireFBO: s, drawPhase: n } = e;
2685
+ if (s || Et(n, r, a, t)) {
2686
+ const o = i.getBoundFramebufferObject();
2687
+ a != null && a.length > 0 && n === D.MAP && (i.setColorMask(!0, !0, !0, !0), this._applyEffects(e, a, o)), i.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()), i.setStencilTestEnabled(!1), i.setStencilWriteMask(0), i.setBlendingEnabled(!0), i.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), i.setColorMask(!0, !0, !0, !0);
2688
+ const l = r == null || n === D.HIGHLIGHT ? "normal" : r;
2689
+ this._blendEffect.draw(e, o.colorTexture, L.NEAREST, l, t), this.releaseFbo(o);
2690
+ }
2691
+ }
2692
+ renderObject(e, t, i, r) {
2693
+ const a = ht[i];
2694
+ if (!a)
2695
+ return;
2696
+ let s = this._brushCache.get(a);
2697
+ s === void 0 && (s = new a(), this._brushCache.set(a, s)), s.prepareState(e), s.draw(e, t, r);
2698
+ }
2699
+ renderObjects(e, t, i, r) {
2700
+ const a = ht[i];
2701
+ if (!a)
2702
+ return;
2703
+ let s = this._brushCache.get(a);
2704
+ s === void 0 && (s = new a(), this._brushCache.set(a, s)), s.drawMany(e, t, r);
2705
+ }
2706
+ registerRenderPass(e) {
2707
+ const t = e.brushes.map((i) => (this._brushCache.has(i) || this._brushCache.set(i, new i()), this._brushCache.get(i)));
2708
+ return new Cs(t, e);
2709
+ }
2710
+ blitTexture(e, t, i, r = 1) {
2711
+ e.setBlendingEnabled(!0), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), e.setColorMask(!0, !0, !0, !0), this._blitRenderer.render(e, t, i, r), this._currentPipelineStateNeedsUpdate = !0;
2712
+ }
2713
+ getPostProcessingEffects(e) {
2714
+ return this._effectsManager.getPostProcessingEffects(e);
2715
+ }
2716
+ updateFBOs(e, t) {
2717
+ if (e !== this._lastWidth || t !== this._lastHeight) {
2718
+ if (this._lastWidth = e, this._lastHeight = t, this._fbos) {
2719
+ let a;
2720
+ for (a in this._fbos)
2721
+ this._fbos[a].resize(e, t);
2722
+ return;
2723
+ }
2724
+ const i = new R(e, t);
2725
+ i.samplingMode = L.NEAREST, i.wrapMode = E.CLAMP_TO_EDGE;
2726
+ const r = new Xe(We.DEPTH_STENCIL, e, t);
2727
+ this._stencilBuf = new ur(this.context, r), this._fbos = { output: new N(this.context, i, this._stencilBuf), effect0: new N(this.context, i, this._stencilBuf) };
2728
+ }
2729
+ }
2730
+ _applyEffects(e, t, i) {
2731
+ const { context: r } = e, a = this._effectsManager.getPostProcessingEffects(t);
2732
+ for (const { postProcessingEffect: s, effect: n } of a)
2733
+ r.bindFramebuffer(i), s.draw(e, i, n);
2734
+ this._currentPipelineStateNeedsUpdate = !0;
2735
+ }
2736
+ setShader(e) {
2737
+ this._shaderState.shader = e.shader, this._shaderState.uniforms = e.uniforms, this._shaderState.defines = e.defines, this._shaderState.optionalAttributes = e.optionalAttributes, this._shaderState.useComputeBuffer = e.useComputeBuffer ?? !1;
2738
+ }
2739
+ setPipelineState(e) {
2740
+ e !== this._currentPipelineState && (this._currentPipelineState = e, this._currentPipelineStateNeedsUpdate = !0);
2741
+ }
2742
+ submitDraw(e, t) {
2743
+ const { instance: i } = t, r = i.instanceId, { shader: a, uniforms: s, defines: n, optionalAttributes: o, useComputeBuffer: l } = this._shaderState, h = t.target.getMesh(r), c = { useComputeBuffer: l, locationInfo: a.locationInfo, computeAttributeMap: a.computeAttributes }, d = h.getLayout(c);
2744
+ if (d == null)
2745
+ return null;
2746
+ const { primitive: p, count: _, offset: f } = h.getDrawArgs(ne.TRIANGLES, t.count, t.start * Uint32Array.BYTES_PER_ELEMENT, l), g = this._programCache.getProgram(a, d, s, n ?? {}, o ?? {});
2747
+ g.setUniforms(s), g.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, t.target);
2748
+ const y = h.getVAO(e, a.locationInfo, c);
2749
+ return e.bindVAO(y), e.drawElements(p, _, Le.UNSIGNED_INT, f), e.bindVAO(null), g.cleanupTemporaryTextures(), { vertexShader: g.vertexShader, fragmentShader: g.fragmentShader };
2750
+ }
2751
+ submitDrawQuad(e) {
2752
+ const { shader: t, uniforms: i, defines: r, optionalAttributes: a } = this._shaderState, s = this._programCache.getProgram(t, this._quadMesh.layout, i, r ?? {}, a ?? {});
2753
+ s.setUniforms(i), s.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, null), this._quadMesh.draw(), e.bindVAO(null), s.cleanupTemporaryTextures();
2754
+ }
2755
+ submitDrawMesh(e, t, i) {
2756
+ const { shader: r, uniforms: a, defines: s, optionalAttributes: n } = this._shaderState, o = this._programCache.getProgram(r, t.layout, a, s ?? {}, n ?? {});
2757
+ if (o.setUniforms(a), o.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, null), i)
2758
+ for (const l of i)
2759
+ t.bind(e, l), t.draw(e);
2760
+ else
2761
+ for (let l = 0; l < t.parts.length; l++)
2762
+ t.bind(e, l), t.draw(e);
2763
+ t.unbind(e), o.cleanupTemporaryTextures();
2764
+ }
2765
+ updatePipelineState(e) {
2766
+ this._currentPipelineStateNeedsUpdate && (this._currentPipelineStateNeedsUpdate = !1, this._updatePipelineState(e));
2767
+ }
2768
+ _updatePipelineState(e) {
2769
+ if (this._currentPipelineState == null)
2770
+ throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
2771
+ const { color: t, depth: i, stencil: r } = this._currentPipelineState;
2772
+ if (t) {
2773
+ const { blendMode: a, write: s } = t;
2774
+ switch (e.setColorMask(...s), e.setBlendingEnabled(!0), e.setBlendEquation(ut.ADD), a) {
2775
+ case "composite":
2776
+ e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA);
2777
+ break;
2778
+ case "additive":
2779
+ e.setBlendFunctionSeparate(v.ONE, v.ONE, v.ONE, v.ONE);
2780
+ break;
2781
+ case "custom": {
2782
+ const { blendParameters: n } = t, { dstAlpha: o, dstRGB: l, srcAlpha: h, srcRGB: c } = n;
2783
+ e.setBlendFunctionSeparate(c, l, h, o);
2784
+ break;
2785
+ }
2786
+ case "delete":
2787
+ e.setBlendEquation(ut.REVERSE_SUBTRACT), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA);
2788
+ }
2789
+ }
2790
+ if (i) {
2791
+ const { test: a, write: s } = i;
2792
+ s ? (e.setDepthWriteEnabled(!0), e.setDepthRange(s.zNear, s.zFar)) : e.setDepthWriteEnabled(!1), a ? (e.setDepthTestEnabled(!0), e.setDepthFunction(a)) : e.setDepthTestEnabled(!1);
2793
+ } else
2794
+ e.setDepthTestEnabled(!1), e.setDepthWriteEnabled(!1);
2795
+ if (r) {
2796
+ const { test: a, write: s } = r;
2797
+ if (a) {
2798
+ const { compare: n, mask: o, op: l, ref: h } = a;
2799
+ e.setStencilTestEnabled(!0), typeof h != "function" && e.setStencilFunctionSeparate(Be.FRONT_AND_BACK, n, h, o), e.setStencilOpSeparate(Be.FRONT_AND_BACK, l.fail, l.zFail, l.zPass);
2800
+ } else
2801
+ e.setStencilTestEnabled(!1);
2802
+ if (s) {
2803
+ const { mask: n } = s;
2804
+ e.setStencilWriteMask(n);
2805
+ } else
2806
+ e.setStencilWriteMask(0);
2807
+ } else
2808
+ e.setStencilTestEnabled(!1), e.setStencilWriteMask(0);
2809
+ }
2810
+ _updateStencilRef(e, t) {
2811
+ if (this._currentPipelineState == null)
2812
+ throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
2813
+ const { stencil: i } = this._currentPipelineState;
2814
+ if (i) {
2815
+ const { test: r } = i;
2816
+ if (r) {
2817
+ const { compare: a, mask: s, ref: n } = r;
2818
+ typeof n == "function" && e.setStencilFunctionSeparate(Be.FRONT_AND_BACK, a, n(t), s);
2819
+ }
2820
+ }
2821
+ }
2822
+ }
2823
+ function Et(u, e, t, i) {
2824
+ return u !== D.LABEL_ALPHA && u !== D.LABEL && u !== D.HIGHLIGHT && (i !== 1 || e != null && e !== "normal" || t != null && t.length > 0);
2825
+ }
2826
+ let Rs = class {
2827
+ constructor() {
2828
+ this._candidateTiles = [];
2829
+ }
2830
+ schedule(e) {
2831
+ this._candidateTiles.includes(e) || this._candidateTiles.push(e);
2832
+ }
2833
+ reshuffle(e) {
2834
+ const t = [];
2835
+ for (const i of this._candidateTiles)
2836
+ e > 0 ? (i.reshuffle(), e--) : t.push(i);
2837
+ this._candidateTiles = t;
2838
+ }
2839
+ };
2840
+ const zs = 2e3;
2841
+ class xn extends Ui {
2842
+ constructor(e, t) {
2843
+ super(), this._trash = /* @__PURE__ */ new Set(), this._renderRemainingTime = 0, this._lastFrameRenderTime = 0, this._renderRequested = ai(!1), this.stage = this, this._stationary = !0, this._reshuffleManager = new Rs(), this._canvas = new vr(e), this.context = new tr(this._canvas.gl, t.contextOptions ?? {}), this.painter = new Es(this.context, this), this._cimAnalyzer = new fr(this.painter.textureManager.resourceManager), H("esri-2d-profiler") && (this._debugOutput = document.createElement("div"), this._debugOutput.setAttribute("style", "margin: 24px 64px; position: absolute; color: red;"), e.appendChild(this._debugOutput));
2844
+ const i = () => this._highlightGradient;
2845
+ this._renderParameters = { drawPhase: 0, state: this.state, pixelRatio: window.devicePixelRatio, stationary: !1, globalOpacity: 1, blendMode: null, deltaTime: -1, time: 0, inFadeTransition: !1, effects: null, context: this.context, painter: this.painter, timeline: t.timeline || new ni(), renderingOptions: t.renderingOptions, requestRender: () => this.requestRender(), allowDelayedRender: !1, requireFBO: !1, profiler: new Ki(this.context, this._debugOutput), dataUploadCounter: 0, get highlightGradient() {
2846
+ return i();
2847
+ }, reshuffleManager: this._reshuffleManager, backgroundColor: t.backgroundColor }, this._taskHandle = oi({ render: (r) => this.renderFrame(r) }), this._taskHandle.pause(), this._lostWebGLContextHandle = this._canvas.events.on("webgl-context-lost", (r) => this.emit("webgl-error", { error: new re("webgl-context-lost", r.statusMessage) })), this._bufferPool = new Hi(), dr();
2848
+ }
2849
+ destroy() {
2850
+ var e, t;
2851
+ pr(this.context), this.removeAllChildren(), this._emptyTrash(), this._taskHandle = Ze(this._taskHandle), this._lostWebGLContextHandle = Ze(this._lostWebGLContextHandle), this._canvas.destroy(), (t = (e = this._debugOutput) == null ? void 0 : e.parentNode) == null || t.removeChild(this._debugOutput), this._bufferPool.destroy(), this.painter.dispose(), this.context.dispose(), this._canvas = null;
2852
+ }
2853
+ get textureManager() {
2854
+ return this.painter.textureManager;
2855
+ }
2856
+ get backgroundColor() {
2857
+ return this._renderParameters.backgroundColor;
2858
+ }
2859
+ set backgroundColor(e) {
2860
+ this._renderParameters.backgroundColor = e, this.requestRender();
2861
+ }
2862
+ get bufferPool() {
2863
+ return this._bufferPool;
2864
+ }
2865
+ get cimAnalyzer() {
2866
+ return this._cimAnalyzer;
2867
+ }
2868
+ get renderingOptions() {
2869
+ return this._renderingOptions;
2870
+ }
2871
+ set renderingOptions(e) {
2872
+ this._renderingOptions = e, this.requestRender();
2873
+ }
2874
+ get renderRequested() {
2875
+ return this._renderRequested.value;
2876
+ }
2877
+ get state() {
2878
+ return this._state;
2879
+ }
2880
+ set state(e) {
2881
+ this._state = e, this.requestRender();
2882
+ }
2883
+ get stationary() {
2884
+ return this._stationary;
2885
+ }
2886
+ set stationary(e) {
2887
+ this._stationary !== e && (this._stationary = e, this.requestRender());
2888
+ }
2889
+ trashDisplayObject(e) {
2890
+ this._trash.add(e), this.requestRender();
2891
+ }
2892
+ untrashDisplayObject(e) {
2893
+ return this._trash.delete(e);
2894
+ }
2895
+ requestRender() {
2896
+ this._renderRemainingTime = zs, this.renderRequested || (this._renderRequested.value = !0, this._taskHandle.resume());
2897
+ }
2898
+ renderFrame(e) {
2899
+ const t = this._lastFrameRenderTime ? e.time - this._lastFrameRenderTime : 0;
2900
+ this._renderRemainingTime -= t, this._renderRemainingTime <= 0 && this._taskHandle.pause(), this._lastFrameRenderTime = e.time, this._renderRequested.value = !1, this._renderParameters.state = this._state, this._renderParameters.stationary = this.stationary, this._renderParameters.pixelRatio = window.devicePixelRatio, this._renderParameters.globalOpacity = 1, this._renderParameters.time = e.time, this._renderParameters.deltaTime = e.deltaTime, this._renderParameters.effects = null, this.processRender(this._renderParameters), this._emptyTrash();
2901
+ }
2902
+ _createTransforms() {
2903
+ return { displayViewScreenMat3: Ve() };
2904
+ }
2905
+ renderChildren(e) {
2906
+ for (const t of this.children)
2907
+ t.beforeRender(e);
2908
+ this._reshuffleManager.reshuffle(Di), this._canvas.render(e, () => this._renderChildren(this.children, e));
2909
+ for (const t of this.children)
2910
+ t.afterRender(e);
2911
+ }
2912
+ _renderChildren(e, t) {
2913
+ const i = this.context;
2914
+ this.painter.textureUploadManager.upload(), i.resetInfo(), t.profiler.recordStart("drawLayers"), t.dataUploadCounter = 0, this.painter.beforeRenderPhases(t, t.backgroundColor, this.state.padding), t.drawPhase = D.MAP;
2915
+ for (const r of e)
2916
+ r.processRender(t);
2917
+ if (this.children.some((r) => r.hasHighlight)) {
2918
+ t.drawPhase = D.HIGHLIGHT;
2919
+ for (const r of e)
2920
+ r.processRender(t);
2921
+ }
2922
+ if (this.children.some((r) => r.hasLabels)) {
2923
+ t.drawPhase = D.LABEL;
2924
+ for (const r of e)
2925
+ r.processRender(t);
2926
+ }
2927
+ if (H("esri-tiles-debug")) {
2928
+ t.drawPhase = D.DEBUG;
2929
+ for (const r of e)
2930
+ r.processRender(t);
2931
+ }
2932
+ this.painter.afterRenderPhases(t), t.profiler.recordEnd("drawLayers"), i.logInfo();
2933
+ }
2934
+ doRender(e) {
2935
+ const t = this.context, { state: i, pixelRatio: r } = e;
2936
+ this._canvas.resize(e), t.setViewport(0, 0, r * i.size[0], r * i.size[1]), t.setDepthWriteEnabled(!0), t.setStencilWriteMask(255), this.renderChildren(e);
2937
+ }
2938
+ async takeScreenshot(e, t, i, r) {
2939
+ const a = Math.round(this.state.size[0] * e.resolutionScale), s = Math.round(this.state.size[1] * e.resolutionScale), n = e.resolutionScale, o = this.context, l = this._state.clone();
2940
+ if (r != null) {
2941
+ const m = l.viewpoint;
2942
+ l.viewpoint.rotation = r, l.viewpoint = m;
2943
+ }
2944
+ const h = { ...this._renderParameters, drawPhase: null, globalOpacity: 1, stationary: !0, state: l, pixelRatio: n, time: performance.now(), deltaTime: 0, blendMode: null, effects: null, inFadeTransition: !1, backgroundColor: i }, c = new R(a, s);
2945
+ c.wrapMode = E.CLAMP_TO_EDGE, c.internalFormat = Zi.RGBA8, c.isImmutable = !0;
2946
+ const d = new N(o, c, new Xe(We.DEPTH_STENCIL, a, s)), p = o.getBoundFramebufferObject(), _ = o.getViewport();
2947
+ o.bindFramebuffer(d), o.setViewport(0, 0, a, s), this._renderChildren(t ?? this.children, h);
2948
+ const f = this._readbackScreenshot(d, { ...e.cropArea, y: s - (e.cropArea.y + e.cropArea.height) });
2949
+ o.bindFramebuffer(p), o.setViewport(_.x, _.y, _.width, _.height), this.requestRender();
2950
+ const g = await f;
2951
+ let y;
2952
+ return e.outputScale === 1 ? y = g : (y = new ImageData(Math.round(g.width * e.outputScale), Math.round(g.height * e.outputScale)), li(g, y, !0)), d.dispose(), y;
2953
+ }
2954
+ async _readbackScreenshot(e, t) {
2955
+ const i = rr(t.width, t.height, document.createElement("canvas"));
2956
+ return await e.readPixelsAsync(t.x, t.y, t.width, t.height, C.RGBA, qe.UNSIGNED_BYTE, new Uint8Array(i.data.buffer)), i;
2957
+ }
2958
+ _emptyTrash() {
2959
+ for (; this._trash.size > 0; ) {
2960
+ const e = Array.from(this._trash);
2961
+ this._trash.clear();
2962
+ for (const t of e)
2963
+ t.processDetach();
2964
+ }
2965
+ }
2966
+ }
2967
+ async function Fs(u) {
2968
+ const e = import("./mask-svg-30f64a7b.js"), t = import("./overlay-svg-c3941b3b.js"), i = _t((await e).default, { signal: u }), r = _t((await t).default, { signal: u }), a = { mask: await i, overlay: await r };
2969
+ return Ue(u), a;
2970
+ }
2971
+ class Mn extends Vi {
2972
+ constructor() {
2973
+ super(), this._handles = new hi(), this._resourcePixelRatio = 1, this.visible = !1;
2974
+ }
2975
+ destroy() {
2976
+ this._handles = ci(this._handles), this._disposeRenderResources(), this._resourcesTask = ui(this._resourcesTask);
2977
+ }
2978
+ get backgroundColor() {
2979
+ return this._backgroundColor;
2980
+ }
2981
+ set backgroundColor(e) {
2982
+ this._backgroundColor = e, this.requestRender();
2983
+ }
2984
+ get magnifier() {
2985
+ return this._magnifier;
2986
+ }
2987
+ set magnifier(e) {
2988
+ this._magnifier = e, this._handles.removeAll(), this._handles.add([Ee(() => e.version, () => {
2989
+ this.visible = e.visible && e.position != null && e.size > 0, this.requestRender();
2990
+ }, di), Ee(() => [e.maskUrl, e.overlayUrl], () => this._reloadResources()), Ee(() => e.size, () => {
2991
+ this._disposeRenderResources(), this.requestRender();
2992
+ })]);
2993
+ }
2994
+ _createTransforms() {
2995
+ return { displayViewScreenMat3: Ve() };
2996
+ }
2997
+ doRender(e) {
2998
+ const t = e.context;
2999
+ if (!this._resourcesTask)
3000
+ return void this._reloadResources();
3001
+ if (e.drawPhase !== D.MAP || !this._canRender())
3002
+ return;
3003
+ this._updateResources(e);
3004
+ const i = this._magnifier;
3005
+ if (i.position == null)
3006
+ return;
3007
+ const r = e.pixelRatio, a = i.size * r, s = 1 / i.factor, n = Math.ceil(s * a);
3008
+ this._readbackTexture.resize(n, n);
3009
+ const { size: o } = e.state, l = r * o[0], h = r * o[1], c = 0.5 * n, d = 0.5 * n, p = et(r * i.position.x, c, l - c - 1), _ = et(h - r * i.position.y, d, h - d - 1);
3010
+ t.setBlendingEnabled(!0);
3011
+ const f = p - c, g = _ - d, y = this._readbackTexture;
3012
+ t.bindTexture(y, 0), t.gl.copyTexImage2D(y.descriptor.target, 0, y.descriptor.pixelFormat, f, g, n, n, 0);
3013
+ const m = this.backgroundColor, M = m ? [m.a * m.r / 255, m.a * m.g / 255, m.a * m.b / 255, m.a] : [1, 1, 1, 1], w = (p + i.offset.x * r) / l * 2 - 1, x = (_ - i.offset.y * r) / h * 2 - 1, b = a / l * 2, T = a / h * 2, S = this._program;
3014
+ t.bindVAO(this._vertexArrayObject), t.bindTexture(this._overlayTexture, 6), t.bindTexture(this._maskTexture, 7), t.useProgram(S), S.setUniform4fv("u_background", M), S.setUniform1i("u_readbackTexture", 0), S.setUniform1i("u_overlayTexture", 6), S.setUniform1i("u_maskTexture", 7), S.setUniform4f("u_drawPos", w, x, b, T), S.setUniform1i("u_maskEnabled", i.maskEnabled ? 1 : 0), S.setUniform1i("u_overlayEnabled", i.overlayEnabled ? 1 : 0), t.setStencilTestEnabled(!1), t.setColorMask(!0, !0, !0, !0), t.drawArrays(ne.TRIANGLE_STRIP, 0, 4), t.bindVAO();
3015
+ }
3016
+ _canRender() {
3017
+ return this.mask && this.overlay && this._magnifier != null;
3018
+ }
3019
+ _reloadResources() {
3020
+ this._resourcesTask && this._resourcesTask.abort();
3021
+ const e = this._magnifier != null ? this._magnifier.maskUrl : null, t = this._magnifier != null ? this._magnifier.overlayUrl : null;
3022
+ this._resourcesTask = pi(async (i) => {
3023
+ const r = e == null || t == null ? Fs(i) : null, a = e != null ? de(e, { responseType: "image", signal: i }).then((l) => l.data) : r.then((l) => l.mask), s = t != null ? de(t, { responseType: "image", signal: i }).then((l) => l.data) : r.then((l) => l.overlay), [n, o] = await Promise.all([a, s]);
3024
+ this.mask = n, this.overlay = o, this._disposeRenderResources(), this.requestRender();
3025
+ });
3026
+ }
3027
+ _disposeRenderResources() {
3028
+ this._readbackTexture = P(this._readbackTexture), this._overlayTexture = P(this._overlayTexture), this._maskTexture = P(this._maskTexture), this._vertexArrayObject = P(this._vertexArrayObject), this._program = P(this._program);
3029
+ }
3030
+ _updateResources(e) {
3031
+ if (e.pixelRatio !== this._resourcePixelRatio && this._disposeRenderResources(), this._readbackTexture)
3032
+ return;
3033
+ const t = e.context;
3034
+ this._resourcePixelRatio = e.pixelRatio;
3035
+ const i = Math.ceil(this._magnifier.size * e.pixelRatio);
3036
+ this._program = Ji(t);
3037
+ const r = new Uint16Array([0, 1, 0, 0, 1, 1, 1, 0]), a = Qi.attributes;
3038
+ this._vertexArrayObject = new je(t, a, Wi, { geometry: Ge.createVertex(t, He.STATIC_DRAW, r) }), this.overlay.width = i, this.overlay.height = i;
3039
+ const s = new R();
3040
+ s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, s.samplingMode = L.NEAREST, s.flipped = !0, s.preMultiplyAlpha = !_i(this.overlay.src) || !e.context.driverTest.svgPremultipliesAlpha.result, this._overlayTexture = new X(t, s, this.overlay), this.mask.width = i, this.mask.height = i, s.pixelFormat = s.internalFormat = C.ALPHA, this._maskTexture = new X(t, s, this.mask);
3041
+ const n = 1 / this._magnifier.factor;
3042
+ s.pixelFormat = s.internalFormat = C.RGBA, s.width = s.height = Math.ceil(n * i), s.samplingMode = L.LINEAR, s.flipped = !1, this._readbackTexture = new X(t, s);
3043
+ }
3044
+ }
3045
+ export {
3046
+ zn as GraphicContainer,
3047
+ En as GraphicsView2D,
3048
+ Pn as LabelManager,
3049
+ Mn as MagnifierView2D,
3050
+ Tn as MapViewNavigation,
3051
+ xn as Stage
3052
+ };