@arcgis/core 5.1.0-next.95 → 5.1.0-next.97
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.
- package/Graphic.d.ts +16 -1
- package/Graphic.js +1 -1
- package/applications/MapViewer/templateUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0175098da590a7109539.js +1 -0
- package/assets/esri/core/workers/chunks/0e6feed31340cf3c1966.js +1 -0
- package/assets/esri/core/workers/chunks/26f28406056ddc0e159c.js +1 -0
- package/assets/esri/core/workers/chunks/27d6ad4ca5ab8c9d62cd.js +1 -0
- package/assets/esri/core/workers/chunks/{23241e6093e245f9c774.js → 2b00229c238aae70b948.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b4c99c7648f37feec00.js → 308e1b0aea941958de44.js} +1 -1
- package/assets/esri/core/workers/chunks/34c11e7c8762fe0c19fb.js +1 -0
- package/assets/esri/core/workers/chunks/34e026549ba2822b8ebd.js +1 -0
- package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +1 -0
- package/assets/esri/core/workers/chunks/40bc7c65b708fcc80fab.js +1 -0
- package/assets/esri/core/workers/chunks/{8de61993e114f453579b.js → 40e887e87ae24ace27a5.js} +1 -1
- package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +1 -0
- package/assets/esri/core/workers/chunks/{5853925d2f7fb550bd2e.js → 44b5e4640fe547285e0c.js} +1 -1
- package/assets/esri/core/workers/chunks/58c15c42e6a618386a2f.js +1 -0
- package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +1 -0
- package/assets/esri/core/workers/chunks/{0f527961805cd45c14e2.js → 708bd77e6d723e3f0aa8.js} +1 -1
- package/assets/esri/core/workers/chunks/7485d59d60d61737d662.js +1 -0
- package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +1 -0
- package/assets/esri/core/workers/chunks/9954928d6430e2bfdb1a.js +1 -0
- package/assets/esri/core/workers/chunks/9a29b7f9e6281ee40c37.js +1 -0
- package/assets/esri/core/workers/chunks/9f4a9b193485f88d4461.js +1 -0
- package/assets/esri/core/workers/chunks/a001e7e8a39f27284d87.js +1 -0
- package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +1 -0
- package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +1 -0
- package/assets/esri/core/workers/chunks/{bf73232057ebc1ecc0ad.js → b06cc59068d32baaaa87.js} +1 -1
- package/assets/esri/core/workers/chunks/b63cbf6c2c9ec1b02b9a.js +1 -0
- package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +1 -0
- package/assets/esri/core/workers/chunks/bfb417d72d0c90e116fe.js +1 -0
- package/assets/esri/core/workers/chunks/c0c693c2e0043ecba4a5.js +1 -0
- package/assets/esri/core/workers/chunks/{fa869bfe4366f7f49cca.js → e5f8c73349407c25956b.js} +1 -1
- package/assets/esri/core/workers/chunks/e8a885b576da3ec145d3.js +1 -0
- package/assets/esri/core/workers/chunks/{bd721bbc7afc75d3bddb.js → eda51e512eff551ad858.js} +1 -1
- package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +1 -0
- package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +1 -0
- package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +1 -0
- package/chunks/GaussianSplat.glsl.js +9 -9
- package/chunks/NativeLine.glsl.js +4 -4
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/SceneLayer.d.ts +59 -32
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/scene/ModelFileInfo.d.ts +6 -2
- package/layers/scene/ModelInfo.d.ts +16 -7
- package/layers/scene/types.d.ts +2 -0
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +25 -2
- package/package.json +1 -1
- package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +5 -4
- package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
- package/rest/query/operations/queryUtils.js +1 -1
- package/rest/support/OutDistance.js +1 -1
- package/rest/support/Query.d.ts +39 -1
- package/rest/support/Query.js +1 -1
- package/support/revision.js +1 -1
- package/tables/AttributeTableTemplate.d.ts +1 -1
- package/tables/elements/AttributeTableGroupElement.d.ts +1 -1
- package/tables/support/tablesUtils.d.ts +2 -2
- package/tables/support/templateUtils.d.ts +136 -0
- package/tables/support/templateUtils.js +2 -0
- package/tables/support/types.d.ts +90 -0
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -19
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +40 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
- package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +52 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +2 -0
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +79 -0
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0ab1384282afc8731857.js +0 -1
- package/assets/esri/core/workers/chunks/130abc6a353e4d79a1b1.js +0 -1
- package/assets/esri/core/workers/chunks/1a68a249540fda9083a9.js +0 -1
- package/assets/esri/core/workers/chunks/1ae016e4f5e39c34a941.js +0 -1
- package/assets/esri/core/workers/chunks/2f6ba01ea8b8f193bea5.js +0 -1
- package/assets/esri/core/workers/chunks/31837f2f8859e2cf2efd.js +0 -1
- package/assets/esri/core/workers/chunks/41e811138c96d85fd3e8.js +0 -1
- package/assets/esri/core/workers/chunks/43b5cfb34b11c4124b51.js +0 -1
- package/assets/esri/core/workers/chunks/44b30dfce12824ee1f33.js +0 -1
- package/assets/esri/core/workers/chunks/4644e1b00fd4e628219d.js +0 -1
- package/assets/esri/core/workers/chunks/5648379d1ed4ca02eedd.js +0 -1
- package/assets/esri/core/workers/chunks/6666cd3bf1a3d175dc8c.js +0 -1
- package/assets/esri/core/workers/chunks/7536f0683e488159d8bd.js +0 -1
- package/assets/esri/core/workers/chunks/8bfe4841c83eb3abfbe8.js +0 -1
- package/assets/esri/core/workers/chunks/a12fd6a445f42326642f.js +0 -1
- package/assets/esri/core/workers/chunks/a8e2fbbfbdf1c3203d5e.js +0 -1
- package/assets/esri/core/workers/chunks/a94674826e5893c9d197.js +0 -1
- package/assets/esri/core/workers/chunks/b2504657d3ef8769005e.js +0 -1
- package/assets/esri/core/workers/chunks/b90db0829da3f96e4a19.js +0 -1
- package/assets/esri/core/workers/chunks/bd9dae2d5ec199f8e9ba.js +0 -1
- package/assets/esri/core/workers/chunks/be19d4a6fb9b1c923127.js +0 -1
- package/assets/esri/core/workers/chunks/c2589e5e0e0f81a378c2.js +0 -1
- package/assets/esri/core/workers/chunks/c33f1f722499a5c6fc11.js +0 -1
- package/assets/esri/core/workers/chunks/e03713dee3205c96d53f.js +0 -1
- package/assets/esri/core/workers/chunks/ead6e4d0a515c0913bee.js +0 -1
- package/assets/esri/core/workers/chunks/f95e3333a65a0c09fd1e.js +0 -1
- package/assets/esri/core/workers/chunks/ffb8fa77297578afef7c.js +0 -1
- package/tables/types.d.ts +0 -18
- package/widgets/FeatureTable/support/templateUtils.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7394,9397],{32488(t,e,i){i.d(e,{A:()=>P});const s=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],r=["آ","أ","إ","ا"],n=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],h=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],m=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],d=["ء","ف"],y=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,x=11,S=12,M=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],w=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],C=[[M,M,M,M,M,M,M,M,M,6,5,6,8,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,5,5,5,6,8,4,4,x,x,x,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,M,M,M,M,M,M,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,9,4,x,x,x,x,4,4,4,4,0,4,4,M,4,4,x,x,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,1,S,1,S,S,1,S,S,1,S,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,x,x,7,9,7,4,4,S,S,S,S,S,S,S,S,S,S,S,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,3,3,3,3,3,3,3,3,3,3,x,3,3,7,7,7,S,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,3,4,S,S,S,S,S,S,7,7,S,S,4,S,S,S,S,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,S,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,S,S,S,S,S,S,S,S,S,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,M,M,M,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,M,M,M,M,M,4,4,4,4,4,M,M,M,M,M,M,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,S,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,x,4,4,_,_,4,4,4,4,4,x,x,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,M],[4,4,4,x,x,x,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,x,x,4,4,4,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class P{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,i){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,i){q=[],Z=[];for(let s=0;s<i;s++)t[s]=s,e[s]=s,q[s]=s}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,i))return t;e=this.inputFormat,i=this.outputFormat;let s=t;const a=J,c=O(e.charAt(1)),f=O(i.charAt(1)),d=(e.startsWith("I")?"L":e.charAt(0))+c,y=(i.startsWith("I")?"L":i.charAt(0))+f,p=e.charAt(2)+i.charAt(2);a.defInFormat=d,a.defOutFormat=y,a.defSwap=p;const g=k(t,d,y,p,a);let _=!1;return"R"===i.charAt(1)?_=!0:"C"!==i.charAt(1)&&"D"!==i.charAt(1)||(_="rtl"===this.checkContextual(g)),this.sourceToTarget=q,this.targetToSource=function(t){const e=new Array(t.length);for(let i=0;i<t.length;i++)e[t[i]]=i;return e}(this.sourceToTarget),Y=this.targetToSource,s=e.charAt(3)===i.charAt(3)?g:"S"===i.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const i=(e=String(e)).split("");let s=0,r=1,a=i.length;t||(s=i.length-1,r=-1,a=1);const c=function(t,e,i,s){let r=0;const a=[];let c=0;for(let f=e;f*i<s;f+=i)if(A(t[f])||H(t[f])){if("ل"===t[f]&&E(t,f+i,i,s)){t[f]=W(t[f+i],0===r?n:o),f+=i,V(t,f,i,s),a[c]=f,c++,r=0;continue}const e=t[f];1===r?t[f]=F(t,f+i,i,s)?$(t[f]):G(t[f],h):!0===F(t,f+i,i,s)?t[f]=G(t[f],u):t[f]=G(t[f],l),H(e)||(r=1),!0===N(e)&&(r=0)}else r=0;return a}(i,s,r,a);let f="";for(let e=0;e<i.length;e++)z(c,c.length,e)>-1?(X(Y,e,!t,-1),q.splice(e,1)):f+=i[e];return f}(_,g):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let i="";const s=(t=String(t)).split("");for(let n=0;n<t.length;n++){let o=!1;if(s[n]>="ﹰ"&&s[n]<"\ufeff"){const a=t.charCodeAt(n);s[n]>="ﻵ"&&s[n]<="ﻼ"?(e?(n>0&&" "===s[n-1]?i=i.slice(0,-1)+"ل":(i+="ل",o=!0),i+=r[(a-65269)/2]):(i+=r[(a-65269)/2],i+="ل",n+1<t.length&&" "===s[n+1]?n++:o=!0),o&&(X(Y,n,!0,1),q.splice(n,0,q[n]))):i+=m[a-65136]}else i+=s[n]}return i}(g,_),this.sourceToTarget=q,this.targetToSource=Y,this.levels=Z,s}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=I(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return it.test(t)}}function k(t,e,i,s,r){const n=function(t,e,i){if(void 0===e.inFormat&&(e.inFormat=i.defInFormat),void 0===e.outFormat&&(e.outFormat=i.defOutFormat),void 0===e.swap&&(e.swap=i.defSwap),e.inFormat===e.outFormat)return e;const s=e.inFormat.slice(0,1),r=e.outFormat.slice(0,1);let n,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(n=I(t),o="ltr"===n||"rtl"===n?n.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=s+o),a.startsWith("C")&&(n=I(t),"rtl"===n?a="RTL":"ltr"===n?(n=function(t){const e=t.split("");return e.reverse(),I(e.join(""))}(t),a=n.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=r+a),e}(t,{inFormat:e,outFormat:i,swap:s},r);if(n.inFormat===n.outFormat)return t;e=n.inFormat,i=n.outFormat,s=n.swap;const o=e.slice(0,1),a=e.slice(1,4),l=i.slice(0,1),h=i.slice(1,4);if(r.inFormat=e,r.outFormat=i,r.swap=s,"L"===o&&"VLTR"===i){if("LTR"===a)return r.dir=Q,T(t,r);if("RTL"===a)return r.dir=tt,T(t,r)}if("V"===o&&"V"===l)return r.dir="RTL"===a?tt:Q,v(t,r);if("L"===o&&"VRTL"===i)return"LTR"===a?(r.dir=Q,t=T(t,r)):(r.dir=tt,t=T(t,r)),v(t);if("VLTR"===e&&"LLTR"===i)return r.dir=Q,T(t,r);if("V"===o&&"L"===l&&a!==h)return t=v(t),"RTL"===a?k(t,"LLTR","VLTR",s,r):k(t,"LRTL","VRTL",s,r);if("VRTL"===e&&"LRTL"===i)return k(t,"LRTL","VRTL",s,r);if("L"===o&&"L"===l){const e=r.swap;return r.swap=e.slice(0,1)+"N","RTL"===a?(r.dir=tt,t=T(t,r),r.swap="N"+e.slice(1,3),r.dir=Q,t=T(t,r)):(r.dir=Q,t=T(t,r),r.swap="N"+e.slice(1,3),t=k(t,"VLTR","LRTL",r.swap,r)),t}return t}function I(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function T(t,e){const i=t.split(""),s=[];return L(i,s,e),function(t,e,i){if(0!==i.hiLevel&&i.swap[0]!==i.swap[1])for(let i=0;i<t.length;i++)1===e[i]&&(t[i]=B(t[i]))}(i,s,e),D(2,i,s,e),D(1,i,s,e),Z=s,i.join("")}function L(t,e,i){const s=t.length,r=i.dir?g:p;let n=0,o=-1;const a=[],l=[];i.hiLevel=i.dir,i.lastArabic=!1,i.hasUbatAl=!1,i.hasUbatB=!1,i.hasUbatS=!1;for(let e=0;e<s;e++)a[e]=R(t[e]);for(let h=0;h<s;h++){const s=n,c=U(t,a,l,h,i);l[h]=c,n=r[s][c];const u=240&n;n&=15;const f=r[n][j];if(e[h]=f,u>0)if(16===u){for(let t=o;t<h;t++)e[t]=1;o=-1}else o=-1;if(r[n][K])-1===o&&(o=h);else if(o>-1){for(let t=o;t<h;t++)e[t]=f;o=-1}5===a[h]&&(e[h]=0),i.hiLevel|=f}i.hasUbatS&&function(t,e,i,s){for(let r=0;r<i;r++)if(6===t[r]){e[r]=s.dir;for(let i=r-1;i>=0&&8===t[i];i--)e[i]=s.dir}}(a,e,s,i)}function R(t){const e=t.charCodeAt(0),i=w[e>>8];return i<100?i:C[i-100][255&e]}function v(t,e){const i=t.split("");if(e){const t=[];L(i,t,e),Z=t}return i.reverse(),q.reverse(),i.join("")}function z(t,e,i){for(let s=0;s<e;s++)if(t[s]===i)return s;return-1}function A(t){for(let e=0;e<d.length;e++)if(t>=d[e]&&t<=y[e])return!0;return!1}function F(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;return!!(e*i<s&&A(t[e]))}function E(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;let n=" ";if(!(e*i<s))return!1;n=t[e];for(let t=0;t<r.length;t++)if(r[t]===n)return!0;return!1}function D(t,e,i,s){if(s.hiLevel<t)return;if(1===t&&s.dir===tt&&!s.hasUbatB)return e.reverse(),void q.reverse();const r=e.length;let n,o,a,l,h,c=0;for(;c<r;){if(i[c]>=t){for(n=c+1;n<r&&i[n]>=t;)n++;for(o=c,a=n-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,h=q[o],q[o]=q[a],q[a]=h;c=n}c++}}function U(t,e,i,s,r){const n=e[s];return{UBAT_L:()=>(r.lastArabic=!1,0),UBAT_R:()=>(r.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>r.lastArabic?3:2,UBAT_AL:()=>(r.lastArabic=!0,r.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,n;return s<1||s+1>=e.length||2!==(t=i[s-1])&&3!==t||2!==(n=e[s+1])&&3!==n?4:(r.lastArabic&&(n=3),n===t?n:4)},UBAT_ES:()=>2===(s>0?i[s-1]:5)&&s+1<e.length&&2===e[s+1]?2:4,UBAT_ET:()=>{if(s>0&&2===i[s-1])return 2;if(r.lastArabic)return 4;let t=s+1;const n=e.length;for(;t<n&&e[t]===x;)t++;return t<n&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===r.inFormat){const i=e.length;let r=s+1;for(;r<i&&e[r]===S;)r++;if(r<i){const i=t[s].charCodeAt(0),n=i>=1425&&i<=2303||64286===i,o=e[r];if(n&&(1===o||7===o))return 1}}return s<1||5===e[s-1]?4:i[s-1]},UBAT_B:()=>(r.lastArabic=!0,r.hasUbatB=!0,r.dir),UBAT_S:()=>(r.hasUbatS=!0,4),UBAT_LRE:()=>(r.lastArabic=!1,4),UBAT_RLE:()=>(r.lastArabic=!1,4),UBAT_LRO:()=>(r.lastArabic=!1,4),UBAT_RLO:()=>(r.lastArabic=!1,4),UBAT_PDF:()=>(r.lastArabic=!1,4),UBAT_BN:()=>4}[b[n]]()}function B(t){let e,i=0,r=s.length-1;for(;i<=r;)if(e=Math.floor((i+r)/2),t<s[e][0])r=e-1;else{if(!(t>s[e][0]))return s[e][1];i=e+1}return t}function N(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function $(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function G(t,e){for(let i=0;i<a.length;i++)if(t===a[i])return e[i];return t}function H(t){return t>="ً"&&t<="ٕ"}function O(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function V(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;return e*i<s&&(t[e]=" ",!0)}function W(t,e){for(let i=0;i<r.length;i++)if(t===r[i])return e[i];return t}function X(t,e,i,s){for(let r=0;r<t.length;r++)(t[r]>e||!i&&t[r]===e)&&(t[r]+=s)}let q=[],Y=[],Z=[];const J={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},j=5,K=6,Q=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,it=/[\u0591-\u06ff\ufb1d-\ufefc]/},56512(t,e,i){function s(t){let e,i,s=[],r=!1;return function(...n){return r&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}(n,s)||(i=t.apply(this,n),e=this,s=n,r=!0),i}}i.d(e,{B:()=>s})},69397(t,e,i){i.d(e,{Qf:()=>l,Qh:()=>o,RS:()=>r,Ul:()=>m,i5:()=>f,lM:()=>n,qK:()=>c});var s=i(34275);const r=16;function n(t){if(!t)return 0;let e=c;for(const i in t)t.hasOwnProperty(i)&&(e+=a(t[i],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return l(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let i=u;for(let s=0;s<e;s++)i+=a(t[s]);return i}(t);let e=c;for(const i in t)t.hasOwnProperty(i)&&(e+=a(t[i]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?o(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return r;case"boolean":return 4;default:return 8}}function l(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,r):0:0),0)}function h(t,e){return u+t.length*e}const c=32,u=16,f=145,m=64},6774(t,e,i){i.d(e,{O3:()=>n,Ox:()=>o,bR:()=>s});class s{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new s(t[0],t[1])}clone(){return new s(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){const t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){const t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){const t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){const i=this.x,s=this.y;return this.x=i*t-s*e,this.y=i*e+s*t,this}rotateReverse(t,e){const i=this.x,s=this.y;return this.x=i*t+s*e,this.y=-i*e+s*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}static add(t,e){return new s(t.x+e.x,t.y+e.y)}static sub(t,e){return new s(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class n{constructor(t,e,i,s=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=r,this._tileSize=512*s,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;const i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new s(t,e),this._firstPt=new s(t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),n=new s(t,e),o=s.distance(this._prevPt,n);let a,l,h,c,u,f,m,d;if(i)this._prevIsIn?this._lineTo(t,e,!0):(a=this._prevPt,l=n,h=this._intersect(l,a),this._start=this._dist+o*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,a=n,h=this._intersect(l,a),this._lineTo(h.x,h.y,!0),this._lineTo(a.x,a.y,!1);else{const t=this._prevPt,e=n;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(c=(this._xmin-t.x)/(e.x-t.x),d=t.y+c*(e.y-t.y),d<=this._ymin?f=!1:d>=this._ymax?f=!0:i.push(new r(c,this._xmin,d))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(c=(this._xmax-t.x)/(e.x-t.x),d=t.y+c*(e.y-t.y),d<=this._ymin?f=!1:d>=this._ymax?f=!0:i.push(new r(c,this._xmax,d))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(c=(this._ymin-t.y)/(e.y-t.y),m=t.x+c*(e.x-t.x),m<=this._xmin?u=!1:m>=this._xmax?u=!0:i.push(new r(c,m,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(c=(this._ymax-t.y)/(e.y-t.y),m=t.x+c*(e.x-t.x),m<=this._xmin?u=!1:m>=this._xmax?u=!0:i.push(new r(c,m,this._ymax))),0===i.length)u?f?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):f?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+o*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+o*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=o,this._prevIsIn=i,this._prevPt=n}close(){if(this._line.length>2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&a.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,e=t.length;if(0===e)return null;const i=[];for(let s=0;s<e;s++)i.push({line:t[s],start:this._starts[s]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,n;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,n=(r-t.y)/(e.y-t.y),i=t.x+n*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,n=(i-t.x)/(e.x-t.x),r=t.y+n*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;const s=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);s<o?(n=s,r=t.y+s*(e.y-t.y)):(n=o,i=t.x+o*(e.x-t.x))}return this._r=n,new s(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3!==this._type?i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e))):(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e)),this._isH=!1,this._isV=!1)}_lineTo(t,e,i){let r,n;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new s(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];const i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,n=this._line[this._line.length-2],n.x===t&&n.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(n=this._line[this._line.length-2],this._isH=n.x===t,this._isV=n.y===e)):(this._isH=n.x===t,this._isV=n.y===e)):(this._line.push(new s(t,e)),this._isH=i,this._isV=o)}else this._line.push(new s(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new s(t*i,e*i))}lineTo(t,e){const i=this._ratio;this._line.push(new s(t*i,e*i))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class a{static simplify(t,e,i){if(!i)return;const s=-e,r=t+e,n=-e,o=t+e,l=[],h=[],c=i.length;for(let t=0;t<c;++t){const e=i[t];if(!e||e.length<2)continue;let a,c=e[0];const u=e.length;for(let i=1;i<u;++i)a=e[i],c.x===a.x&&(c.x<=s&&(c.y>a.y?(l.push(t),l.push(i),l.push(0),l.push(-1)):(h.push(t),h.push(i),h.push(0),h.push(-1))),c.x>=r&&(c.y<a.y?(l.push(t),l.push(i),l.push(1),l.push(-1)):(h.push(t),h.push(i),h.push(1),h.push(-1)))),c.y===a.y&&(c.y<=n&&(c.x<a.x?(l.push(t),l.push(i),l.push(2),l.push(-1)):(h.push(t),h.push(i),h.push(2),h.push(-1))),c.y>=o&&(c.x>a.x?(l.push(t),l.push(i),l.push(3),l.push(-1)):(h.push(t),h.push(i),h.push(3),h.push(-1)))),c=a}if(0===l.length||0===h.length)return;a.fillParent(i,h,l),a.fillParent(i,l,h);const u=[];a.calcDeltas(u,h,l),a.calcDeltas(u,l,h),a.addDeltas(u,i)}static fillParent(t,e,i){const s=i.length,r=e.length;for(let n=0;n<r;n+=4){const r=e[n],o=e[n+1],a=e[n+2],h=t[r][o-1],c=t[r][o];let u=8092,f=-1;for(let e=0;e<s;e+=4){if(i[e+2]!==a)continue;const s=i[e],r=i[e+1],n=t[s][r-1],o=t[s][r];switch(a){case 0:case 1:if(l(h.y,n.y,o.y)&&l(c.y,n.y,o.y)){const t=Math.abs(o.y-n.y);t<u&&(u=t,f=e)}break;case 2:case 3:if(l(h.x,n.x,o.x)&&l(c.x,n.x,o.x)){const t=Math.abs(o.x-n.x);t<u&&(u=t,f=e)}}}e[n+3]=f}}static calcDeltas(t,e,i){const s=e.length;for(let r=0;r<s;r+=4){const s=[],n=a.calcDelta(r,e,i,s);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,s){const r=e[t+3];if(-1===r)return 0;const n=s.length;return n>1&&s[n-2]===r?0:(s.push(r),a.calcDelta(r,i,e,s)+1)}static addDeltas(t,e){const i=t.length;let s=0;for(let e=0;e<i;e+=4){const i=t[e+3];i>s&&(s=i)}for(let r=0;r<i;r+=4){const i=e[t[r]],n=t[r+1],o=s-t[r+3];switch(t[r+2]){case 0:i[n-1].x-=o,i[n].x-=o,1===n&&(i[i.length-1].x-=o),n===i.length-1&&(i[0].x-=o);break;case 1:i[n-1].x+=o,i[n].x+=o,1===n&&(i[i.length-1].x+=o),n===i.length-1&&(i[0].x+=o);break;case 2:i[n-1].y-=o,i[n].y-=o,1===n&&(i[i.length-1].y-=o),n===i.length-1&&(i[0].y-=o);break;case 3:i[n-1].y+=o,i[n].y+=o,1===n&&(i[i.length-1].y+=o),n===i.length-1&&(i[0].y+=o)}}}}const l=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},31411(t,e,i){i.d(e,{GS:()=>C,gh:()=>k});var s=i(49186),r=i(56512),n=i(65864),o=i(4305),a=i(50954),l=i(52006),h=i(49663),c=i(46068),u=i(15507);const f=1e-6,m=[0,0];function d(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:i,maxSegmentsPerCurve:s,minSegmentsPerCurve:r}){const n=i*i,o=e*e,a=1/s,l=this.interpolate(0),h=this.interpolate(1);(0,u.kb)(this.curveStart,l)>f&&t.push(l),this.initialize(l,h);const c=1/r;for(let t=r-1;t>0;t--){const e=t*c;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<a||(0===n||!isFinite(n)||(0,u.kb)(this.arcStart,this.arcEnd)<n)&&(0===o||!isFinite(o)||this.getDeviation2()<o)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,u.kb)(this.curveEnd,h)>f&&t.push([...this.curveEnd]),t}}class p extends y{constructor(t,e){const[i,s,r]=e.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[s,r],this._arcControlPoints=[s,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:i,tStart:s,tEnd:r}=this,[n,o]=this._arcControlPoints,a=(t-s)/(r-s),l=(0,u.RS)([],e,n,a),h=(0,u.RS)(m,n,o,a),c=(0,u.RS)([],o,i,a),f=(0,u.RS)([],l,h,a),d=(0,u.RS)([],h,c,a),y=(0,u.RS)([],f,d,a);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,c]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=l,this._arcControlPoints[1]=f,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:i}=this,[s,r]=this._curveControlPoints;return(0,o.B4)(e,s,r,i,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[i,s]=this._arcControlPoints;return Math.max((0,u.yE)(i,t,e),(0,u.yE)(s,t,e))}}class g extends y{constructor(t,e){const[i]=e.a;super(t,i),this._derivedEllipse=(0,c.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,c.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,u.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function _(t,e,i,{cx:s,cy:r,radius:n,thetaStart:o,thetaEnd:a,isInvalid:l},{maxDeviation:h,maxSegmentLength:c,maxSegmentsPerCurve:m,minSegmentsPerCurve:d}){if(l)return t.push([...i]),t;const y=2*n,p=[s+n*Math.cos(o),r+n*Math.sin(o)],g=[s+n*Math.cos(a),r+n*Math.sin(a)];(0,u.kb)(e,p)>f&&t.push(p);const _=Math.abs(a-o),x=c>0&&c<y?2*Math.asin(c/y):_,S=h>0&&h<=n?2*Math.acos(1-h/n):_,M=Math.min(x,S),b=Math.min(m,Math.max(d,Math.ceil(Math.abs(_/M)))),w=1/b;for(let e=1;e<b;e++){const i=e*w,l=o*(1-i)+a*i;t.push([s+n*Math.cos(l),r+n*Math.sin(l)])}return t.push(g),(0,u.kb)(i,g)>f&&t.push([...i]),t}function x(t,e,i,s){return new p(e,i).densify(t,s)}function S(t,e,i,s){const r=(0,a.pM)(e,i),[n]=i.c;return _(t,e,n,r,s)}function M(t,e,i,s){const r=(0,h.io)(e,i),[n]=i.a;return _(t,e,n,r,s)}function b(t,e,i,s){const[r,n,o,a,l,h,c]=i.a;return 0===h||0===c?(t.push([...r]),t):new g(e,i).densify(t,s)}function w(t,e,i,s){return(0,l.Xq)(i)?(t.push([...i]),t):(0,l.n1)(i)?x(t,e,i,s):(0,l.aO)(i)?S(t,e,i,s):(0,l.DA)(i)?M(t,e,i,s):b(t,e,i,s)}function C(t,e={}){if(!(0,l.Ed)(t))return t;const i=d(e),s=(0,l.FD)(t),r=[];for(const t of s){const e=[];for(let s=0;s<t.length-1;s++){const r=s+1,n=[...(0,l.yP)(t[s])];0===s&&e.push(n),w(e,n,t[r],i)}r.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:r,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:r,spatialReference:t.spatialReference}}const P=(0,r.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function k(t,e,r){const o=new Set(e);return await async function(t,e,r){let n=null;for(const o of t)if(o&&(0,l.Ed)(o)&&null==o.spatialReference.xyTolerance&&(0,l.V8)(o,e)){const t=o.spatialReference;if(!t)throw new s.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=I(t);if(r.has(e))o.spatialReference=r.get(e);else{n||(n=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6312)]).then(i.bind(i,78125)));const a=n.fromSpatialReference(t),l=a?.getTolerance();if(null==l)throw new s.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const h=o.spatialReference.clone();h.read({xyTolerance:l}),o.spatialReference=h,r.set(e,h)}}}(t,o,r),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const i=t.spatialReference.xyTolerance;if(null==i)return t;const s=P(i);return(0,n.rS)(function(t,e,i){if(!(0,l.Ed)(t))return t;const s=new Set(e),r=d(i),n=(0,l.FD)(t),o=[];let a=!1;for(const t of n){const e=[];for(let i=0;i<t.length-1;i++){const n=i+1,o=[...(0,l.yP)(t[i])];0===i&&e.push(o);const h=t[n];(0,l.Xq)(h)?e.push([...h]):(0,l.n1)(h)&&!s.has("cubic-bezier")?x(e,o,h,r):(0,l.aO)(h)&&!s.has("circular-arc")?S(e,o,h,r):(0,l.DA)(h)&&!s.has("elliptic-arc")?M(e,o,h,r):(0,l.wY)(h)&&!s.has("elliptic-arc")?b(e,o,h,r):(e.push((0,l.tk)(h)),a=!0)}o.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...a?{curvePaths:o}:{paths:o}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...a?{curveRings:o}:{rings:o}}}(t,e,s))})}function I(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},92722(t,e,i){i.d(e,{A:()=>r});var s=i(69397);class r{constructor(t=[],e=[],i=!1,s=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=s}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:s}){return new r(t,e,i||!1,s||!1)}static fromRect([t,e,i,s]){const n=i-t,o=s-e;return new r([5],[t,e,n,0,0,o,-n,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const i of this.lengths){if(i<3)continue;const{stride:s}=this;let r=this.coords[s*e],n=this.coords[s*e+1];for(let o=1;o<i;o+=1){const i=s*(e+o),a=this.coords[i],l=this.coords[i+1];t+=-.5*(a-r)*(l+n),r=a,n=l}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:i}=this;for(const s of this.lengths){for(let r=0;r<s;r++){const s=i*(e+r);t(this.coords[s],this.coords[s+1])}e+=s}}deltaDecode(){const t=this.clone(),{coords:e,lengths:i}=t;let s=0;const{stride:r}=this;for(const t of i){for(let i=1;i<t;i++){const t=r*(s+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}s+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:i,size:s}=this,n=this.coords.slice(0,s*i);return t?(t.set(n),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(n),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const i=new Array(e*t);for(let e=0,s=0;e<i.length;e+=t)i[s++]=this.coords[e],i[s++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},92649(t,e,i){i.r(e),i.d(e,{CIMSymbolHelper:()=>ht,CIMSymbolInflatedSizeHelper:()=>lt,capTypeToEnum:()=>ut,forEachSymbolLayer:()=>ct,slsDashToTemplateArray:()=>xt,symbolToCIM:()=>nt});const s=new(i(32488).A);function r(t,e=!0){if(!s.hasBidiChar(t))return[t,!1,{...s}];let i;i="rtl"===s.checkContextual(t)?"IDNNN":"ICNNN";const r=e?"VLYSN":"VLYNN";return[s.bidiTransform(t,i,r),!0,{...s}]}var n=i(4718),o=i(53966),a=i(87811),l=i(90629),h=i(19419),c=i(537),u=i(52006),f=i(31411),m=i(11831),d=i(35833),y=i(98939);i(92602);new Map,new Set,i(44208);var p=i(34727),g=i(93687),_=i(36745),x=i(12359),S=(i(12176),i(60408));class M{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,i,s,r]=t.oldColor,[n,a,l,h]=t.newColor;if(e===n&&i===a&&s===l&&r===h)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&i===o[t+1]&&s===o[t+2]&&r===o[t+3]&&(o[t]=n,o[t+1]=a,o[t+2]=l,o[t+3]=h)}const a=new ImageData(o,i,s);return n.putImageData(a,0,0),r}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const h=new ImageData(new Uint8ClampedArray(a.buffer),i,s);return n.putImageData(h,0,0),r}}var b=i(92580),w=i(28076);function C(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const i=document.createElement("canvas");i.width=t.width,i.height=t.height;const s=i.getContext("2d");return e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0),i}function P(t,e=0){if(0===e)return t;const i=Math.cos(e),s=Math.sin(e),[r,n]=t;return[r*i+n*-s,r*s+n*i]}function k(t,e=0){let i=0;for(let s=0;s<4;s++)i+=t[e+s]*I[s];return i}const I=[1/256,1/65536,1/16777216,1/4294967296];k(new Uint8ClampedArray([255,255,255,255])),k(new Uint8ClampedArray([255,255,255,0])),i(35521);var T=i(76213);const L=()=>o.A.getLogger("esri.symbols.cim.rasterizingUtils");let R;function v(t,e){const{colorRamp:i,gradientType:s}=e,r=z(i),n="CIMFixedColorRamp"===i.type;if("Continuous"===s&&!n)return A(t,r);const o=e.interval??w.D.CIMGradientFill.interval;if(n)return A(t,function(t,e){const i=[],s=(t.length-1)/(e-1);for(let r=0;r<e;r++){const n=t[Math.round(r*s)].color;i.push({offset:r/e,color:n}),i.push({offset:(r+1)/e,color:n})}return i}(r,o));const a=[];R??=document.createElement("canvas"),function(t,e,i,s,r){const n=i+2*r;t.width=n,t.height=s;const o=(r+1)/n,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,n,s);A(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,n,s)}(R,r,o,1,0);const l=R.getContext("2d").getImageData(0,0,o,1).data;for(let t=0,e=0;t<o;t++,e=4*t){const i=[l[e+0],l[e+1],l[e+2],l[e+3]];a.push({offset:t/o,color:i}),a.push({offset:(t+1)/o,color:i})}return A(t,a)}function z(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&L().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const i=t;e.push({offset:0,color:[i.fromColor[0],i.fromColor[1],i.fromColor[2],i.fromColor[3]/255]}),e.push({offset:1,color:[i.toColor[0],i.toColor[1],i.toColor[2],i.toColor[3]/255]});break}case"CIMFixedColorRamp":{const i=t,s=1/(i.colors.length-1);let r=0;for(const t of i.colors)e.push({offset:r,color:[t[0],t[1],t[2],t[3]/255]}),r+=s;break}case"CIMMultipartColorRamp":{const i=t,s=i.weights.reduce((t,e)=>t+e,0);let r=0;for(let t=0;t<i.colorRamps.length;t++){const n=i.colorRamps[t],o=i.weights[t],a=z(n);for(const t of a)e.push({offset:(r+t.offset*o)/s,color:t.color});r+=o}break}default:L().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function A(t,e,i=0){for(const{offset:s,color:r}of e)t.addColorStop(Math.min(Math.max(s,i),1-i),`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${r[3]})`)}class F{constructor(t=0,e=0,i=0,s=0){this.x=t,this.y=e,this.width=i,this.height=s}static fromExtent(t){return new F(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}var E=i(5760);function D(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}class U{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d",{willReadFrequently:!0});B(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:r,weight:n}=e.font;this._lineThroughWidthOffset=r&&"line-through"===r?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?E.y7:0,l=this._computeTextWidth(s,e)+2*a,h=this._lineHeight*this._textLines.length+2*a;if(i.width=l+2*this._lineThroughWidthOffset,i.height=h,0===i.width||0===i.height)return i.width=i.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:i};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=l,this._renderedHeight=h,this._lineThroughWidthOffset*=e.pixelRatio;const c=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=D(u),this._outlineStyle=D(c),this._haloStyle=function(t){return`rgb(${t.slice(0,3).toString()})`}(f);const m=this._renderedLineHeight,d=this._renderedOutlineSize,y=this._renderedHaloSize;s.save(),s.clearRect(0,0,i.width,i.height),B(s,e);const p=a*e.pixelRatio,g=function(t,e,i){return"center"===t?.5*e:"right"===t?e-i:i}(s.textAlign,this._renderedWidth-2*p,this._renderedHaloSize+this._renderedOutlineSize)+p,_=y+d+p,x=y>0;let S=this._lineThroughWidthOffset,M=0;if(o){s.save();const t=e.backgroundColor??[0,0,0,0],r=e.borderLine?.color??[0,0,0,0],n=2*(e.borderLine?.size??0);s.fillStyle=D(t),s.strokeStyle=D(r),s.lineWidth=n,s.fillRect(0,0,i.width,i.height),s.strokeRect(0,0,i.width,i.height),s.restore()}x&&this._renderHalo(s,g,_,S,M,e),d>0&&this._renderOutline(s,g,_,S,M,e),M+=_,S+=g;for(const t of this._textLines)x?(s.globalCompositeOperation="destination-out",s.fillStyle="rgb(0, 0, 0)",s.fillText(t,S,M),s.globalCompositeOperation="source-over",s.fillStyle=this._fillStyle,s.fillText(t,S,M)):(s.fillStyle=this._fillStyle,s.fillText(t,S,M)),r&&"none"!==r&&this._renderDecoration(s,S,M,r,n),M+=m;s.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,w=this._renderedHeight,C=s.getImageData(0,0,b,w),P=new Uint8Array(C.data);if(e.premultiplyColors){let t;for(let e=0;e<P.length;e+=4)t=P[e+3]/255,P[e]=P[e]*t,P[e+1]=P[e+1]*t,P[e+2]=P[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,w],image:new Uint32Array(P.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:i}}_renderHalo(t,e,i,s,r,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),B(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._haloStyle,h.strokeStyle=this._haloStyle,h.lineJoin="round",this._renderOutlineNative(h,e,i,c,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,s,r,o,a),t.globalAlpha=1}_renderOutline(t,e,i,s,r,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),B(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._outlineStyle,h.strokeStyle=this._outlineStyle,h.lineJoin="round",this._renderOutlineNative(h,e,i,c,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(l,0,0,o,a,s,r,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,i,s,r,n){const o=this._renderedLineHeight;for(const a of this._textLines){const l=2*n,h=5,c=.1;for(let n=0;n<h;n++){const o=(1-(h-1)*c+n*c)*l;t.lineWidth=o,t.strokeText(a,e,i),s&&"none"!==s&&this._renderDecoration(t,e,i,s,r,o)}i+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d");B(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const r=this._computeTextWidth(s,e),n=this._lineHeight*this._textLines.length;return i.width=r,i.height=n,[r*e.pixelRatio,n*e.pixelRatio]}_computeTextWidth(t,e){let i=0;for(const e of this._textLines)i=Math.max(i,t.measureText(e).width);const s=e.font;return("italic"===s.style||"oblique"===s.style||"string"==typeof s.weight&&("bold"===s.weight||"bolder"===s.weight)||"number"==typeof s.weight&&s.weight>600)&&(i+=.3*t.measureText("w").width),i+=2*(0,l.Lz)(this._parameters.halo.size),Math.round(i)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,l.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,i,s,r,n){let o=.9*this._lineHeight;const a="bold"===r?.06:"bolder"===r?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===s)switch(o=.9*this._computeLineHeightBase(),l){case"top":i+=o;break;case"middle":i+=o/2}else if("line-through"===s)switch(l){case"top":i+=o/1.5;break;case"middle":i+=o/3}const h=n?1.5*n:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=h,t.moveTo(e-this._lineThroughWidthOffset,i),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,i),t.stroke(),t.restore()}}function B(t,e){const i=Math.max(e.size,.5),s=e.font,r=`${s.style} ${s.weight} ${(0,l.Lz)(i).toFixed(1)}px ${s.family}, sans-serif`;let n;switch(t.font=r,t.textBaseline="top",e.horizontalAlignment){case"left":default:n="left";break;case"right":n="right";break;case"center":n="center"}t.textAlign=n}var N=i(93397),$=i(75434);function G(t){const e=(0,l.PN)(T.GR),i=(0,l.PN)(T.cp);return Math.max(e,Math.min(t||i,i))}i(39829);const H=Math.PI/180,O=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class V{constructor(t){this._t=t}static createIdentity(){return new V([1,0,0,0,1,0])}clone(){const t=this._t;return new V(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new V([t,0,0,0,e,0])}scale(t,e){const i=this._t;return i[0]*=t,i[1]*=t,i[2]*=t,i[3]*=e,i[4]*=e,i[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new V([0,0,t,0,0,e])}translate(t,e){const i=this._t;return i[2]+=t,i[5]+=e,this}static createRotate(t){const e=Math.cos(t),i=Math.sin(t);return new V([e,-i,0,i,e,0])}rotate(t){return V.multiply(this,V.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],i=Math.sqrt(t*t+e*e);return[t/i,e/i]}static multiply(t,e,i){const s=t._t,r=e._t,n=s[0]*r[0]+s[3]*r[1],o=s[1]*r[0]+s[4]*r[1],a=s[2]*r[0]+s[5]*r[1]+r[2],l=s[0]*r[3]+s[3]*r[4],h=s[1]*r[3]+s[4]*r[4],c=s[2]*r[3]+s[5]*r[4]+r[5],u=i._t;return u[0]=n,u[1]=o,u[2]=a,u[3]=l,u[4]=h,u[5]=c,i}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new V([0,0,0,0,0,0]);e=1/e;const i=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,r=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new V([r,n,i,o,a,s])}}class W{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new g.A(()=>new y.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||V.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||V.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const i=e?t.scaleRatio():1;V.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,i){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,i)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const i=t.symbolLayers;if(!i)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(i,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(i,e)}executeEffects(t,e){const i=this.geomUnitsPerPoint(),s=(0,N.ll)(t);let r=new d.kT(_.z.fromJSONCIM(e));for(const n of t){const t=(0,b.A)(n);t&&(r=t.execute(r,n,{geomUnitsPerPoint:i,tileKey:null,maxInflateSize:s,scale:null,spatialReference:e.spatialReference,preventClipping:!1}))}return r}drawSymbolLayers(t,e){let i=t.length;for(;i--;){const s=t[i];if(!s||!1===s.enable)continue;const r=s.effects;if(r&&r.length>0){const t=this.executeEffects(r,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const i=function(t,e,i){let s=(0,N.$w)(t.separation,w.D.CIMHatchFill.separation)*i,r=(0,N.$w)(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=(0,h.vt)();(0,c.Rg)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;r>180;)r-=180;for(;r<0;)r+=180;const u=Math.cos(r*H),f=Math.sin(r*H),m=-s*f,d=s*u;let y,p,g,_;n=(0,N.$w)(t.offsetX)*i*f-(0,N.$w)(t.offsetY)*i*u,y=g=Number.MAX_VALUE,p=_=-Number.MAX_VALUE;for(const t of l){const e=t[0],i=t[1],s=u*e+f*i,r=-f*e+u*i;y=Math.min(y,s),g=Math.min(g,r),p=Math.max(p,s),_=Math.max(_,r)}g=Math.floor(g/s)*s;let x=u*y-f*g-m*n/s,S=f*y+u*g-d*n/s,M=u*p-f*g-m*n/s,b=f*p+u*g-d*n/s;const C=1+Math.round((_-g)/s),P=[];for(let t=0;t<C;t++)x+=m,S+=d,M+=m,b+=d,P.push([[x,S],[M,b]]);return{paths:P}}(e,t,this.geomUnitsPerPoint());i&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,i),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const i=t.markerPlacement;if(i){const s=(0,b.c)(i);if(s){const r="CIMMarkerPlacementInsidePolygon"===i.type||"CIMMarkerPlacementPolygonCenter"===i.type&&i.clipAtBoundary;r&&this.pushClipPath(e);const n=s.execute(_.z.fromJSONCIM(e),i,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}r&&this.popClipPath()}}else{const i=this._placementPool.acquire();if((0,S.fT)(e))i.tx=e.x,i.ty=e.y,this.drawMarker(t,i);else if((0,S.Bi)(e)){const s=(0,x.l8)(e);s&&([i.tx,i.ty]=s,this.drawMarker(t,i))}else if((0,S.Rg)(e)){for(const s of e.paths)for(const e of s)if(i.tx=e[0],i.ty=e[1],this.drawMarker(t,i),this._earlyReturn)break}else for(const s of e.points)if(i.tx=s[0],i.ty=s[1],this.drawMarker(t,i),this._earlyReturn)break;this._placementPool.release(i)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const i=this._resourceManager.getResource(t.url),s=(0,N.$w)(t.size,w.D.CIMPictureMarker.size);if(null==i||s<=0)return;const r=i.width,n=i.height;if(!r||!n)return;const o=r/n,a=(0,N.$w)(t.scaleX,1),l=V.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,i=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,i*=s),l.translate(-e,-i)}let c=(0,N.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*H);let u=(0,N.$w)(t.offsetX),f=(0,N.$w)(t.offsetY);if(u||f){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=u*i+f*e;u=u*e-f*i,f=s}l.translate(u,f)}const m=this.geomUnitsPerPoint();1!==m&&l.scale(m,m);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const i=t.markerGraphics;if(!i)return;const s=(0,N.$w)(t.size,w.D.CIMVectorMarker.size),r=t.frame,n=r?r.ymax-r.ymin:0,o=s&&n?s/n:1,a=V.createIdentity();r&&a.translate(.5*-(r.xmax+r.xmin),.5*-(r.ymax+r.ymin));const l=t.anchorPoint;if(l){let e=l.x,i=l.y;"Absolute"!==t.anchorPointUnits?r&&(e*=r.xmax-r.xmin,i*=r.ymax-r.ymin):(e/=o,i/=o),a.translate(-e,-i)}1!==o&&a.scale(o,o);let h=(0,N.$w)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*H);let c=(0,N.$w)(t.offsetX),u=(0,N.$w)(t.offsetY);if(c||u){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=c*i+u*e;c=c*e-u*i,u=s}a.translate(c,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const m=e.getAngle();m&&a.rotate(m),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const t of i){t?.symbol&&t.geometry||O().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,i){if(!t)return;if(!(0,S.fT)(e))return;if((0,N.$w)(t.height,w.D.CIMTextSymbol.height)<=0)return;const s=V.createIdentity();let r=(0,N.$w)(t.angle);r=-r,r&&s.rotate(r*H);const n=(0,N.$w)(t.offsetX),o=(0,N.$w)(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,i),this.pop()}}class X extends W{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new F(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,h.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,S.Bi)(t))this._processPath(t.rings,0);else if((0,S.Rg)(t))this._processPath(t.paths,0);else if((0,S.ZC)(t)){const e=Z(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,i){if(!t||this._clipCount>0||null==i||i<=0)return;const s=Math.max(.5*this.transformSize((0,N.$w)(i,w.D.CIMSolidStroke.width)),.25);if((0,S.Bi)(t))this._processPath(t.rings,s);else if((0,S.Rg)(t))this._processPath(t.paths,s);else if((0,S.ZC)(t)){const e=Z(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,S.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:i}=t,s=(0,N.$w)(t.scaleX,1);let r=s*e,n=e;const o=this._resourceManager.getResource(i);if(null!=o){const t=o.height/o.width;r=s*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-r/2,-n/2]),0),this._merge(this.transformPt([-r/2,n/2]),0),this._merge(this.transformPt([r/2,-n/2]),0),this._merge(this.transformPt([r/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new U);const i=J(t);let[s,r]=this._textRasterizer.computeTextSize(e,i);s=(0,l.PN)(s),r=(0,l.PN)(r);const n=this.transformSize(1)*this.reverseTransformScalar(1);s*=n,r*=n;const o=t.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,a=t.verticalAlignment??w.D.CIMTextSymbol.verticalalignment;let h=0;switch(o){case"Left":h=s/2;break;case"Right":h=-s/2}let c=0;switch(a){case"Bottom":c=r/2;break;case"Top":c=-r/2;break;case"Baseline":c=r/6}this._merge(this.transformPt([-s/2+h,-r/2+c]),0),this._merge(this.transformPt([-s/2+h,r/2+c]),0),this._merge(this.transformPt([s/2+h,-r/2+c]),0),this._merge(this.transformPt([s/2+h,r/2+c]),0)}_processPath(t,e){if(t)for(const i of t){const t=i?i.length:0;if(t>1){this._merge(this.transformPt(i[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(i[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class q extends W{constructor(t,e,i,s){super(e,i),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new M,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else if((0,S.ZC)(t))this._buildPath(Z(t).rings,!0);else{if(!(0,S.U9)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const i=this._ctx;i.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",i.fill("evenodd")}drawSolidStroke(t,e,i,s,r,n){if(!t||!e||0===i)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,S.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(Z(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(i),.5),this._setCapStyle(s),this._setJoinStyle(r),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,S.ZC)(t))return;this._buildPath(Z(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:i,url:s,tintColor:r}=t,n=(0,N.$w)(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=(0,N.UE)(s)||"src"in o&&(0,N.UE)(o.src);let c="getFrame"in o?C(o):o;i&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,i)),this._applyAdditionalRenderProps&&!h&&r&&(c=this._colorSubstitutionHelper.tintImageData(c,r));const u=this.transformPt([0,0]),[f,m]=this.getTransformAngle(),d=this.transformSize(1),y=this._ctx;y.save(),y.setTransform({m11:n*d*f,m12:n*d*m,m21:-d*m,m22:d*f,m41:u[0],m42:u[1]}),y.drawImage(c,-a/2,-l/2,a,l),y.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new U);const i=J(t,this.transformSize((0,l.PN)(1))),s=this._textRasterizer.rasterizeText(e,i);if(!s)return;const{size:r,anchorX:n,anchorY:o,canvas:a}=s,h=r[0]*(n+.5),c=r[1]*(o-.5),u=this._ctx,f=this.transformPt([0,0]),[m,d]=this.getTransformAngle();u.save(),u.setTransform({m11:1*m,m12:1*d,m21:-1*d,m22:1*m,m41:f[0]-1*h,m42:f[1]+1*c}),u.drawImage(a,0,0),u.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:i,height:s,offsetX:r,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else if((0,S.ZC)(t))this._buildPath(Z(t).rings,!0);else{if(!(0,S.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,f=(0,N.UE)(h)||"src"in c&&(0,N.UE)(c.src);let m,d="getFrame"in c?C(c):c;if(i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),m=u.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),r?r*=t:r=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,i=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==i||0!==r||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(r,n).scaleSelf(i,e,1),m.setTransform(t)}}else m=u.createPattern(d,"repeat");u.save(),u.fillStyle=m,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:r,miterLimit:o,tintColor:a,url:h,width:c}=e;const u=this._resourceManager.getResource(h);if(null==u)return;let f;if((0,S.Bi)(t))f=t.rings;else if((0,S.Rg)(t))f=t.paths;else{if(!(0,S.ZC)(t))return(0,S.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=Z(t).rings}c||(c=u.width);const m=(0,N.UE)(h)||"src"in u&&(0,N.UE)(u.src);let d="getFrame"in u?C(u):u;i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps&&(m||a&&(d=this._colorSubstitutionHelper.tintImageData(d,a)));const y=Math.max(this.transformSize((0,l.Lz)(c)),.5),p=y/d.width,g=this._ctx,_=g.createPattern(d,"repeat-y");let x,M;g.save(),this._setCapStyle(s),this._setJoinStyle(r),void 0!==o&&(g.miterLimit=o),g.lineWidth=y;for(let t of f)if(t=(0,n.o8)(t),j(t),t&&!(t.length<=1)){x=this.transformPt(t[0]);for(let e=1;e<t.length;e++){M=this.transformPt(t[e]);const i=Y(x,M),s=new DOMMatrix;s.translateSelf(0,x[1]-y/2).scaleSelf(p,p,1).rotateSelf(0,0,90-i),_.setTransform(s),g.strokeStyle=_,g.beginPath(),g.moveTo(x[0],x[1]),g.lineTo(M[0],M[1]),g.stroke(),x=M}}g.restore()}drawGradientFill(t,e){if(!t)return;let i;if((0,S.Bi)(t))i=t.rings;else if((0,S.Rg)(t))i=t.paths;else{if(!(0,S.ZC)(t))return void O().error("Unable to draw gradient fill");i=Z(t).rings}this._buildPath(i,!0);const{angle:s,gradientMethod:r,gradientSize:n,gradientSizeUnits:o}=e,a=w.D.CIMGradientFill,c=e.gradientType??a.gradientType,u=-(0,p.kU)(s??0),f=(0,h.Ie)();for(const t of i){const e=t?t.length:0;if(e>1)for(let i=0;i<e;i++){let e=this.transformPt(t[i]);"Linear"!==r&&"Rectangular"!==r||(e=P(e,-u)),(0,h.tK)(f,e)}}const[m,d,y,g]=f,_=this._ctx;switch(_.save(),r){case"Buffered":O().error(`Gradient method "${r}" currently unsupported.`);break;case"Linear":{const t=(d+g)/2,i="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*(y-m),[s,r]="Discrete"===c?[y,y-i]:[m+i,m],h=P([s,t],u),f=P([r,t],u),p=_.createLinearGradient(h[0],h[1],f[0],f[1]);v(p,e),_.fillStyle=p,_.fill("evenodd");break}case"Circular":{const t=(0,h.gX)(f),i=(0,h.ib)(f)/2,s="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*i,[r,u]="Discrete"===c?[i,i-s]:[s,0],m=_.createRadialGradient(t[0],t[1],r,t[0],t[1],u);v(m,e),_.fillStyle=m,_.fill("evenodd");break}case"Rectangular":{const i=(0,h.gX)(f),s=i[0],r=i[1],p=P(i,u),x=(i,s,r,n,o,a,l,h)=>{_.save(),this.pushClipPath(t);const c=P([o,a],u),f=P([l,h],u);_.beginPath(),_.moveTo(p[0],p[1]),_.lineTo(c[0],c[1]),_.lineTo(f[0],f[1]),_.lineTo(p[0],p[1]),_.clip();const m=P([i,s],u),d=P([r,n],u),y=_.createLinearGradient(m[0],m[1],d[0],d[1]);v(y,e),_.fillStyle=y,_.fill("evenodd"),_.restore()};let S="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*((0,h.VL)(f)/2),[M,b]="Discrete"===c?[y,y-S]:[s+S,s];x(M,r,b,r,y,d,y,g),[M,b]="Discrete"===c?[m,m+S]:[s-S,s],x(M,r,b,r,m,g,m,d),S="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*((0,h.uJ)(f)/2);let[w,C]="Discrete"===c?[g,g-S]:[r+S,r];x(s,w,s,C,y,g,m,g),[w,C]="Discrete"===c?[d,d+S]:[r-S,r],x(s,w,s,C,m,d,y,d);break}}_.restore()}drawGradientStroke(t,e){const{capStyle:i,gradientMethod:s,gradientSize:r,gradientSizeUnits:o,joinStyle:a,miterLimit:h,width:c}=e;if(!t||0===c)return;let u;if((0,S.Bi)(t))u=t.rings;else if((0,S.Rg)(t))u=t.paths;else{if(!(0,S.ZC)(t))return void O().error("Unable to draw gradient stroke");u=Z(t).rings}const f=e.gradientType??w.D.CIMGradientStroke.gradientType,m=Math.max(this.transformSize((0,l.Lz)(c)),.5),d=this._ctx;let y,p;d.save(),this._setCapStyle(i),this._setJoinStyle(a),void 0!==h&&(d.miterLimit=h),d.lineWidth=m;for(let t of u){if(t=(0,n.o8)(t),j(t),!t||t.length<=1)continue;let i=0;y=this.transformPt(t[0]);for(let e=1;e<t.length;e++){p=this.transformPt(t[e]);const s=p[0]-y[0],r=p[1]-y[1];i+=Math.sqrt(s*s+r*r),y=p}const a="Absolute"===o?this.transformSize((0,l.Lz)(r)):(0,N.yX)(r,w.D.CIMGradientStroke.gradientSize)*("AcrossLine"===s?m:i);let h=0;y=this.transformPt(t[0]);for(let r=1;r<t.length;r++){p=this.transformPt(t[r]);const n=p[0]-y[0],o=p[1]-y[1],l=Math.sqrt(n*n+o*o);let c,u,g,_;switch(s){case"AcrossLine":{const[t,e]=P([n/l,o/l],-Math.PI/2),i=m/2,s="Discrete"===f?i:a-i;c=(y[0]+p[0])/2+t*s,u=(y[1]+p[1])/2+e*s,g=c-t*a,_=u-e*a;break}case"AlongLine":{const t=n/l,e=o/l;"Discrete"===f?(c=y[0]-t*h,u=y[1]-e*h,g=c+t*a,_=u+e*a):(g=y[0]+t*(i-h),_=y[1]+e*(i-h),c=g-t*a,u=_-e*a);break}default:return O().error("Unrecognized gradient method:",s),void d.restore()}const x=d.createLinearGradient(c,u,g,_);v(x,e),d.strokeStyle=x,d.beginPath(),d.moveTo(y[0],y[1]),d.lineTo(p[0],p[1]),d.stroke(),h+=l,y=p}}d.restore()}_buildPath(t,e){const i=this._ctx;if(i.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let r=this.transformPt(s[0]);i.moveTo(r[0],r[1]);for(let e=1;e<t;e++)r=this.transformPt(s[e]),i.lineTo(r[0],r[1]);e&&i.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function Y(t,e){const i=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,i)}const Z=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function J(t,e=1){const i=(0,N.DW)(t),s=(0,N._d)(t.fontStyleName),r=t.fontFamilyName??"arial-unicode-ms",{weight:n,style:o}=s,a=e*(t.height||5),l=(0,N.Bu)(t.horizontalAlignment),h=(0,N.Nl)(t.verticalAlignment),c=(0,N.pM)(t),u=(0,N.pM)(t.haloSymbol),f=null!=u?e*(t.haloSize??0):0,m=(0,N._1)(t.symbol),d=e*((0,N.xo)(t.symbol)||0),y="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,p=(0,N.pM)(y),g=(0,N.xo)(y),_=(0,N._1)(y);return{color:c,size:a,horizontalAlignment:l,verticalAlignment:h,font:{family:r,style:(0,N.pV)(o),weight:(0,N.Kn)(n),decoration:i},outline:{size:d||0,color:m},halo:{size:f||0,color:u,style:o},backgroundColor:p,borderLine:null!=g&&null!=_?{size:g,color:_}:null,pixelRatio:1,premultiplyColors:!0}}function j(t){let e,i,s,r,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],i=t[a][1]-o[1],r=0!==e?i/e:Math.PI/2,void 0!==s&&Math.abs(r-s)<=1e-4?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=r}var K=i(59868),Q=i(13195);const tt=Math.PI,et=tt/2,it=Math.PI/180,st=96/72,rt=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function nt(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const i=ht.fromSimpleMarker(t);if(!i)throw new Error("InternalError: Cannot convert symbol to CIM");e=i;break}case"picture-marker":e=ht.fromPictureMarker(t);break;case"simple-line":e=ht.fromSimpleLineSymbol(t);break;case"simple-fill":e=ht.fromSimpleFillSymbol(t);break;case"picture-fill":e=ht.fromPictureFillSymbol(t);break;case"text":e=ht.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function ot(t,e,i){switch(e.type){case"CIMSymbolReference":return ot(t,e.symbol,i);case"CIMPointSymbol":null==i&&(i={x:0,y:0}),t.drawSymbol(e,i);break;case"CIMLineSymbol":null==i&&(i={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,i);break;case"CIMPolygonSymbol":null==i&&(i={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,i);break;case"CIMTextSymbol":{const i={x:0,y:0};t.drawSymbol(e,i);break}case"CIMVectorMarker":{const i=new y.W;t.drawMarker(e,i);break}}return t.envelope()}function at(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}class lt{static getSymbolInflateSize(t,e,i,s,r){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,i,s,r):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),i=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+i*i)}static _vectorMarkerBounds(t,e,i,s){let r=!0;const n=(0,h.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(n,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,i,0,s),n[0]+=e[0],n[1]+=e[1],n[2]+=e[2],n[3]+=e[3],r?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],r=!1):(t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])))}return t}static _getInflateSize(t,e,i,s,r){if(function(t){return void 0!==t.symbolLayers}(e)){const n=this._getLayersInflateSize(t,e.symbolLayers,i,s,r),o=(0,N.ll)(e.effects);return o>0&&(n[0]-=o,n[1]-=o,n[2]+=o,n[3]+=o),n}return this._getTextInflatedSize(t,e,r)}static _getLayersInflateSize(t,e,i,s,r){let n=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let i=t.width;null!=i&&("Square"===t.capStyle||"Miter"===t.joinStyle?i/=1.4142135623730951:i/=2,e[0]=-i,e[1]=-i,e[2]=i,e[3]=i);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,i,r),t.frame){const i=(t.frame.xmin+t.frame.xmax)/2,s=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=i,e[1]-=s,e[2]-=i,e[3]-=s,null!=t.size){const i=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=i,e[1]*=i,e[2]*=i,e[3]*=i}}}else if("CIMPictureMarker"===o.type){const s=o,r=i.getResource(s.url);let n=1;if(null!=r&&r.height&&(n=r.width/r.height),null!=t.size){const i=t.size/2,r=t.size*n*(s.scaleX??1)/2;e=[-r,-i,r,i]}}else if(null!=t.size){const i=t.size/2;e=[-i,-i,i,i]}if(t.anchorPoint){let i,s;"Absolute"===t.anchorPointUnits?(i=t.anchorPoint.x,s=t.anchorPoint.y):(i=t.anchorPoint.x*(e[2]-e[0]),s=t.anchorPoint.y*(e[3]-e[1]));const r=1.25*Math.sqrt(i*i+s*s);e[0]-=r,e[1]-=r,e[2]+=r,e[3]+=r}let n=(0,N.$w)(t.rotation);if(t.rotateClockwise&&(n=-n),s&&(n-=s),n){const t=it*n,i=Math.cos(t),s=Math.sin(t),r=(0,h.vt)([Q.MG,Q.MG,-Q.MG,-Q.MG]);(0,h.tK)(r,[e[0]*i-e[1]*s,e[0]*s+e[1]*i]),(0,h.tK)(r,[e[0]*i-e[3]*s,e[0]*s+e[3]*i]),(0,h.tK)(r,[e[2]*i-e[1]*s,e[2]*s+e[1]*i]),(0,h.tK)(r,[e[2]*i-e[3]*s,e[2]*s+e[3]*i]),e=r}let a=(0,N.$w)(t.offsetX),l=(0,N.$w)(t.offsetY);if(s){const t=it*s,e=Math.cos(t),i=Math.sin(t),r=a*i+l*e;a=a*e-l*i,l=r}e[0]+=a,e[1]+=l,e[2]+=a,e[3]+=l;const c=at(t.markerPlacement);c>0&&(e[0]-=c,e[1]-=c,e[2]+=c,e[3]+=c);break}}const a=(0,N.ll)(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),n?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],n=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,i){const s=function(t){return(0,l.PN)(Math.round((0,l.Lz)(t)))}(e.height??w.D.CIMTextSymbol.height);if(t[0]=-s/2,t[1]=-s/2,t[2]=s/2,t[3]=s/2,!i)return t;const r=i.get(e);if(!r)return t;if(!r.glyphMosaicItems.glyphs.length)return t;const{lineGapType:n,lineGap:o}=e,a=n?((t,e,i)=>{switch(t){case"ExtraLeading":return 1+e/i;case"Multiple":return e;case"Exact":return e/i}})(n,o??0,s):0,h=e.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,c=e.verticalAlignment??w.D.CIMTextSymbol.verticalalignment,u="CIMBackgroundCallout"===e.callout?.type,f=(0,$.Tl)(r.glyphMosaicItems,{scale:s/T.eG,angle:(0,N.$w)(e.angle),xOffset:(0,N.$w)(e.offsetX),yOffset:(0,N.$w)(e.offsetY),horizontalAlignment:h,verticalAlignment:c,maxLineWidth:G(e.lineWidth),lineHeight:T.DY*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:u}).boundsT,m=Math.sqrt(f.width*f.width+f.height*f.height);return t[0]-=f.x+m,t[1]-=f.y-m,t[2]+=f.x+m,t[3]+=-f.y+m,t}}class ht{static getEnvelope(t,e,i){if(!t)return null;const s=new X(i);if(Array.isArray(t)){let i;for(const r of t)i?i.union(ot(s,r,e)):i=ot(s,r,e);return i}return ot(s,t,e)}static getTextureInfo(t,e,i,s,r){const n=s??this.getEnvelope(t,null,e);if(!n)return[0,0,0,0,1];const o=Math.max(n.width,n.height)*st;let a=null!=r?Math.max(r/o,1):1;a*=st,n.x*=a,n.y*=a,n.width*=a,n.height*=a,n.width=Math.max(Math.ceil(n.x+n.width)-Math.floor(n.x),1)-1,n.height=Math.max(Math.ceil(n.y+n.height)-Math.floor(n.y),1)-1;let l=n.x+.5*n.width,h=n.y+.5*n.height;return l+=n.x-Math.floor(n.x),h+=n.y-Math.floor(n.y),s||(n.width+=i,n.height+=i,l+=i/2,h+=i/2),[n.width,n.height,l,h,a]}static getTextureAnchor(t,e,i){const[s,r,n,o,a]=this.getTextureInfo(t,e,2,null,i);return[-n/s,-o/r,r/a*st]}static rasterize(t,e,i,s,r=!0,n){const[o,a,l,h,c]=this.getTextureInfo(e,s,2,i,n);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),f=V.createScale(c,-c);f.translate(.5*o-l,.5*a+h);const m=new q(u,s,f);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};m.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new y.W;m.drawMarker(e,t);break}}const d=u.getImageData(0,0,t.width,t.height),p=new Uint8Array(d.data);if(r){let t;for(let e=0;e<p.length;e+=4)t=p[e+3]/255,p[e]=p[e]*t,p[e+1]=p[e+1]*t,p[e+2]=p[e+2]*t}return[p,t.width,t.height,-l/o,-h/a]}static fromTextSymbol(t){const{text:e}=t;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:ht.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:i,width:s,xoffset:r,xscale:n,yoffset:o,yscale:a}=t,l=[],h={type:"CIMPolygonSymbol",symbolLayers:l};if(i){const t=bt(i);t&&l.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,f=(s??0)*(n||1),m=(e??0)*(a||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:c,height:m,width:f,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(o),rotation:(0,N.$w)(-u),colorSubstitutions:null}),h}static fromSimpleFillSymbol(t){const{color:e,style:i,outline:s}=t,r=[],o={type:"CIMPolygonSymbol",symbolLayers:r};if(s){const t=bt(s);t&&r.push(t)}if(i&&"solid"!==i&&"none"!==i&&"esriSFSSolid"!==i&&"esriSFSNull"!==i){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:yt(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let s=0;const o=(0,l.PN)(Mt(i)?8:10);switch(i){case"vertical":case"esriSFSVertical":s=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":s=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":s=45;break;case"cross":case"esriSFSCross":s=0}r.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:s,separation:o}),"cross"===i||"esriSFSCross"===i?r.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==i&&"esriSFSDiagonalCross"!==i||r.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!i||"solid"!==i&&"esriSFSSolid"!==i||r.push({type:"CIMSolidFill",enable:!0,color:yt(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:i,join:s,marker:r,miterLimit:n,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:xt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const h=[];if(r){let t;switch(r.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=ht.fromSimpleMarker(r,a,i).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},h.push(e)}return h.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?yt(i):[0,0,0,0],capStyle:ut(e),joinStyle:ft(s),miterLimit:n,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:h}}static fromPictureMarker(t){const{angle:e,height:i,width:s,xoffset:r,yoffset:n}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:i,width:s,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(n),rotation:(0,N.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:i,font:s,haloColor:n,haloSize:o,horizontalAlignment:a,kerning:l,lineWidth:h,text:c,verticalAlignment:u,xoffset:f,yoffset:m,backgroundColor:d,borderLineColor:y,borderLineSize:p}=t;let g,_,x,S,M,b;s&&(g=s.family,_=s.style,x=s.weight,S=s.size,M=s.decoration);let w=!1;return c&&(w=r(c)[1]),(d||p)&&(b={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(d)},{type:"CIMSolidStroke",enable:!0,color:yt(y),width:p??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:g||"Arial",fontStyleName:pt(_,x),fontType:0,haloSize:o,height:S,hinting:1,horizontalAlignment:mt(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:h,offsetX:(0,N.$w)(f),offsetY:(0,N.$w)(m),strikethrough:"line-through"===M,underline:"underline"===M,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(i)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(n)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:w?1:0,verticalAlignment:dt(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:b}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:i,width:s,xoffset:r,yoffset:n}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:i,width:s,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(n),rotation:(0,N.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:i,xoffset:s,yoffset:r,url:n}=t;return n?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:n,width:e,height:i,offsetX:(0,N.$w)(s),offsetY:(0,N.$w)(r),rotation:0}}:null}static fromSimpleMarker(t,e,i){const{style:s}=t,r=t.color??i;if("path"===s||"esriSMSPath"===s){const e=[];if("outline"in t&&t.outline){const i=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:i.width,color:yt(i.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:yt(r),path:t.path});const[i,s]=St("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,N.$w)(t.angle),size:(0,N.$w)(t.size||6),offsetX:(0,N.$w)(t.xoffset),offsetY:(0,N.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:i,markerGraphics:[{type:"CIMMarkerGraphic",geometry:s,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const n=[];let o,a,l=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,i="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=i?St(s,t.size):St(s);const r=e.width??K.A7.width;if(i){const e=r/t.size,i=(o.xmax-o.xmin)*e/2,s=(o.ymax-o.ymin)*e/2;o.xmin-=i,o.xmax+=i,o.ymin-=s,o.ymax+=s,l&&(l+=r)}const h="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",c=i?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:xt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:h,controlPointEnding:"FullPattern"}]:void 0;n.push({type:"CIMSolidStroke",capStyle:i?"Round":"Butt",enable:!0,width:r,color:yt(e.color),effects:c})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=St(s):([o,a]=St(s),n.push({type:"CIMSolidStroke",enable:!0,width:e,color:yt(r)}));n.push({type:"CIMSolidFill",enable:!0,color:yt(r)});const h={type:"CIMPolygonSymbol",symbolLayers:n};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,N.$w)(-t.angle),size:(0,N.$w)(l||6*e),offsetX:(0,N.$w)(t.xoffset),offsetY:(0,N.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:h}]}]}}static fromCIMHatchFill(t,e){const i=e*(t.separation??w.D.CIMHatchFill.separation),s=i/2,r=(0,n.o8)(t.lineSymbol);r.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const i=t.dashTemplate;t.dashTemplate=i?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const i=t.markerPlacement;null!=i&&"placementTemplate"in i&&(i.placementTemplate=i.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(r)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-s,ymax:s},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:r}],size:i}}static async normalizeSymbolAndFetchResources(t,e,i=null){if(!t)return;const s=[];if("effects"in t&&t.effects)for(const e of t.effects)s.push((0,d.ai)(e));async function r(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:i,fontStyleName:s}=t;if("calcitewebcoreicons"===i?.toLowerCase())return;const{style:r,weight:n}=(0,N._d)(s),o=(0,N.DW)(t),a=new m.A({family:i,style:r,weight:n,decoration:o});try{await e.loadFont(a)}catch{rt().error(`Unsupported font ${i} in CIM symbol`)}}s.push(r(t)),ct(t,t=>{if(t.effects)for(const e of t.effects)s.push((0,d.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,u.Ed)(e.geometry)&&(e.geometry=(0,f.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&s.push((0,d.g1)(t.markerPlacement))}"url"in t&&t.url&&s.push(e.fetchResource(t.url,{signal:i})),"symbol"in t&&s.push(r(t.symbol))}),await Promise.all(s)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const i of t)e+=i;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:rt().error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const i of e)t+=+i;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,i={...t};i.markerPlacement=null,i.anchorPoint=null;const s=Math.abs(e.stepX),r=Math.abs(e.stepY),n=(e.randomness??100)/100;let o,h,c,u;if("Random"===e.gridType){const t=(0,l.PN)(T.yv),i=Math.max(Math.floor(t/s),1),f=Math.max(Math.floor(t/r),1);o=i*s/2,h=f*r/2,c=2*h;const m=new a.A(e.seed),d=n*s/1.5,y=n*r/1.5;u=[];for(let t=0;t<i;t++)for(let e=0;e<f;e++){const i=t*s-o+d*(.5-m.getFloat()),n=e*r-h+y*(.5-m.getFloat());u.push({x:i,y:n}),0===t&&u.push({x:i+2*o,y:n}),0===e&&u.push({x:i,y:n+2*h})}}else!0===e.shiftOddRows?(o=s/2,h=r,c=2*r,u=[{x:-o,y:0},{x:o,y:0},{x:0,y:h},{x:0,y:-h}]):(o=s/2,h=r/2,c=r,u=[{x:-s,y:0},{x:0,y:-r},{x:-s,y:-r},{x:0,y:0},{x:s,y:0},{x:0,y:r},{x:s,y:r},{x:-s,y:r},{x:s,y:-r}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-o,xmax:o,ymin:-h,ymax:h},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[i]}})),size:c}}}function ct(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const i=t.symbolLayers;if(!i)return;for(const t of i)if(e(t),"CIMVectorMarker"===t.type){const i=t.markerGraphics;if(!i)continue;for(const t of i)if(t){const i=t.symbol;i&&ct(i,e)}}break}}}const ut=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},ft=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},mt=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},dt=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},yt=t=>{if(!t)return[0,0,0,0];const{r:e,g:i,b:s,a:r}=t;return[e,i,s,255*r]},pt=(t,e)=>{const i=gt(e),s=_t(t);return i&&s?`${i}-${s}`:`${i}${s}`},gt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},_t=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},xt=(t,e)=>{const i=.001,s="butt"===e;switch(t){case"dash":case"esriSLSDash":return s?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return s?[4,3,1,3]:[3,4,i,4];case"dot":case"esriSLSDot":return s?[1,3]:[i,4];case"long-dash":case"esriSLSLongDash":return s?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return s?[8,3,1,3]:[7,4,i,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return s?[8,3,1,3,1,3]:[7,4,i,4,i,4];case"short-dash":case"esriSLSShortDash":return s?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return s?[4,1,1,1]:[3,2,i,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return s?[4,1,1,1,1,1]:[3,2,i,2,i,2];case"short-dot":case"esriSLSShortDot":return s?[1,1]:[i,2];case"solid":case"esriSLSSolid":case"none":return rt().error("Unexpected: style does not require rasterization"),[0,0];default:return rt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},St=(t,e=100)=>{const i=e/2;let s,r;const n=t;if("circle"===n||"esriSMSCircle"===n){const t=.25;let e=Math.acos(1-t/i),n=Math.ceil(tt/e/4);0===n&&(n=1),e=et/n,n*=4;const o=[];o.push([i,0]);for(let t=1;t<n;t++)o.push([i*Math.cos(t*e),-i*Math.sin(t*e)]);o.push([i,0]),s={rings:[o]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("cross"===n||"esriSMSCross"===n){const t=0;s={paths:[[[t,i],[t,-i]],[[i,t],[-i,t]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("diamond"===n||"esriSMSDiamond"===n)s={rings:[[[-i,0],[0,i],[i,0],[0,-i],[-i,0]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("square"===n||"esriSMSSquare"===n)s={rings:[[[-i,-i],[-i,i],[i,i],[i,-i],[-i,-i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("x"===n||"esriSMSX"===n)s={paths:[[[i,i],[-i,-i]],[[i,-i],[-i,i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("triangle"===n||"esriSMSTriangle"===n){const t=.5773502691896257*e,i=-t,n=2/3*e,o=n-e;s={rings:[[[i,o],[0,n],[t,o],[i,o]]]},r={xmin:i,ymin:o,xmax:t,ymax:n}}else"arrow"===n&&(s={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i});return[r,s]},Mt=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function bt(t){if(!t)return null;let e=null;const{cap:i,color:s,join:r,miterLimit:n,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:xt(o,i),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?yt(s):[0,0,0,0],capStyle:ut(i),joinStyle:ft(r),miterLimit:n,width:a,effects:e}}},13195(t,e,i){i.d(e,{GW:()=>p,IU:()=>g,Jo:()=>o,MG:()=>n,Wh:()=>f,aA:()=>h,cP:()=>S,os:()=>c,p6:()=>y,pJ:()=>a,ru:()=>x,s3:()=>_,wV:()=>d,yM:()=>M,z0:()=>m});var s=i(95108),r=i(6774);const n=Number.POSITIVE_INFINITY,o=Math.PI,a=2*o,l=128/o,h=256/360,c=o/180,u=1/Math.LN2;function f(t,e){return(t%=e)>=0?t:t+e}function m(t){return f(t*l,256)}function d(t){return f(t*h,256)}function y(t){return Math.log(t)*u}function p(t,e,i){return t*(1-i)+e*i}function g(t){return 8+Math.max(16*(t-14),0)}function _(t,e,i){let s,r,n,o=0;for(const a of i){s=a.length;for(let i=1;i<s;++i)r=a[i-1],n=a[i],r.y>e!=n.y>e&&((n.x-r.x)*(e-r.y)-(n.y-r.y)*(t-r.x)>0?o++:o--)}return 0!==o}function x(t,e,i,r){let n,o,a,l;const h=r*r;for(const r of i){const i=r.length;if(!(i<2)){n=r[0].x,o=r[0].y;for(let c=1;c<i;++c){if(a=r[c].x,l=r[c].y,(0,s.Ng)(t,e,n,o,a,l)<h)return!0;n=a,o=l}}}return!1}function S(t,e){if(0===e||Number.isNaN(e))return t;const i=[],s=new r.bR(0,0),n=new r.bR(0,0),o=new r.bR(0,0);for(let a=0;a<t.length;a++){const l=t[a],h=[];for(let t=0;t<l.length;t++){const i=l[t-1],a=l[t],c=l[t+1];0===t?s.setCoords(0,0):s.assignSub(a,i).normalize().rightPerpendicular(),t===l.length-1?n.setCoords(0,0):n.assignSub(c,a).normalize().rightPerpendicular(),o.assignAdd(s,n).normalize();const u=o.x*n.x+o.y*n.y;0!==u&&o.scale(1/u),h.push(r.bR.add(a,o.scale(e)))}i.push(h)}return i}function M(t,e,i,s){const n=new r.bR(t[0],t[1]);if(n.scale(s),"viewport"===e){const t=-i*(Math.PI/180),e=Math.cos(t),s=Math.sin(t);n.rotate(e,s)}return n}},76213(t,e,i){i.d(e,{C2:()=>a,CQ:()=>s,DY:()=>r,GR:()=>g,Gh:()=>h,MZ:()=>m,Rm:()=>o,TB:()=>p,U5:()=>l,_M:()=>c,cp:()=>_,eG:()=>n,fq:()=>d,hM:()=>f,ie:()=>u,yv:()=>y});const s=512,r=29,n=24,o=3,a=4,l=6,h=1.05,c=3,u=3,f=4,m=1,d=10,y=1024,p=256,g=32,_=512}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7394,9397],{32488(t,e,i){i.d(e,{A:()=>P});const s=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],r=["آ","أ","إ","ا"],n=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],h=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],m=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],d=["ء","ف"],y=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,x=11,S=12,M=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],w=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],C=[[M,M,M,M,M,M,M,M,M,6,5,6,8,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,5,5,5,6,8,4,4,x,x,x,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,M,M,M,M,M,M,5,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,9,4,x,x,x,x,4,4,4,4,0,4,4,M,4,4,x,x,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,1,S,1,S,S,1,S,S,1,S,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,x,x,7,9,7,4,4,S,S,S,S,S,S,S,S,S,S,S,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,3,3,3,3,3,3,3,3,3,3,x,3,3,7,7,7,S,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,3,4,S,S,S,S,S,S,7,7,S,S,4,S,S,S,S,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,S,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,S,S,S,S,S,S,S,S,S,S,S,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,S,S,S,S,S,S,S,S,S,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,M,M,M,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,M,M,M,M,M,4,4,4,4,4,M,M,M,M,M,M,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,S,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,S,S,S,S,S,S,S,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,x,4,4,_,_,4,4,4,4,4,x,x,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,M],[4,4,4,x,x,x,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,x,x,4,4,4,x,x,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class P{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,i){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,i){q=[],Z=[];for(let s=0;s<i;s++)t[s]=s,e[s]=s,q[s]=s}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,i))return t;e=this.inputFormat,i=this.outputFormat;let s=t;const a=J,c=O(e.charAt(1)),f=O(i.charAt(1)),d=(e.startsWith("I")?"L":e.charAt(0))+c,y=(i.startsWith("I")?"L":i.charAt(0))+f,p=e.charAt(2)+i.charAt(2);a.defInFormat=d,a.defOutFormat=y,a.defSwap=p;const g=k(t,d,y,p,a);let _=!1;return"R"===i.charAt(1)?_=!0:"C"!==i.charAt(1)&&"D"!==i.charAt(1)||(_="rtl"===this.checkContextual(g)),this.sourceToTarget=q,this.targetToSource=function(t){const e=new Array(t.length);for(let i=0;i<t.length;i++)e[t[i]]=i;return e}(this.sourceToTarget),Y=this.targetToSource,s=e.charAt(3)===i.charAt(3)?g:"S"===i.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const i=(e=String(e)).split("");let s=0,r=1,a=i.length;t||(s=i.length-1,r=-1,a=1);const c=function(t,e,i,s){let r=0;const a=[];let c=0;for(let f=e;f*i<s;f+=i)if(A(t[f])||H(t[f])){if("ل"===t[f]&&E(t,f+i,i,s)){t[f]=W(t[f+i],0===r?n:o),f+=i,V(t,f,i,s),a[c]=f,c++,r=0;continue}const e=t[f];1===r?t[f]=F(t,f+i,i,s)?$(t[f]):G(t[f],h):!0===F(t,f+i,i,s)?t[f]=G(t[f],u):t[f]=G(t[f],l),H(e)||(r=1),!0===N(e)&&(r=0)}else r=0;return a}(i,s,r,a);let f="";for(let e=0;e<i.length;e++)z(c,c.length,e)>-1?(X(Y,e,!t,-1),q.splice(e,1)):f+=i[e];return f}(_,g):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let i="";const s=(t=String(t)).split("");for(let n=0;n<t.length;n++){let o=!1;if(s[n]>="ﹰ"&&s[n]<"\ufeff"){const a=t.charCodeAt(n);s[n]>="ﻵ"&&s[n]<="ﻼ"?(e?(n>0&&" "===s[n-1]?i=i.slice(0,-1)+"ل":(i+="ل",o=!0),i+=r[(a-65269)/2]):(i+=r[(a-65269)/2],i+="ل",n+1<t.length&&" "===s[n+1]?n++:o=!0),o&&(X(Y,n,!0,1),q.splice(n,0,q[n]))):i+=m[a-65136]}else i+=s[n]}return i}(g,_),this.sourceToTarget=q,this.targetToSource=Y,this.levels=Z,s}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=I(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return it.test(t)}}function k(t,e,i,s,r){const n=function(t,e,i){if(void 0===e.inFormat&&(e.inFormat=i.defInFormat),void 0===e.outFormat&&(e.outFormat=i.defOutFormat),void 0===e.swap&&(e.swap=i.defSwap),e.inFormat===e.outFormat)return e;const s=e.inFormat.slice(0,1),r=e.outFormat.slice(0,1);let n,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(n=I(t),o="ltr"===n||"rtl"===n?n.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=s+o),a.startsWith("C")&&(n=I(t),"rtl"===n?a="RTL":"ltr"===n?(n=function(t){const e=t.split("");return e.reverse(),I(e.join(""))}(t),a=n.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=r+a),e}(t,{inFormat:e,outFormat:i,swap:s},r);if(n.inFormat===n.outFormat)return t;e=n.inFormat,i=n.outFormat,s=n.swap;const o=e.slice(0,1),a=e.slice(1,4),l=i.slice(0,1),h=i.slice(1,4);if(r.inFormat=e,r.outFormat=i,r.swap=s,"L"===o&&"VLTR"===i){if("LTR"===a)return r.dir=Q,T(t,r);if("RTL"===a)return r.dir=tt,T(t,r)}if("V"===o&&"V"===l)return r.dir="RTL"===a?tt:Q,v(t,r);if("L"===o&&"VRTL"===i)return"LTR"===a?(r.dir=Q,t=T(t,r)):(r.dir=tt,t=T(t,r)),v(t);if("VLTR"===e&&"LLTR"===i)return r.dir=Q,T(t,r);if("V"===o&&"L"===l&&a!==h)return t=v(t),"RTL"===a?k(t,"LLTR","VLTR",s,r):k(t,"LRTL","VRTL",s,r);if("VRTL"===e&&"LRTL"===i)return k(t,"LRTL","VRTL",s,r);if("L"===o&&"L"===l){const e=r.swap;return r.swap=e.slice(0,1)+"N","RTL"===a?(r.dir=tt,t=T(t,r),r.swap="N"+e.slice(1,3),r.dir=Q,t=T(t,r)):(r.dir=Q,t=T(t,r),r.swap="N"+e.slice(1,3),t=k(t,"VLTR","LRTL",r.swap,r)),t}return t}function I(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function T(t,e){const i=t.split(""),s=[];return L(i,s,e),function(t,e,i){if(0!==i.hiLevel&&i.swap[0]!==i.swap[1])for(let i=0;i<t.length;i++)1===e[i]&&(t[i]=B(t[i]))}(i,s,e),D(2,i,s,e),D(1,i,s,e),Z=s,i.join("")}function L(t,e,i){const s=t.length,r=i.dir?g:p;let n=0,o=-1;const a=[],l=[];i.hiLevel=i.dir,i.lastArabic=!1,i.hasUbatAl=!1,i.hasUbatB=!1,i.hasUbatS=!1;for(let e=0;e<s;e++)a[e]=R(t[e]);for(let h=0;h<s;h++){const s=n,c=U(t,a,l,h,i);l[h]=c,n=r[s][c];const u=240&n;n&=15;const f=r[n][j];if(e[h]=f,u>0)if(16===u){for(let t=o;t<h;t++)e[t]=1;o=-1}else o=-1;if(r[n][K])-1===o&&(o=h);else if(o>-1){for(let t=o;t<h;t++)e[t]=f;o=-1}5===a[h]&&(e[h]=0),i.hiLevel|=f}i.hasUbatS&&function(t,e,i,s){for(let r=0;r<i;r++)if(6===t[r]){e[r]=s.dir;for(let i=r-1;i>=0&&8===t[i];i--)e[i]=s.dir}}(a,e,s,i)}function R(t){const e=t.charCodeAt(0),i=w[e>>8];return i<100?i:C[i-100][255&e]}function v(t,e){const i=t.split("");if(e){const t=[];L(i,t,e),Z=t}return i.reverse(),q.reverse(),i.join("")}function z(t,e,i){for(let s=0;s<e;s++)if(t[s]===i)return s;return-1}function A(t){for(let e=0;e<d.length;e++)if(t>=d[e]&&t<=y[e])return!0;return!1}function F(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;return!!(e*i<s&&A(t[e]))}function E(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;let n=" ";if(!(e*i<s))return!1;n=t[e];for(let t=0;t<r.length;t++)if(r[t]===n)return!0;return!1}function D(t,e,i,s){if(s.hiLevel<t)return;if(1===t&&s.dir===tt&&!s.hasUbatB)return e.reverse(),void q.reverse();const r=e.length;let n,o,a,l,h,c=0;for(;c<r;){if(i[c]>=t){for(n=c+1;n<r&&i[n]>=t;)n++;for(o=c,a=n-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,h=q[o],q[o]=q[a],q[a]=h;c=n}c++}}function U(t,e,i,s,r){const n=e[s];return{UBAT_L:()=>(r.lastArabic=!1,0),UBAT_R:()=>(r.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>r.lastArabic?3:2,UBAT_AL:()=>(r.lastArabic=!0,r.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,n;return s<1||s+1>=e.length||2!==(t=i[s-1])&&3!==t||2!==(n=e[s+1])&&3!==n?4:(r.lastArabic&&(n=3),n===t?n:4)},UBAT_ES:()=>2===(s>0?i[s-1]:5)&&s+1<e.length&&2===e[s+1]?2:4,UBAT_ET:()=>{if(s>0&&2===i[s-1])return 2;if(r.lastArabic)return 4;let t=s+1;const n=e.length;for(;t<n&&e[t]===x;)t++;return t<n&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===r.inFormat){const i=e.length;let r=s+1;for(;r<i&&e[r]===S;)r++;if(r<i){const i=t[s].charCodeAt(0),n=i>=1425&&i<=2303||64286===i,o=e[r];if(n&&(1===o||7===o))return 1}}return s<1||5===e[s-1]?4:i[s-1]},UBAT_B:()=>(r.lastArabic=!0,r.hasUbatB=!0,r.dir),UBAT_S:()=>(r.hasUbatS=!0,4),UBAT_LRE:()=>(r.lastArabic=!1,4),UBAT_RLE:()=>(r.lastArabic=!1,4),UBAT_LRO:()=>(r.lastArabic=!1,4),UBAT_RLO:()=>(r.lastArabic=!1,4),UBAT_PDF:()=>(r.lastArabic=!1,4),UBAT_BN:()=>4}[b[n]]()}function B(t){let e,i=0,r=s.length-1;for(;i<=r;)if(e=Math.floor((i+r)/2),t<s[e][0])r=e-1;else{if(!(t>s[e][0]))return s[e][1];i=e+1}return t}function N(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function $(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function G(t,e){for(let i=0;i<a.length;i++)if(t===a[i])return e[i];return t}function H(t){return t>="ً"&&t<="ٕ"}function O(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function V(t,e,i,s){for(;e*i<s&&H(t[e]);)e+=i;return e*i<s&&(t[e]=" ",!0)}function W(t,e){for(let i=0;i<r.length;i++)if(t===r[i])return e[i];return t}function X(t,e,i,s){for(let r=0;r<t.length;r++)(t[r]>e||!i&&t[r]===e)&&(t[r]+=s)}let q=[],Y=[],Z=[];const J={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},j=5,K=6,Q=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,it=/[\u0591-\u06ff\ufb1d-\ufefc]/},56512(t,e,i){function s(t){let e,i,s=[],r=!1;return function(...n){return r&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}(n,s)||(i=t.apply(this,n),e=this,s=n,r=!0),i}}i.d(e,{B:()=>s})},69397(t,e,i){i.d(e,{Qf:()=>l,Qh:()=>o,RS:()=>r,Ul:()=>m,i5:()=>f,lM:()=>n,qK:()=>c});var s=i(34275);const r=16;function n(t){if(!t)return 0;let e=c;for(const i in t)t.hasOwnProperty(i)&&(e+=a(t[i],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return l(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let i=u;for(let s=0;s<e;s++)i+=a(t[s]);return i}(t);let e=c;for(const i in t)t.hasOwnProperty(i)&&(e+=a(t[i]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?o(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return r;case"boolean":return 4;default:return 8}}function l(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,r):0:0),0)}function h(t,e){return u+t.length*e}const c=32,u=16,f=145,m=64},6774(t,e,i){i.d(e,{O3:()=>n,Ox:()=>o,bR:()=>s});class s{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new s(t[0],t[1])}clone(){return new s(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){const t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){const t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){const t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){const i=this.x,s=this.y;return this.x=i*t-s*e,this.y=i*e+s*t,this}rotateReverse(t,e){const i=this.x,s=this.y;return this.x=i*t+s*e,this.y=-i*e+s*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}static add(t,e){return new s(t.x+e.x,t.y+e.y)}static sub(t,e){return new s(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class n{constructor(t,e,i,s=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=r,this._tileSize=512*s,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;const i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new s(t,e),this._firstPt=new s(t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),n=new s(t,e),o=s.distance(this._prevPt,n);let a,l,h,c,u,f,m,d;if(i)this._prevIsIn?this._lineTo(t,e,!0):(a=this._prevPt,l=n,h=this._intersect(l,a),this._start=this._dist+o*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,a=n,h=this._intersect(l,a),this._lineTo(h.x,h.y,!0),this._lineTo(a.x,a.y,!1);else{const t=this._prevPt,e=n;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(c=(this._xmin-t.x)/(e.x-t.x),d=t.y+c*(e.y-t.y),d<=this._ymin?f=!1:d>=this._ymax?f=!0:i.push(new r(c,this._xmin,d))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(c=(this._xmax-t.x)/(e.x-t.x),d=t.y+c*(e.y-t.y),d<=this._ymin?f=!1:d>=this._ymax?f=!0:i.push(new r(c,this._xmax,d))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(c=(this._ymin-t.y)/(e.y-t.y),m=t.x+c*(e.x-t.x),m<=this._xmin?u=!1:m>=this._xmax?u=!0:i.push(new r(c,m,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(c=(this._ymax-t.y)/(e.y-t.y),m=t.x+c*(e.x-t.x),m<=this._xmin?u=!1:m>=this._xmax?u=!0:i.push(new r(c,m,this._ymax))),0===i.length)u?f?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):f?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+o*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+o*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=o,this._prevIsIn=i,this._prevPt=n}close(){if(this._line.length>2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&a.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,e=t.length;if(0===e)return null;const i=[];for(let s=0;s<e;s++)i.push({line:t[s],start:this._starts[s]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,n;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,n=(r-t.y)/(e.y-t.y),i=t.x+n*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,n=(i-t.x)/(e.x-t.x),r=t.y+n*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;const s=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);s<o?(n=s,r=t.y+s*(e.y-t.y)):(n=o,i=t.x+o*(e.x-t.x))}return this._r=n,new s(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3!==this._type?i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e))):(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new s(t,e)),this._isH=!1,this._isV=!1)}_lineTo(t,e,i){let r,n;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new s(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];const i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,n=this._line[this._line.length-2],n.x===t&&n.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(n=this._line[this._line.length-2],this._isH=n.x===t,this._isV=n.y===e)):(this._isH=n.x===t,this._isV=n.y===e)):(this._line.push(new s(t,e)),this._isH=i,this._isV=o)}else this._line.push(new s(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new s(t*i,e*i))}lineTo(t,e){const i=this._ratio;this._line.push(new s(t*i,e*i))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class a{static simplify(t,e,i){if(!i)return;const s=-e,r=t+e,n=-e,o=t+e,l=[],h=[],c=i.length;for(let t=0;t<c;++t){const e=i[t];if(!e||e.length<2)continue;let a,c=e[0];const u=e.length;for(let i=1;i<u;++i)a=e[i],c.x===a.x&&(c.x<=s&&(c.y>a.y?(l.push(t),l.push(i),l.push(0),l.push(-1)):(h.push(t),h.push(i),h.push(0),h.push(-1))),c.x>=r&&(c.y<a.y?(l.push(t),l.push(i),l.push(1),l.push(-1)):(h.push(t),h.push(i),h.push(1),h.push(-1)))),c.y===a.y&&(c.y<=n&&(c.x<a.x?(l.push(t),l.push(i),l.push(2),l.push(-1)):(h.push(t),h.push(i),h.push(2),h.push(-1))),c.y>=o&&(c.x>a.x?(l.push(t),l.push(i),l.push(3),l.push(-1)):(h.push(t),h.push(i),h.push(3),h.push(-1)))),c=a}if(0===l.length||0===h.length)return;a.fillParent(i,h,l),a.fillParent(i,l,h);const u=[];a.calcDeltas(u,h,l),a.calcDeltas(u,l,h),a.addDeltas(u,i)}static fillParent(t,e,i){const s=i.length,r=e.length;for(let n=0;n<r;n+=4){const r=e[n],o=e[n+1],a=e[n+2],h=t[r][o-1],c=t[r][o];let u=8092,f=-1;for(let e=0;e<s;e+=4){if(i[e+2]!==a)continue;const s=i[e],r=i[e+1],n=t[s][r-1],o=t[s][r];switch(a){case 0:case 1:if(l(h.y,n.y,o.y)&&l(c.y,n.y,o.y)){const t=Math.abs(o.y-n.y);t<u&&(u=t,f=e)}break;case 2:case 3:if(l(h.x,n.x,o.x)&&l(c.x,n.x,o.x)){const t=Math.abs(o.x-n.x);t<u&&(u=t,f=e)}}}e[n+3]=f}}static calcDeltas(t,e,i){const s=e.length;for(let r=0;r<s;r+=4){const s=[],n=a.calcDelta(r,e,i,s);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,s){const r=e[t+3];if(-1===r)return 0;const n=s.length;return n>1&&s[n-2]===r?0:(s.push(r),a.calcDelta(r,i,e,s)+1)}static addDeltas(t,e){const i=t.length;let s=0;for(let e=0;e<i;e+=4){const i=t[e+3];i>s&&(s=i)}for(let r=0;r<i;r+=4){const i=e[t[r]],n=t[r+1],o=s-t[r+3];switch(t[r+2]){case 0:i[n-1].x-=o,i[n].x-=o,1===n&&(i[i.length-1].x-=o),n===i.length-1&&(i[0].x-=o);break;case 1:i[n-1].x+=o,i[n].x+=o,1===n&&(i[i.length-1].x+=o),n===i.length-1&&(i[0].x+=o);break;case 2:i[n-1].y-=o,i[n].y-=o,1===n&&(i[i.length-1].y-=o),n===i.length-1&&(i[0].y-=o);break;case 3:i[n-1].y+=o,i[n].y+=o,1===n&&(i[i.length-1].y+=o),n===i.length-1&&(i[0].y+=o)}}}}const l=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},31411(t,e,i){i.d(e,{GS:()=>C,gh:()=>k});var s=i(49186),r=i(56512),n=i(65864),o=i(4305),a=i(50954),l=i(52006),h=i(49663),c=i(46068),u=i(15507);const f=1e-6,m=[0,0];function d(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:i,maxSegmentsPerCurve:s,minSegmentsPerCurve:r}){const n=i*i,o=e*e,a=1/s,l=this.interpolate(0),h=this.interpolate(1);(0,u.kb)(this.curveStart,l)>f&&t.push(l),this.initialize(l,h);const c=1/r;for(let t=r-1;t>0;t--){const e=t*c;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<a||(0===n||!isFinite(n)||(0,u.kb)(this.arcStart,this.arcEnd)<n)&&(0===o||!isFinite(o)||this.getDeviation2()<o)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,u.kb)(this.curveEnd,h)>f&&t.push([...this.curveEnd]),t}}class p extends y{constructor(t,e){const[i,s,r]=e.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[s,r],this._arcControlPoints=[s,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:i,tStart:s,tEnd:r}=this,[n,o]=this._arcControlPoints,a=(t-s)/(r-s),l=(0,u.RS)([],e,n,a),h=(0,u.RS)(m,n,o,a),c=(0,u.RS)([],o,i,a),f=(0,u.RS)([],l,h,a),d=(0,u.RS)([],h,c,a),y=(0,u.RS)([],f,d,a);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,c]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=l,this._arcControlPoints[1]=f,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:i}=this,[s,r]=this._curveControlPoints;return(0,o.B4)(e,s,r,i,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[i,s]=this._arcControlPoints;return Math.max((0,u.yE)(i,t,e),(0,u.yE)(s,t,e))}}class g extends y{constructor(t,e){const[i]=e.a;super(t,i),this._derivedEllipse=(0,c.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,c.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,u.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function _(t,e,i,{cx:s,cy:r,radius:n,thetaStart:o,thetaEnd:a,isInvalid:l},{maxDeviation:h,maxSegmentLength:c,maxSegmentsPerCurve:m,minSegmentsPerCurve:d}){if(l)return t.push([...i]),t;const y=2*n,p=[s+n*Math.cos(o),r+n*Math.sin(o)],g=[s+n*Math.cos(a),r+n*Math.sin(a)];(0,u.kb)(e,p)>f&&t.push(p);const _=Math.abs(a-o),x=c>0&&c<y?2*Math.asin(c/y):_,S=h>0&&h<=n?2*Math.acos(1-h/n):_,M=Math.min(x,S),b=Math.min(m,Math.max(d,Math.ceil(Math.abs(_/M)))),w=1/b;for(let e=1;e<b;e++){const i=e*w,l=o*(1-i)+a*i;t.push([s+n*Math.cos(l),r+n*Math.sin(l)])}return t.push(g),(0,u.kb)(i,g)>f&&t.push([...i]),t}function x(t,e,i,s){return new p(e,i).densify(t,s)}function S(t,e,i,s){const r=(0,a.pM)(e,i),[n]=i.c;return _(t,e,n,r,s)}function M(t,e,i,s){const r=(0,h.io)(e,i),[n]=i.a;return _(t,e,n,r,s)}function b(t,e,i,s){const[r,n,o,a,l,h,c]=i.a;return 0===h||0===c?(t.push([...r]),t):new g(e,i).densify(t,s)}function w(t,e,i,s){return(0,l.Xq)(i)?(t.push([...i]),t):(0,l.n1)(i)?x(t,e,i,s):(0,l.aO)(i)?S(t,e,i,s):(0,l.DA)(i)?M(t,e,i,s):b(t,e,i,s)}function C(t,e={}){if(!(0,l.Ed)(t))return t;const i=d(e),s=(0,l.FD)(t),r=[];for(const t of s){const e=[];for(let s=0;s<t.length-1;s++){const r=s+1,n=[...(0,l.yP)(t[s])];0===s&&e.push(n),w(e,n,t[r],i)}r.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:r,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:r,spatialReference:t.spatialReference}}const P=(0,r.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function k(t,e,r){const o=new Set(e);return await async function(t,e,r){let n=null;for(const o of t)if(o&&(0,l.Ed)(o)&&null==o.spatialReference.xyTolerance&&(0,l.V8)(o,e)){const t=o.spatialReference;if(!t)throw new s.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=I(t);if(r.has(e))o.spatialReference=r.get(e);else{n||(n=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6312)]).then(i.bind(i,78125)));const a=n.fromSpatialReference(t),l=a?.getTolerance();if(null==l)throw new s.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const h=o.spatialReference.clone();h.read({xyTolerance:l}),o.spatialReference=h,r.set(e,h)}}}(t,o,r),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const i=t.spatialReference.xyTolerance;if(null==i)return t;const s=P(i);return(0,n.rS)(function(t,e,i){if(!(0,l.Ed)(t))return t;const s=new Set(e),r=d(i),n=(0,l.FD)(t),o=[];let a=!1;for(const t of n){const e=[];for(let i=0;i<t.length-1;i++){const n=i+1,o=[...(0,l.yP)(t[i])];0===i&&e.push(o);const h=t[n];(0,l.Xq)(h)?e.push([...h]):(0,l.n1)(h)&&!s.has("cubic-bezier")?x(e,o,h,r):(0,l.aO)(h)&&!s.has("circular-arc")?S(e,o,h,r):(0,l.DA)(h)&&!s.has("elliptic-arc")?M(e,o,h,r):(0,l.wY)(h)&&!s.has("elliptic-arc")?b(e,o,h,r):(e.push((0,l.tk)(h)),a=!0)}o.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...a?{curvePaths:o}:{paths:o}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...a?{curveRings:o}:{rings:o}}}(t,e,s))})}function I(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},92722(t,e,i){i.d(e,{A:()=>r});var s=i(69397);class r{constructor(t=[],e=[],i=!1,s=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=s}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:s}){return new r(t,e,i||!1,s||!1)}static fromRect([t,e,i,s]){const n=i-t,o=s-e;return new r([5],[t,e,n,0,0,o,-n,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const i of this.lengths){if(i<3)continue;const{stride:s}=this;let r=this.coords[s*e],n=this.coords[s*e+1];for(let o=1;o<i;o+=1){const i=s*(e+o),a=this.coords[i],l=this.coords[i+1];t+=-.5*(a-r)*(l+n),r=a,n=l}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:i}=this;for(const s of this.lengths){for(let r=0;r<s;r++){const s=i*(e+r);t(this.coords[s],this.coords[s+1])}e+=s}}deltaDecode(){const t=this.clone(),{coords:e,lengths:i}=t;let s=0;const{stride:r}=this;for(const t of i){for(let i=1;i<t;i++){const t=r*(s+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}s+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:i,size:s}=this,n=this.coords.slice(0,s*i);return t?(t.set(n),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(n),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const i=new Array(e*t);for(let e=0,s=0;e<i.length;e+=t)i[s++]=this.coords[e],i[s++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},92649(t,e,i){i.r(e),i.d(e,{CIMSymbolHelper:()=>ht,CIMSymbolInflatedSizeHelper:()=>lt,capTypeToEnum:()=>ut,forEachSymbolLayer:()=>ct,slsDashToTemplateArray:()=>xt,symbolToCIM:()=>nt});const s=new(i(32488).A);function r(t,e=!0){if(!s.hasBidiChar(t))return[t,!1,{...s}];let i;i="rtl"===s.checkContextual(t)?"IDNNN":"ICNNN";const r=e?"VLYSN":"VLYNN";return[s.bidiTransform(t,i,r),!0,{...s}]}var n=i(4718),o=i(53966),a=i(87811),l=i(90629),h=i(19419),c=i(537),u=i(52006),f=i(31411),m=i(11831),d=i(35833),y=i(98939);i(92602);new Map,new Set,i(44208);var p=i(34727),g=i(93687),_=i(36745),x=i(12359),S=(i(12176),i(60408));class M{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,i,s,r]=t.oldColor,[n,a,l,h]=t.newColor;if(e===n&&i===a&&s===l&&r===h)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&i===o[t+1]&&s===o[t+2]&&r===o[t+3]&&(o[t]=n,o[t+1]=a,o[t+2]=l,o[t+3]=h)}const a=new ImageData(o,i,s);return n.putImageData(a,0,0),r}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const h=new ImageData(new Uint8ClampedArray(a.buffer),i,s);return n.putImageData(h,0,0),r}}var b=i(92580),w=i(28076);function C(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const i=document.createElement("canvas");i.width=t.width,i.height=t.height;const s=i.getContext("2d");return e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0),i}function P(t,e=0){if(0===e)return t;const i=Math.cos(e),s=Math.sin(e),[r,n]=t;return[r*i+n*-s,r*s+n*i]}function k(t,e=0){let i=0;for(let s=0;s<4;s++)i+=t[e+s]*I[s];return i}const I=[1/256,1/65536,1/16777216,1/4294967296];k(new Uint8ClampedArray([255,255,255,255])),k(new Uint8ClampedArray([255,255,255,0])),i(35521);var T=i(76213);const L=()=>o.A.getLogger("esri.symbols.cim.rasterizingUtils");let R;function v(t,e){const{colorRamp:i,gradientType:s}=e,r=z(i),n="CIMFixedColorRamp"===i.type;if("Continuous"===s&&!n)return A(t,r);const o=e.interval??w.D.CIMGradientFill.interval;if(n)return A(t,function(t,e){const i=[],s=(t.length-1)/(e-1);for(let r=0;r<e;r++){const n=t[Math.round(r*s)].color;i.push({offset:r/e,color:n}),i.push({offset:(r+1)/e,color:n})}return i}(r,o));const a=[];R??=document.createElement("canvas"),function(t,e,i,s,r){const n=i+2*r;t.width=n,t.height=s;const o=(r+1)/n,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,n,s);A(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,n,s)}(R,r,o,1,0);const l=R.getContext("2d").getImageData(0,0,o,1).data;for(let t=0,e=0;t<o;t++,e=4*t){const i=[l[e+0],l[e+1],l[e+2],l[e+3]];a.push({offset:t/o,color:i}),a.push({offset:(t+1)/o,color:i})}return A(t,a)}function z(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&L().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const i=t;e.push({offset:0,color:[i.fromColor[0],i.fromColor[1],i.fromColor[2],i.fromColor[3]/255]}),e.push({offset:1,color:[i.toColor[0],i.toColor[1],i.toColor[2],i.toColor[3]/255]});break}case"CIMFixedColorRamp":{const i=t,s=1/(i.colors.length-1);let r=0;for(const t of i.colors)e.push({offset:r,color:[t[0],t[1],t[2],t[3]/255]}),r+=s;break}case"CIMMultipartColorRamp":{const i=t,s=i.weights.reduce((t,e)=>t+e,0);let r=0;for(let t=0;t<i.colorRamps.length;t++){const n=i.colorRamps[t],o=i.weights[t],a=z(n);for(const t of a)e.push({offset:(r+t.offset*o)/s,color:t.color});r+=o}break}default:L().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function A(t,e,i=0){for(const{offset:s,color:r}of e)t.addColorStop(Math.min(Math.max(s,i),1-i),`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${r[3]})`)}class F{constructor(t=0,e=0,i=0,s=0){this.x=t,this.y=e,this.width=i,this.height=s}static fromExtent(t){return new F(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}var E=i(5760);function D(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}class U{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d",{willReadFrequently:!0});B(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:r,weight:n}=e.font;this._lineThroughWidthOffset=r&&"line-through"===r?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?E.y7:0,l=this._computeTextWidth(s,e)+2*a,h=this._lineHeight*this._textLines.length+2*a;if(i.width=l+2*this._lineThroughWidthOffset,i.height=h,0===i.width||0===i.height)return i.width=i.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:i};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=l,this._renderedHeight=h,this._lineThroughWidthOffset*=e.pixelRatio;const c=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=D(u),this._outlineStyle=D(c),this._haloStyle=function(t){return`rgb(${t.slice(0,3).toString()})`}(f);const m=this._renderedLineHeight,d=this._renderedOutlineSize,y=this._renderedHaloSize;s.save(),s.clearRect(0,0,i.width,i.height),B(s,e);const p=a*e.pixelRatio,g=function(t,e,i){return"center"===t?.5*e:"right"===t?e-i:i}(s.textAlign,this._renderedWidth-2*p,this._renderedHaloSize+this._renderedOutlineSize)+p,_=y+d+p,x=y>0;let S=this._lineThroughWidthOffset,M=0;if(o){s.save();const t=e.backgroundColor??[0,0,0,0],r=e.borderLine?.color??[0,0,0,0],n=2*(e.borderLine?.size??0);s.fillStyle=D(t),s.strokeStyle=D(r),s.lineWidth=n,s.fillRect(0,0,i.width,i.height),s.strokeRect(0,0,i.width,i.height),s.restore()}x&&this._renderHalo(s,g,_,S,M,e),d>0&&this._renderOutline(s,g,_,S,M,e),M+=_,S+=g;for(const t of this._textLines)x?(s.globalCompositeOperation="destination-out",s.fillStyle="rgb(0, 0, 0)",s.fillText(t,S,M),s.globalCompositeOperation="source-over",s.fillStyle=this._fillStyle,s.fillText(t,S,M)):(s.fillStyle=this._fillStyle,s.fillText(t,S,M)),r&&"none"!==r&&this._renderDecoration(s,S,M,r,n),M+=m;s.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,w=this._renderedHeight,C=s.getImageData(0,0,b,w),P=new Uint8Array(C.data);if(e.premultiplyColors){let t;for(let e=0;e<P.length;e+=4)t=P[e+3]/255,P[e]=P[e]*t,P[e+1]=P[e+1]*t,P[e+2]=P[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,w],image:new Uint32Array(P.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:i}}_renderHalo(t,e,i,s,r,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),B(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._haloStyle,h.strokeStyle=this._haloStyle,h.lineJoin="round",this._renderOutlineNative(h,e,i,c,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,s,r,o,a),t.globalAlpha=1}_renderOutline(t,e,i,s,r,n){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),B(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._outlineStyle,h.strokeStyle=this._outlineStyle,h.lineJoin="round",this._renderOutlineNative(h,e,i,c,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(l,0,0,o,a,s,r,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,i,s,r,n){const o=this._renderedLineHeight;for(const a of this._textLines){const l=2*n,h=5,c=.1;for(let n=0;n<h;n++){const o=(1-(h-1)*c+n*c)*l;t.lineWidth=o,t.strokeText(a,e,i),s&&"none"!==s&&this._renderDecoration(t,e,i,s,r,o)}i+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d");B(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const r=this._computeTextWidth(s,e),n=this._lineHeight*this._textLines.length;return i.width=r,i.height=n,[r*e.pixelRatio,n*e.pixelRatio]}_computeTextWidth(t,e){let i=0;for(const e of this._textLines)i=Math.max(i,t.measureText(e).width);const s=e.font;return("italic"===s.style||"oblique"===s.style||"string"==typeof s.weight&&("bold"===s.weight||"bolder"===s.weight)||"number"==typeof s.weight&&s.weight>600)&&(i+=.3*t.measureText("w").width),i+=2*(0,l.Lz)(this._parameters.halo.size),Math.round(i)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,l.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,i,s,r,n){let o=.9*this._lineHeight;const a="bold"===r?.06:"bolder"===r?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===s)switch(o=.9*this._computeLineHeightBase(),l){case"top":i+=o;break;case"middle":i+=o/2}else if("line-through"===s)switch(l){case"top":i+=o/1.5;break;case"middle":i+=o/3}const h=n?1.5*n:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=h,t.moveTo(e-this._lineThroughWidthOffset,i),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,i),t.stroke(),t.restore()}}function B(t,e){const i=Math.max(e.size,.5),s=e.font,r=`${s.style} ${s.weight} ${(0,l.Lz)(i).toFixed(1)}px ${s.family}, sans-serif`;let n;switch(t.font=r,t.textBaseline="top",e.horizontalAlignment){case"left":default:n="left";break;case"right":n="right";break;case"center":n="center"}t.textAlign=n}var N=i(93397),$=i(75434);function G(t){const e=(0,l.PN)(T.GR),i=(0,l.PN)(T.cp);return Math.max(e,Math.min(t||i,i))}i(39829);const H=Math.PI/180,O=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class V{constructor(t){this._t=t}static createIdentity(){return new V([1,0,0,0,1,0])}clone(){const t=this._t;return new V(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new V([t,0,0,0,e,0])}scale(t,e){const i=this._t;return i[0]*=t,i[1]*=t,i[2]*=t,i[3]*=e,i[4]*=e,i[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new V([0,0,t,0,0,e])}translate(t,e){const i=this._t;return i[2]+=t,i[5]+=e,this}static createRotate(t){const e=Math.cos(t),i=Math.sin(t);return new V([e,-i,0,i,e,0])}rotate(t){return V.multiply(this,V.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],i=Math.sqrt(t*t+e*e);return[t/i,e/i]}static multiply(t,e,i){const s=t._t,r=e._t,n=s[0]*r[0]+s[3]*r[1],o=s[1]*r[0]+s[4]*r[1],a=s[2]*r[0]+s[5]*r[1]+r[2],l=s[0]*r[3]+s[3]*r[4],h=s[1]*r[3]+s[4]*r[4],c=s[2]*r[3]+s[5]*r[4]+r[5],u=i._t;return u[0]=n,u[1]=o,u[2]=a,u[3]=l,u[4]=h,u[5]=c,i}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new V([0,0,0,0,0,0]);e=1/e;const i=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,r=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new V([r,n,i,o,a,s])}}class W{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new g.A(()=>new y.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||V.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||V.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const i=e?t.scaleRatio():1;V.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,i){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,i)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const i=t.symbolLayers;if(!i)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(i,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(i,e)}executeEffects(t,e){const i=this.geomUnitsPerPoint(),s=(0,N.ll)(t);let r=new d.kT(_.z.fromJSONCIM(e));for(const n of t){const t=(0,b.A)(n);t&&(r=t.execute(r,n,{geomUnitsPerPoint:i,tileKey:null,maxInflateSize:s,scale:null,spatialReference:e.spatialReference,preventClipping:!1}))}return r}drawSymbolLayers(t,e){let i=t.length;for(;i--;){const s=t[i];if(!s||!1===s.enable)continue;const r=s.effects;if(r&&r.length>0){const t=this.executeEffects(r,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const i=function(t,e,i){let s=(0,N.$w)(t.separation,w.D.CIMHatchFill.separation)*i,r=(0,N.$w)(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=(0,h.vt)();(0,c.Rg)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;r>180;)r-=180;for(;r<0;)r+=180;const u=Math.cos(r*H),f=Math.sin(r*H),m=-s*f,d=s*u;let y,p,g,_;n=(0,N.$w)(t.offsetX)*i*f-(0,N.$w)(t.offsetY)*i*u,y=g=Number.MAX_VALUE,p=_=-Number.MAX_VALUE;for(const t of l){const e=t[0],i=t[1],s=u*e+f*i,r=-f*e+u*i;y=Math.min(y,s),g=Math.min(g,r),p=Math.max(p,s),_=Math.max(_,r)}g=Math.floor(g/s)*s;let x=u*y-f*g-m*n/s,S=f*y+u*g-d*n/s,M=u*p-f*g-m*n/s,b=f*p+u*g-d*n/s;const C=1+Math.round((_-g)/s),P=[];for(let t=0;t<C;t++)x+=m,S+=d,M+=m,b+=d,P.push([[x,S],[M,b]]);return{paths:P}}(e,t,this.geomUnitsPerPoint());i&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,i),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const i=t.markerPlacement;if(i){const s=(0,b.c)(i);if(s){const r="CIMMarkerPlacementInsidePolygon"===i.type||"CIMMarkerPlacementPolygonCenter"===i.type&&i.clipAtBoundary;r&&this.pushClipPath(e);const n=s.execute(_.z.fromJSONCIM(e),i,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}r&&this.popClipPath()}}else{const i=this._placementPool.acquire();if((0,S.fT)(e))i.tx=e.x,i.ty=e.y,this.drawMarker(t,i);else if((0,S.Bi)(e)){const s=(0,x.l8)(e);s&&([i.tx,i.ty]=s,this.drawMarker(t,i))}else if((0,S.Rg)(e)){for(const s of e.paths)for(const e of s)if(i.tx=e[0],i.ty=e[1],this.drawMarker(t,i),this._earlyReturn)break}else for(const s of e.points)if(i.tx=s[0],i.ty=s[1],this.drawMarker(t,i),this._earlyReturn)break;this._placementPool.release(i)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const i=this._resourceManager.getResource(t.url),s=(0,N.$w)(t.size,w.D.CIMPictureMarker.size);if(null==i||s<=0)return;const r=i.width,n=i.height;if(!r||!n)return;const o=r/n,a=(0,N.$w)(t.scaleX,1),l=V.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,i=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,i*=s),l.translate(-e,-i)}let c=(0,N.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*H);let u=(0,N.$w)(t.offsetX),f=(0,N.$w)(t.offsetY);if(u||f){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=u*i+f*e;u=u*e-f*i,f=s}l.translate(u,f)}const m=this.geomUnitsPerPoint();1!==m&&l.scale(m,m);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const i=t.markerGraphics;if(!i)return;const s=(0,N.$w)(t.size,w.D.CIMVectorMarker.size),r=t.frame,n=r?r.ymax-r.ymin:0,o=s&&n?s/n:1,a=V.createIdentity();r&&a.translate(.5*-(r.xmax+r.xmin),.5*-(r.ymax+r.ymin));const l=t.anchorPoint;if(l){let e=l.x,i=l.y;"Absolute"!==t.anchorPointUnits?r&&(e*=r.xmax-r.xmin,i*=r.ymax-r.ymin):(e/=o,i/=o),a.translate(-e,-i)}1!==o&&a.scale(o,o);let h=(0,N.$w)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*H);let c=(0,N.$w)(t.offsetX),u=(0,N.$w)(t.offsetY);if(c||u){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=c*i+u*e;c=c*e-u*i,u=s}a.translate(c,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const m=e.getAngle();m&&a.rotate(m),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const t of i){t?.symbol&&t.geometry||O().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,i){if(!t)return;if(!(0,S.fT)(e))return;if((0,N.$w)(t.height,w.D.CIMTextSymbol.height)<=0)return;const s=V.createIdentity();let r=(0,N.$w)(t.angle);r=-r,r&&s.rotate(r*H);const n=(0,N.$w)(t.offsetX),o=(0,N.$w)(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,i),this.pop()}}class X extends W{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new F(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,h.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,S.Bi)(t))this._processPath(t.rings,0);else if((0,S.Rg)(t))this._processPath(t.paths,0);else if((0,S.ZC)(t)){const e=Z(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,i){if(!t||this._clipCount>0||null==i||i<=0)return;const s=Math.max(.5*this.transformSize((0,N.$w)(i,w.D.CIMSolidStroke.width)),.25);if((0,S.Bi)(t))this._processPath(t.rings,s);else if((0,S.Rg)(t))this._processPath(t.paths,s);else if((0,S.ZC)(t)){const e=Z(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,S.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:i}=t,s=(0,N.$w)(t.scaleX,1);let r=s*e,n=e;const o=this._resourceManager.getResource(i);if(null!=o){const t=o.height/o.width;r=s*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-r/2,-n/2]),0),this._merge(this.transformPt([-r/2,n/2]),0),this._merge(this.transformPt([r/2,-n/2]),0),this._merge(this.transformPt([r/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new U);const i=J(t);let[s,r]=this._textRasterizer.computeTextSize(e,i);s=(0,l.PN)(s),r=(0,l.PN)(r);const n=this.transformSize(1)*this.reverseTransformScalar(1);s*=n,r*=n;const o=t.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,a=t.verticalAlignment??w.D.CIMTextSymbol.verticalalignment;let h=0;switch(o){case"Left":h=s/2;break;case"Right":h=-s/2}let c=0;switch(a){case"Bottom":c=r/2;break;case"Top":c=-r/2;break;case"Baseline":c=r/6}this._merge(this.transformPt([-s/2+h,-r/2+c]),0),this._merge(this.transformPt([-s/2+h,r/2+c]),0),this._merge(this.transformPt([s/2+h,-r/2+c]),0),this._merge(this.transformPt([s/2+h,r/2+c]),0)}_processPath(t,e){if(t)for(const i of t){const t=i?i.length:0;if(t>1){this._merge(this.transformPt(i[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(i[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class q extends W{constructor(t,e,i,s){super(e,i),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new M,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else if((0,S.ZC)(t))this._buildPath(Z(t).rings,!0);else{if(!(0,S.U9)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const i=this._ctx;i.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",i.fill("evenodd")}drawSolidStroke(t,e,i,s,r,n){if(!t||!e||0===i)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,S.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(Z(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(i),.5),this._setCapStyle(s),this._setJoinStyle(r),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,S.ZC)(t))return;this._buildPath(Z(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:i,url:s,tintColor:r}=t,n=(0,N.$w)(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=(0,N.UE)(s)||"src"in o&&(0,N.UE)(o.src);let c="getFrame"in o?C(o):o;i&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,i)),this._applyAdditionalRenderProps&&!h&&r&&(c=this._colorSubstitutionHelper.tintImageData(c,r));const u=this.transformPt([0,0]),[f,m]=this.getTransformAngle(),d=this.transformSize(1),y=this._ctx;y.save(),y.setTransform({m11:n*d*f,m12:n*d*m,m21:-d*m,m22:d*f,m41:u[0],m42:u[1]}),y.drawImage(c,-a/2,-l/2,a,l),y.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new U);const i=J(t,this.transformSize((0,l.PN)(1))),s=this._textRasterizer.rasterizeText(e,i);if(!s)return;const{size:r,anchorX:n,anchorY:o,canvas:a}=s,h=r[0]*(n+.5),c=r[1]*(o-.5),u=this._ctx,f=this.transformPt([0,0]),[m,d]=this.getTransformAngle();u.save(),u.setTransform({m11:1*m,m12:1*d,m21:-1*d,m22:1*m,m41:f[0]-1*h,m42:f[1]+1*c}),u.drawImage(a,0,0),u.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:i,height:s,offsetX:r,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if((0,S.Bi)(t))this._buildPath(t.rings,!0);else if((0,S.Rg)(t))this._buildPath(t.paths,!0);else if((0,S.ZC)(t))this._buildPath(Z(t).rings,!0);else{if(!(0,S.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,f=(0,N.UE)(h)||"src"in c&&(0,N.UE)(c.src);let m,d="getFrame"in c?C(c):c;if(i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),m=u.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),r?r*=t:r=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,i=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==i||0!==r||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(r,n).scaleSelf(i,e,1),m.setTransform(t)}}else m=u.createPattern(d,"repeat");u.save(),u.fillStyle=m,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:r,miterLimit:o,tintColor:a,url:h,width:c}=e;const u=this._resourceManager.getResource(h);if(null==u)return;let f;if((0,S.Bi)(t))f=t.rings;else if((0,S.Rg)(t))f=t.paths;else{if(!(0,S.ZC)(t))return(0,S.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=Z(t).rings}c||(c=u.width);const m=(0,N.UE)(h)||"src"in u&&(0,N.UE)(u.src);let d="getFrame"in u?C(u):u;i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps&&(m||a&&(d=this._colorSubstitutionHelper.tintImageData(d,a)));const y=Math.max(this.transformSize((0,l.Lz)(c)),.5),p=y/d.width,g=this._ctx,_=g.createPattern(d,"repeat-y");let x,M;g.save(),this._setCapStyle(s),this._setJoinStyle(r),void 0!==o&&(g.miterLimit=o),g.lineWidth=y;for(let t of f)if(t=(0,n.o8)(t),j(t),t&&!(t.length<=1)){x=this.transformPt(t[0]);for(let e=1;e<t.length;e++){M=this.transformPt(t[e]);const i=Y(x,M),s=new DOMMatrix;s.translateSelf(0,x[1]-y/2).scaleSelf(p,p,1).rotateSelf(0,0,90-i),_.setTransform(s),g.strokeStyle=_,g.beginPath(),g.moveTo(x[0],x[1]),g.lineTo(M[0],M[1]),g.stroke(),x=M}}g.restore()}drawGradientFill(t,e){if(!t)return;let i;if((0,S.Bi)(t))i=t.rings;else if((0,S.Rg)(t))i=t.paths;else{if(!(0,S.ZC)(t))return void O().error("Unable to draw gradient fill");i=Z(t).rings}this._buildPath(i,!0);const{angle:s,gradientMethod:r,gradientSize:n,gradientSizeUnits:o}=e,a=w.D.CIMGradientFill,c=e.gradientType??a.gradientType,u=-(0,p.kU)(s??0),f=(0,h.Ie)();for(const t of i){const e=t?t.length:0;if(e>1)for(let i=0;i<e;i++){let e=this.transformPt(t[i]);"Linear"!==r&&"Rectangular"!==r||(e=P(e,-u)),(0,h.tK)(f,e)}}const[m,d,y,g]=f,_=this._ctx;switch(_.save(),r){case"Buffered":O().error(`Gradient method "${r}" currently unsupported.`);break;case"Linear":{const t=(d+g)/2,i="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*(y-m),[s,r]="Discrete"===c?[y,y-i]:[m+i,m],h=P([s,t],u),f=P([r,t],u),p=_.createLinearGradient(h[0],h[1],f[0],f[1]);v(p,e),_.fillStyle=p,_.fill("evenodd");break}case"Circular":{const t=(0,h.gX)(f),i=(0,h.ib)(f)/2,s="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*i,[r,u]="Discrete"===c?[i,i-s]:[s,0],m=_.createRadialGradient(t[0],t[1],r,t[0],t[1],u);v(m,e),_.fillStyle=m,_.fill("evenodd");break}case"Rectangular":{const i=(0,h.gX)(f),s=i[0],r=i[1],p=P(i,u),x=(i,s,r,n,o,a,l,h)=>{_.save(),this.pushClipPath(t);const c=P([o,a],u),f=P([l,h],u);_.beginPath(),_.moveTo(p[0],p[1]),_.lineTo(c[0],c[1]),_.lineTo(f[0],f[1]),_.lineTo(p[0],p[1]),_.clip();const m=P([i,s],u),d=P([r,n],u),y=_.createLinearGradient(m[0],m[1],d[0],d[1]);v(y,e),_.fillStyle=y,_.fill("evenodd"),_.restore()};let S="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*((0,h.VL)(f)/2),[M,b]="Discrete"===c?[y,y-S]:[s+S,s];x(M,r,b,r,y,d,y,g),[M,b]="Discrete"===c?[m,m+S]:[s-S,s],x(M,r,b,r,m,g,m,d),S="Absolute"===o?this.transformSize((0,l.Lz)(n)):(0,N.yX)(n,a.gradientSize)*((0,h.uJ)(f)/2);let[w,C]="Discrete"===c?[g,g-S]:[r+S,r];x(s,w,s,C,y,g,m,g),[w,C]="Discrete"===c?[d,d+S]:[r-S,r],x(s,w,s,C,m,d,y,d);break}}_.restore()}drawGradientStroke(t,e){const{capStyle:i,gradientMethod:s,gradientSize:r,gradientSizeUnits:o,joinStyle:a,miterLimit:h,width:c}=e;if(!t||0===c)return;let u;if((0,S.Bi)(t))u=t.rings;else if((0,S.Rg)(t))u=t.paths;else{if(!(0,S.ZC)(t))return void O().error("Unable to draw gradient stroke");u=Z(t).rings}const f=e.gradientType??w.D.CIMGradientStroke.gradientType,m=Math.max(this.transformSize((0,l.Lz)(c)),.5),d=this._ctx;let y,p;d.save(),this._setCapStyle(i),this._setJoinStyle(a),void 0!==h&&(d.miterLimit=h),d.lineWidth=m;for(let t of u){if(t=(0,n.o8)(t),j(t),!t||t.length<=1)continue;let i=0;y=this.transformPt(t[0]);for(let e=1;e<t.length;e++){p=this.transformPt(t[e]);const s=p[0]-y[0],r=p[1]-y[1];i+=Math.sqrt(s*s+r*r),y=p}const a="Absolute"===o?this.transformSize((0,l.Lz)(r)):(0,N.yX)(r,w.D.CIMGradientStroke.gradientSize)*("AcrossLine"===s?m:i);let h=0;y=this.transformPt(t[0]);for(let r=1;r<t.length;r++){p=this.transformPt(t[r]);const n=p[0]-y[0],o=p[1]-y[1],l=Math.sqrt(n*n+o*o);let c,u,g,_;switch(s){case"AcrossLine":{const[t,e]=P([n/l,o/l],-Math.PI/2),i=m/2,s="Discrete"===f?i:a-i;c=(y[0]+p[0])/2+t*s,u=(y[1]+p[1])/2+e*s,g=c-t*a,_=u-e*a;break}case"AlongLine":{const t=n/l,e=o/l;"Discrete"===f?(c=y[0]-t*h,u=y[1]-e*h,g=c+t*a,_=u+e*a):(g=y[0]+t*(i-h),_=y[1]+e*(i-h),c=g-t*a,u=_-e*a);break}default:return O().error("Unrecognized gradient method:",s),void d.restore()}const x=d.createLinearGradient(c,u,g,_);v(x,e),d.strokeStyle=x,d.beginPath(),d.moveTo(y[0],y[1]),d.lineTo(p[0],p[1]),d.stroke(),h+=l,y=p}}d.restore()}_buildPath(t,e){const i=this._ctx;if(i.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let r=this.transformPt(s[0]);i.moveTo(r[0],r[1]);for(let e=1;e<t;e++)r=this.transformPt(s[e]),i.lineTo(r[0],r[1]);e&&i.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function Y(t,e){const i=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,i)}const Z=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function J(t,e=1){const i=(0,N.DW)(t),s=(0,N._d)(t.fontStyleName),r=t.fontFamilyName??"arial-unicode-ms",{weight:n,style:o}=s,a=e*(t.height||5),l=(0,N.Bu)(t.horizontalAlignment),h=(0,N.Nl)(t.verticalAlignment),c=(0,N.pM)(t),u=(0,N.pM)(t.haloSymbol),f=null!=u?e*(t.haloSize??0):0,m=(0,N._1)(t.symbol),d=e*((0,N.xo)(t.symbol)||0),y="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,p=(0,N.pM)(y),g=(0,N.xo)(y),_=(0,N._1)(y);return{color:c,size:a,horizontalAlignment:l,verticalAlignment:h,font:{family:r,style:(0,N.pV)(o),weight:(0,N.Kn)(n),decoration:i},outline:{size:d||0,color:m},halo:{size:f||0,color:u,style:o},backgroundColor:p,borderLine:null!=g&&null!=_?{size:g,color:_}:null,pixelRatio:1,premultiplyColors:!0}}function j(t){let e,i,s,r,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],i=t[a][1]-o[1],r=0!==e?i/e:Math.PI/2,void 0!==s&&Math.abs(r-s)<=1e-4?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=r}var K=i(59868),Q=i(13195);const tt=Math.PI,et=tt/2,it=Math.PI/180,st=96/72,rt=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function nt(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const i=ht.fromSimpleMarker(t);if(!i)throw new Error("InternalError: Cannot convert symbol to CIM");e=i;break}case"picture-marker":e=ht.fromPictureMarker(t);break;case"simple-line":e=ht.fromSimpleLineSymbol(t);break;case"simple-fill":e=ht.fromSimpleFillSymbol(t);break;case"picture-fill":e=ht.fromPictureFillSymbol(t);break;case"text":e=ht.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function ot(t,e,i){switch(e.type){case"CIMSymbolReference":return ot(t,e.symbol,i);case"CIMPointSymbol":null==i&&(i={x:0,y:0}),t.drawSymbol(e,i);break;case"CIMLineSymbol":null==i&&(i={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,i);break;case"CIMPolygonSymbol":null==i&&(i={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,i);break;case"CIMTextSymbol":{const i={x:0,y:0};t.drawSymbol(e,i);break}case"CIMVectorMarker":{const i=new y.W;t.drawMarker(e,i);break}}return t.envelope()}function at(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}class lt{static getSymbolInflateSize(t,e,i,s,r){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,i,s,r):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),i=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+i*i)}static _vectorMarkerBounds(t,e,i,s){let r=!0;const n=(0,h.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(n,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,i,0,s),n[0]+=e[0],n[1]+=e[1],n[2]+=e[2],n[3]+=e[3],r?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],r=!1):(t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])))}return t}static _getInflateSize(t,e,i,s,r){if(function(t){return void 0!==t.symbolLayers}(e)){const n=this._getLayersInflateSize(t,e.symbolLayers,i,s,r),o=(0,N.ll)(e.effects);return o>0&&(n[0]-=o,n[1]-=o,n[2]+=o,n[3]+=o),n}return this._getTextInflatedSize(t,e,r)}static _getLayersInflateSize(t,e,i,s,r){let n=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let i=t.width;null!=i&&("Square"===t.capStyle||"Miter"===t.joinStyle?i/=1.4142135623730951:i/=2,e[0]=-i,e[1]=-i,e[2]=i,e[3]=i);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,i,r),t.frame){const i=(t.frame.xmin+t.frame.xmax)/2,s=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=i,e[1]-=s,e[2]-=i,e[3]-=s,null!=t.size){const i=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=i,e[1]*=i,e[2]*=i,e[3]*=i}}}else if("CIMPictureMarker"===o.type){const s=o,r=i.getResource(s.url);let n=1;if(null!=r&&r.height&&(n=r.width/r.height),null!=t.size){const i=t.size/2,r=t.size*n*(s.scaleX??1)/2;e=[-r,-i,r,i]}}else if(null!=t.size){const i=t.size/2;e=[-i,-i,i,i]}if(t.anchorPoint){let i,s;"Absolute"===t.anchorPointUnits?(i=t.anchorPoint.x,s=t.anchorPoint.y):(i=t.anchorPoint.x*(e[2]-e[0]),s=t.anchorPoint.y*(e[3]-e[1]));const r=1.25*Math.sqrt(i*i+s*s);e[0]-=r,e[1]-=r,e[2]+=r,e[3]+=r}let n=(0,N.$w)(t.rotation);if(t.rotateClockwise&&(n=-n),s&&(n-=s),n){const t=it*n,i=Math.cos(t),s=Math.sin(t),r=(0,h.vt)([Q.MG,Q.MG,-Q.MG,-Q.MG]);(0,h.tK)(r,[e[0]*i-e[1]*s,e[0]*s+e[1]*i]),(0,h.tK)(r,[e[0]*i-e[3]*s,e[0]*s+e[3]*i]),(0,h.tK)(r,[e[2]*i-e[1]*s,e[2]*s+e[1]*i]),(0,h.tK)(r,[e[2]*i-e[3]*s,e[2]*s+e[3]*i]),e=r}let a=(0,N.$w)(t.offsetX),l=(0,N.$w)(t.offsetY);if(s){const t=it*s,e=Math.cos(t),i=Math.sin(t),r=a*i+l*e;a=a*e-l*i,l=r}e[0]+=a,e[1]+=l,e[2]+=a,e[3]+=l;const c=at(t.markerPlacement);c>0&&(e[0]-=c,e[1]-=c,e[2]+=c,e[3]+=c);break}}const a=(0,N.ll)(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),n?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],n=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,i){const s=function(t){return(0,l.PN)(Math.round((0,l.Lz)(t)))}(e.height??w.D.CIMTextSymbol.height);if(t[0]=-s/2,t[1]=-s/2,t[2]=s/2,t[3]=s/2,!i)return t;const r=i.get(e);if(!r)return t;if(!r.glyphMosaicItems.glyphs.length)return t;const{lineGapType:n,lineGap:o}=e,a=n?((t,e,i)=>{switch(t){case"ExtraLeading":return 1+e/i;case"Multiple":return e;case"Exact":return e/i}})(n,o??0,s):0,h=e.horizontalAlignment??w.D.CIMTextSymbol.horizontalalignment,c=e.verticalAlignment??w.D.CIMTextSymbol.verticalalignment,u="CIMBackgroundCallout"===e.callout?.type,f=(0,$.Tl)(r.glyphMosaicItems,{scale:s/T.eG,angle:(0,N.$w)(e.angle),xOffset:(0,N.$w)(e.offsetX),yOffset:(0,N.$w)(e.offsetY),horizontalAlignment:h,verticalAlignment:c,maxLineWidth:G(e.lineWidth),lineHeight:T.DY*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:u}).boundsT,m=Math.sqrt(f.width*f.width+f.height*f.height);return t[0]-=f.x+m,t[1]-=f.y-m,t[2]+=f.x+m,t[3]+=-f.y+m,t}}class ht{static getEnvelope(t,e,i){if(!t)return null;const s=new X(i);if(Array.isArray(t)){let i;for(const r of t)i?i.union(ot(s,r,e)):i=ot(s,r,e);return i}return ot(s,t,e)}static getTextureInfo(t,e,i,s,r){const n=s??this.getEnvelope(t,null,e);if(!n)return[0,0,0,0,1];const o=Math.max(n.width,n.height)*st;let a=null!=r?Math.max(r/o,1):1;a*=st,n.x*=a,n.y*=a,n.width*=a,n.height*=a,n.width=Math.max(Math.ceil(n.x+n.width)-Math.floor(n.x),1)-1,n.height=Math.max(Math.ceil(n.y+n.height)-Math.floor(n.y),1)-1;let l=n.x+.5*n.width,h=n.y+.5*n.height;return l+=n.x-Math.floor(n.x),h+=n.y-Math.floor(n.y),s||(n.width+=i,n.height+=i,l+=i/2,h+=i/2),[n.width,n.height,l,h,a]}static getTextureAnchor(t,e,i){const[s,r,n,o,a]=this.getTextureInfo(t,e,2,null,i);return[-n/s,-o/r,r/a*st]}static rasterize(t,e,i,s,r=!0,n){const[o,a,l,h,c]=this.getTextureInfo(e,s,2,i,n);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),f=V.createScale(c,-c);f.translate(.5*o-l,.5*a+h);const m=new q(u,s,f);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};m.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new y.W;m.drawMarker(e,t);break}}const d=u.getImageData(0,0,t.width,t.height),p=new Uint8Array(d.data);if(r){let t;for(let e=0;e<p.length;e+=4)t=p[e+3]/255,p[e]=p[e]*t,p[e+1]=p[e+1]*t,p[e+2]=p[e+2]*t}return[p,t.width,t.height,-l/o,-h/a]}static fromTextSymbol(t){const{text:e}=t;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:ht.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:i,width:s,xoffset:r,xscale:n,yoffset:o,yscale:a}=t,l=[],h={type:"CIMPolygonSymbol",symbolLayers:l};if(i){const t=bt(i);t&&l.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,f=(s??0)*(n||1),m=(e??0)*(a||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:c,height:m,width:f,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(o),rotation:(0,N.$w)(-u),colorSubstitutions:null}),h}static fromSimpleFillSymbol(t){const{color:e,style:i,outline:s}=t,r=[],o={type:"CIMPolygonSymbol",symbolLayers:r};if(s){const t=bt(s);t&&r.push(t)}if(i&&"solid"!==i&&"none"!==i&&"esriSFSSolid"!==i&&"esriSFSNull"!==i){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:yt(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let s=0;const o=(0,l.PN)(Mt(i)?8:10);switch(i){case"vertical":case"esriSFSVertical":s=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":s=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":s=45;break;case"cross":case"esriSFSCross":s=0}r.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:s,separation:o}),"cross"===i||"esriSFSCross"===i?r.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==i&&"esriSFSDiagonalCross"!==i||r.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!i||"solid"!==i&&"esriSFSSolid"!==i||r.push({type:"CIMSolidFill",enable:!0,color:yt(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:i,join:s,marker:r,miterLimit:n,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:xt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const h=[];if(r){let t;switch(r.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=ht.fromSimpleMarker(r,a,i).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},h.push(e)}return h.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?yt(i):[0,0,0,0],capStyle:ut(e),joinStyle:ft(s),miterLimit:n,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:h}}static fromPictureMarker(t){const{angle:e,height:i,width:s,xoffset:r,yoffset:n}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:i,width:s,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(n),rotation:(0,N.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:i,font:s,haloColor:n,haloSize:o,horizontalAlignment:a,kerning:l,lineWidth:h,text:c,verticalAlignment:u,xoffset:f,yoffset:m,backgroundColor:d,borderLineColor:y,borderLineSize:p}=t;let g,_,x,S,M,b;s&&(g=s.family,_=s.style,x=s.weight,S=s.size,M=s.decoration);let w=!1;return c&&(w=r(c)[1]),(d||p)&&(b={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(d)},{type:"CIMSolidStroke",enable:!0,color:yt(y),width:p??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:g||"Arial",fontStyleName:pt(_,x),fontType:0,haloSize:o,height:S,hinting:1,horizontalAlignment:mt(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:h,offsetX:(0,N.$w)(f),offsetY:(0,N.$w)(m),strikethrough:"line-through"===M,underline:"underline"===M,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(i)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:yt(n)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:w?1:0,verticalAlignment:dt(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:b}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:i,width:s,xoffset:r,yoffset:n}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:i,width:s,offsetX:(0,N.$w)(r),offsetY:(0,N.$w)(n),rotation:(0,N.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:i,xoffset:s,yoffset:r,url:n}=t;return n?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:n,width:e,height:i,offsetX:(0,N.$w)(s),offsetY:(0,N.$w)(r),rotation:0}}:null}static fromSimpleMarker(t,e,i){const{style:s}=t,r=t.color??i;if("path"===s||"esriSMSPath"===s){const e=[];if("outline"in t&&t.outline){const i=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:i.width,color:yt(i.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:yt(r),path:t.path});const[i,s]=St("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,N.$w)(t.angle),size:(0,N.$w)(t.size||6),offsetX:(0,N.$w)(t.xoffset),offsetY:(0,N.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:i,markerGraphics:[{type:"CIMMarkerGraphic",geometry:s,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const n=[];let o,a,l=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,i="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=i?St(s,t.size):St(s);const r=e.width??K.A7.width;if(i){const e=r/t.size,i=(o.xmax-o.xmin)*e/2,s=(o.ymax-o.ymin)*e/2;o.xmin-=i,o.xmax+=i,o.ymin-=s,o.ymax+=s,l&&(l+=r)}const h="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",c=i?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:xt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:h,controlPointEnding:"FullPattern"}]:void 0;n.push({type:"CIMSolidStroke",capStyle:i?"Round":"Butt",enable:!0,width:r,color:yt(e.color),effects:c})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=St(s):([o,a]=St(s),n.push({type:"CIMSolidStroke",enable:!0,width:e,color:yt(r)}));n.push({type:"CIMSolidFill",enable:!0,color:yt(r)});const h={type:"CIMPolygonSymbol",symbolLayers:n};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,N.$w)(-t.angle),size:(0,N.$w)(l||6*e),offsetX:(0,N.$w)(t.xoffset),offsetY:(0,N.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:h}]}]}}static fromCIMHatchFill(t,e){const i=e*(t.separation??w.D.CIMHatchFill.separation),s=i/2,r=(0,n.o8)(t.lineSymbol);r.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const i=t.dashTemplate;t.dashTemplate=i?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const i=t.markerPlacement;null!=i&&"placementTemplate"in i&&(i.placementTemplate=i.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(r)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-s,ymax:s},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:r}],size:i}}static async normalizeSymbolAndFetchResources(t,e,i=null){if(!t)return;const s=[];if("effects"in t&&t.effects)for(const e of t.effects)s.push((0,d.ai)(e));async function r(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:i,fontStyleName:s}=t;if("calcitewebcoreicons"===i?.toLowerCase())return;const{style:r,weight:n}=(0,N._d)(s),o=(0,N.DW)(t),a=new m.A({family:i,style:r,weight:n,decoration:o});try{await e.loadFont(a)}catch{rt().error(`Unsupported font ${i} in CIM symbol`)}}s.push(r(t)),ct(t,t=>{if(t.effects)for(const e of t.effects)s.push((0,d.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,u.Ed)(e.geometry)&&(e.geometry=(0,f.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&s.push((0,d.g1)(t.markerPlacement))}"url"in t&&t.url&&s.push(e.fetchResource(t.url,{signal:i})),"symbol"in t&&s.push(r(t.symbol))}),await Promise.all(s)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const i of t)e+=i;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:rt().error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const i of e)t+=+i;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,i={...t};i.markerPlacement=null,i.anchorPoint=null;const s=Math.abs(e.stepX),r=Math.abs(e.stepY),n=(e.randomness??100)/100;let o,h,c,u;if("Random"===e.gridType){const t=(0,l.PN)(T.yv),i=Math.max(Math.floor(t/s),1),f=Math.max(Math.floor(t/r),1);o=i*s/2,h=f*r/2,c=2*h;const m=new a.A(e.seed),d=n*s/1.5,y=n*r/1.5;u=[];for(let t=0;t<i;t++)for(let e=0;e<f;e++){const i=t*s-o+d*(.5-m.getFloat()),n=e*r-h+y*(.5-m.getFloat());u.push({x:i,y:n}),0===t&&u.push({x:i+2*o,y:n}),0===e&&u.push({x:i,y:n+2*h})}}else!0===e.shiftOddRows?(o=s/2,h=r,c=2*r,u=[{x:-o,y:0},{x:o,y:0},{x:0,y:h},{x:0,y:-h}]):(o=s/2,h=r/2,c=r,u=[{x:-s,y:0},{x:0,y:-r},{x:-s,y:-r},{x:0,y:0},{x:s,y:0},{x:0,y:r},{x:s,y:r},{x:-s,y:r},{x:s,y:-r}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-o,xmax:o,ymin:-h,ymax:h},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[i]}})),size:c}}}function ct(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const i=t.symbolLayers;if(!i)return;for(const t of i)if(e(t),"CIMVectorMarker"===t.type){const i=t.markerGraphics;if(!i)continue;for(const t of i)if(t){const i=t.symbol;i&&ct(i,e)}}break}}}const ut=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},ft=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},mt=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},dt=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},yt=t=>{if(!t)return[0,0,0,0];const{r:e,g:i,b:s,a:r}=t;return[e,i,s,255*r]},pt=(t,e)=>{const i=gt(e),s=_t(t);return i&&s?`${i}-${s}`:`${i}${s}`},gt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},_t=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},xt=(t,e)=>{const i=.001,s="butt"===e;switch(t){case"dash":case"esriSLSDash":return s?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return s?[4,3,1,3]:[3,4,i,4];case"dot":case"esriSLSDot":return s?[1,3]:[i,4];case"long-dash":case"esriSLSLongDash":return s?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return s?[8,3,1,3]:[7,4,i,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return s?[8,3,1,3,1,3]:[7,4,i,4,i,4];case"short-dash":case"esriSLSShortDash":return s?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return s?[4,1,1,1]:[3,2,i,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return s?[4,1,1,1,1,1]:[3,2,i,2,i,2];case"short-dot":case"esriSLSShortDot":return s?[1,1]:[i,2];case"solid":case"esriSLSSolid":case"none":return rt().error("Unexpected: style does not require rasterization"),[0,0];default:return rt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},St=(t,e=100)=>{const i=e/2;let s,r;const n=t;if("circle"===n||"esriSMSCircle"===n){const t=.25;let e=Math.acos(1-t/i),n=Math.ceil(tt/e/4);0===n&&(n=1),e=et/n,n*=4;const o=[];o.push([i,0]);for(let t=1;t<n;t++)o.push([i*Math.cos(t*e),-i*Math.sin(t*e)]);o.push([i,0]),s={rings:[o]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("cross"===n||"esriSMSCross"===n){const t=0;s={paths:[[[t,i],[t,-i]],[[i,t],[-i,t]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("diamond"===n||"esriSMSDiamond"===n)s={rings:[[[-i,0],[0,i],[i,0],[0,-i],[-i,0]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("square"===n||"esriSMSSquare"===n)s={rings:[[[-i,-i],[-i,i],[i,i],[i,-i],[-i,-i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("x"===n||"esriSMSX"===n)s={paths:[[[i,i],[-i,-i]],[[i,-i],[-i,i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("triangle"===n||"esriSMSTriangle"===n){const t=.5773502691896257*e,i=-t,n=2/3*e,o=n-e;s={rings:[[[i,o],[0,n],[t,o],[i,o]]]},r={xmin:i,ymin:o,xmax:t,ymax:n}}else"arrow"===n&&(s={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i});return[r,s]},Mt=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function bt(t){if(!t)return null;let e=null;const{cap:i,color:s,join:r,miterLimit:n,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:xt(o,i),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?yt(s):[0,0,0,0],capStyle:ut(i),joinStyle:ft(r),miterLimit:n,width:a,effects:e}}},13195(t,e,i){i.d(e,{GW:()=>p,IU:()=>g,Jo:()=>o,MG:()=>n,Wh:()=>f,aA:()=>h,cP:()=>S,os:()=>c,p6:()=>y,pJ:()=>a,ru:()=>x,s3:()=>_,wV:()=>d,yM:()=>M,z0:()=>m});var s=i(95108),r=i(6774);const n=Number.POSITIVE_INFINITY,o=Math.PI,a=2*o,l=128/o,h=256/360,c=o/180,u=1/Math.LN2;function f(t,e){return(t%=e)>=0?t:t+e}function m(t){return f(t*l,256)}function d(t){return f(t*h,256)}function y(t){return Math.log(t)*u}function p(t,e,i){return t*(1-i)+e*i}function g(t){return 8+Math.max(16*(t-14),0)}function _(t,e,i){let s,r,n,o=0;for(const a of i){s=a.length;for(let i=1;i<s;++i)r=a[i-1],n=a[i],r.y>e!=n.y>e&&((n.x-r.x)*(e-r.y)-(n.y-r.y)*(t-r.x)>0?o++:o--)}return 0!==o}function x(t,e,i,r){let n,o,a,l;const h=r*r;for(const r of i){const i=r.length;if(!(i<2)){n=r[0].x,o=r[0].y;for(let c=1;c<i;++c){if(a=r[c].x,l=r[c].y,(0,s.Ng)(t,e,n,o,a,l)<h)return!0;n=a,o=l}}}return!1}function S(t,e){if(0===e||Number.isNaN(e))return t;const i=[],s=new r.bR(0,0),n=new r.bR(0,0),o=new r.bR(0,0);for(let a=0;a<t.length;a++){const l=t[a],h=[];for(let t=0;t<l.length;t++){const i=l[t-1],a=l[t],c=l[t+1];0===t?s.setCoords(0,0):s.assignSub(a,i).normalize().rightPerpendicular(),t===l.length-1?n.setCoords(0,0):n.assignSub(c,a).normalize().rightPerpendicular(),o.assignAdd(s,n).normalize();const u=o.x*n.x+o.y*n.y;0!==u&&o.scale(1/u),h.push(r.bR.add(a,o.scale(e)))}i.push(h)}return i}function M(t,e,i,s){const n=new r.bR(t[0],t[1]);if(n.scale(s),"viewport"===e){const t=-i*(Math.PI/180),e=Math.cos(t),s=Math.sin(t);n.rotate(e,s)}return n}},76213(t,e,i){i.d(e,{C2:()=>a,CQ:()=>s,DY:()=>r,GR:()=>p,Gh:()=>h,MZ:()=>m,Rm:()=>o,TB:()=>y,U5:()=>l,_M:()=>c,cp:()=>g,eG:()=>n,hM:()=>f,ie:()=>u,yv:()=>d});const s=512,r=29,n=24,o=3,a=4,l=6,h=1.05,c=3,u=3,f=4,m=1,d=1024,y=256,p=32,g=512}}]);
|